diff options
| author | Alexander Barton <alex@barton.de> | 2012-01-02 15:23:17 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2012-01-02 15:23:17 +0100 |
| commit | 565523cbb4a5e2f34d584002916faba411a94187 (patch) | |
| tree | 722b9a9d1159a60674b07a0773c37302ec63181f /src | |
| parent | 013298d4c68cc82c8b723fedb81ea87ced7fb306 (diff) | |
| download | ngircd-565523cbb4a5e2f34d584002916faba411a94187.tar.gz ngircd-565523cbb4a5e2f34d584002916faba411a94187.zip | |
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!
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/irc-channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c index a41f1d48..6ddad88b 100644 --- a/src/ngircd/irc-channel.c +++ b/src/ngircd/irc-channel.c @@ -401,7 +401,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req ) /* Join channel (and create channel if it doesn't exist) */ if (!Channel_Join(target, channame)) - break; + goto join_next; if (!chan) { /* channel is new; it has been created above */ chan = Channel_Search(channame); @@ -420,6 +420,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req ) if (!join_send_topic(Client, target, chan, channame)) break; /* write error */ + join_next: /* next channel? */ channame = strtok_r(NULL, ",", &lastchan); if (channame && key) |