Don't stop join handling on faulty channel, skip it
When JOIN is received with more than one channel name, don't stop processing on the first error (e.g. bad name, wrong channel key, ...) but report an error and continue with the other given channel names. Reported by Cahata -- thanks!
This commit is contained in:
parent
013298d4c6
commit
565523cbb4
|
@ -401,7 +401,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
||||||
|
|
||||||
/* Join channel (and create channel if it doesn't exist) */
|
/* Join channel (and create channel if it doesn't exist) */
|
||||||
if (!Channel_Join(target, channame))
|
if (!Channel_Join(target, channame))
|
||||||
break;
|
goto join_next;
|
||||||
|
|
||||||
if (!chan) { /* channel is new; it has been created above */
|
if (!chan) { /* channel is new; it has been created above */
|
||||||
chan = Channel_Search(channame);
|
chan = Channel_Search(channame);
|
||||||
|
@ -420,6 +420,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
||||||
if (!join_send_topic(Client, target, chan, channame))
|
if (!join_send_topic(Client, target, chan, channame))
|
||||||
break; /* write error */
|
break; /* write error */
|
||||||
|
|
||||||
|
join_next:
|
||||||
/* next channel? */
|
/* next channel? */
|
||||||
channame = strtok_r(NULL, ",", &lastchan);
|
channame = strtok_r(NULL, ",", &lastchan);
|
||||||
if (channame && key)
|
if (channame && key)
|
||||||
|
|
Loading…
Reference in New Issue