]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Send invite and ban lists only once and not repeatedly for every channel.
authorAlexander Barton <alex@barton.de>
Sun, 30 Apr 2006 21:31:43 +0000 (21:31 +0000)
committerAlexander Barton <alex@barton.de>
Sun, 30 Apr 2006 21:31:43 +0000 (21:31 +0000)
src/ngircd/irc-server.c

index 989e5787f6d386a25b31b39aec3febbf07540a19..2c153064b11306d385e463ebdd938a970a089fa3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2006 Alexander Barton (alex@barton.de)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-server.c,v 1.38 2005/03/19 18:43:49 fw Exp $";
+static char UNUSED id[] = "$Id: irc-server.c,v 1.39 2006/04/30 21:31:43 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
 
 #include "imp.h"
 #include <assert.h>
@@ -244,22 +244,24 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
                                if( ! IRC_WriteStrClient( Client, "%s", str )) return DISCONNECTED;
                        }
 
                                if( ! IRC_WriteStrClient( Client, "%s", str )) return DISCONNECTED;
                        }
 
+                       /* Get next channel ... */
+                       chan = Channel_Next(chan);
+               }
+
 #ifdef IRCPLUS
 #ifdef IRCPLUS
-                       if( strchr( Client_Flags( Client ), 'L' ))
-                       {
+               if (strchr(Client_Flags(Client), 'L')) {
 #ifdef DEBUG
 #ifdef DEBUG
-                               Log( LOG_DEBUG, "Synchronizing INVITE- and BAN-lists ..." );
+                       Log(LOG_DEBUG,
+                           "Synchronizing INVITE- and BAN-lists ...");
 #endif
 #endif
-                               /* Synchronize INVITE- and BAN-lists */
-                               if( ! Lists_SendInvites( Client )) return DISCONNECTED;
-                               if( ! Lists_SendBans( Client )) return DISCONNECTED;
-                       }
+                       /* Synchronize INVITE- and BAN-lists */
+                       if (! Lists_SendInvites(Client))
+                               return DISCONNECTED;
+                       if (! Lists_SendBans(Client))
+                               return DISCONNECTED;
+               }
 #endif
 
 #endif
 
-                       /* naechsten Channel suchen */
-                       chan = Channel_Next( chan );
-               }
-               
                return CONNECTED;
        }
        else if( Client_Type( Client ) == CLIENT_SERVER )
                return CONNECTED;
        }
        else if( Client_Type( Client ) == CLIENT_SERVER )