ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_knock.c
(Generate patch)

Comparing ircd-hybrid/trunk/modules/m_knock.c (file contents):
Revision 1832 by michael, Fri Apr 19 19:16:09 2013 UTC vs.
Revision 1834 by michael, Fri Apr 19 19:50:27 2013 UTC

# Line 61 | Line 61 | m_knock(struct Client *client_p, struct
61  
62    if (EmptyString(parv[1]))
63    {
64 <    sendto_one(source_p, ERR_NEEDMOREPARAMS,
64 >    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
65                 me.name, source_p->name, "KNOCK");
66      return;
67    }
68  
69    if ((chptr = hash_find_channel(parv[1])) == NULL)
70    {
71 <    sendto_one(source_p, ERR_NOSUCHCHANNEL,
71 >    sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
72                 me.name, source_p->name, parv[1]);
73      return;
74    }
# Line 76 | Line 76 | m_knock(struct Client *client_p, struct
76    /* Normal channel, just be sure they aren't on it */
77    if (IsMember(source_p, chptr))
78    {
79 <    sendto_one(source_p, ERR_KNOCKONCHAN, me.name,
79 >    sendto_one(source_p, form_str(ERR_KNOCKONCHAN), me.name,
80                 source_p->name, chptr->chname);
81      return;
82    }
# Line 85 | Line 85 | m_knock(struct Client *client_p, struct
85          (chptr->mode.limit && dlink_list_length(&chptr->members) >=
86           chptr->mode.limit)))
87    {
88 <    sendto_one(source_p, ERR_CHANOPEN, me.name,
88 >    sendto_one(source_p, form_str(ERR_CHANOPEN), me.name,
89                 source_p->name, chptr->chname);
90      return;
91    }
# Line 97 | Line 97 | m_knock(struct Client *client_p, struct
97       */
98      if (PrivateChannel(chptr) || is_banned(chptr, source_p))
99      {
100 <      sendto_one(source_p, ERR_CANNOTSENDTOCHAN,
100 >      sendto_one(source_p, form_str(ERR_CANNOTSENDTOCHAN),
101                   me.name, source_p->name, chptr->chname);
102        return;
103      }
# Line 112 | Line 112 | m_knock(struct Client *client_p, struct
112      if ((source_p->localClient->last_knock + ConfigChannel.knock_delay) >
113          CurrentTime)
114      {
115 <      sendto_one(source_p, ERR_TOOMANYKNOCK, me.name,
115 >      sendto_one(source_p, form_str(ERR_TOOMANYKNOCK), me.name,
116                   source_p->name, chptr->chname, "user");
117        return;
118      }
119  
120      if ((chptr->last_knock + ConfigChannel.knock_delay_channel) > CurrentTime)
121      {
122 <      sendto_one(source_p, ERR_TOOMANYKNOCK, me.name,
122 >      sendto_one(source_p, form_str(ERR_TOOMANYKNOCK), me.name,
123                   source_p->name, chptr->chname, "channel");
124        return;
125      }
126  
127      source_p->localClient->last_knock = CurrentTime;
128  
129 <    sendto_one(source_p, RPL_KNOCKDLVR, me.name,
129 >    sendto_one(source_p, form_str(RPL_KNOCKDLVR), me.name,
130                 source_p->name, chptr->chname);
131    }
132  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)