]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Channel_Join was severely broken.
authorFlorian Westphal <fw@strlen.de>
Thu, 5 Oct 2006 18:26:54 +0000 (18:26 +0000)
committerFlorian Westphal <fw@strlen.de>
Thu, 5 Oct 2006 18:26:54 +0000 (18:26 +0000)
src/ngircd/irc-channel.c

index 7e21c1308c496dd6a55651d9d1833ec92b5ac960..f0b89f8c8402d383cc6ba0d45e45448db38f82bf 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-channel.c,v 1.35 2006/03/16 20:14:16 fw Exp $";
+static char UNUSED id[] = "$Id: irc-channel.c,v 1.36 2006/10/05 18:26:54 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -123,7 +123,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
                                        IRC_WriteStrClient( Client, ERR_BANNEDFROMCHAN_MSG, Client_ID( Client ), channame );
 
                                        /* Try next name, if any */
-                                       channame = strtok( NULL, "," );
+                                       channame = strchr(channame, ',');
                                        continue;
                                }
 
@@ -134,7 +134,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
                                        IRC_WriteStrClient( Client, ERR_INVITEONLYCHAN_MSG, Client_ID( Client ), channame );
 
                                        /* Try next name, if any */
-                                       channame = strtok( NULL, "," );
+                                       channame = strchr(channame, ',');
                                        continue;
                                }
 
@@ -145,7 +145,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
                                        IRC_WriteStrClient( Client, ERR_BADCHANNELKEY_MSG, Client_ID( Client ), channame );
 
                                        /* Try next name, if any */
-                                       channame = strtok( NULL, "," );
+                                       channame = strchr(channame, ',');
                                        continue;
                                }
 
@@ -156,7 +156,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
                                        IRC_WriteStrClient( Client, ERR_CHANNELISFULL_MSG, Client_ID( Client ), channame );
 
                                        /* Try next name, if any */
-                                       channame = strtok( NULL, "," );
+                                       channame = strchr(channame, ',');
                                        continue;
                                }
                        }
@@ -176,7 +176,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
                if( ! Channel_Join( target, channame ))
                {
                        /* naechsten Namen ermitteln */
-                       channame = strtok( NULL, "," );
+                       channame = strchr(channame, ',');
                        continue;
                }
                if( ! chan ) chan = Channel_Search( channame );