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 |
|
} |
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 |
|
} |
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 |
|
} |
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 |
|
} |
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 |
|
|