]> arthur.barton.de Git - ngircd.git/commitdiff
From: Rolf Eike Beer <eike@sf-mail.de>
authorFlorian Westphal <fw@strlen.de>
Tue, 26 Feb 2008 12:07:41 +0000 (12:07 +0000)
committerFlorian Westphal <fw@strlen.de>
Tue, 26 Feb 2008 12:07:41 +0000 (12:07 +0000)
Fix sending of JOINs between servers

I found a bug in "sending join between servers".
This does hit only operators that join a channel with at least 2 servers active in the net
the server the oper connects to sends "channel^Go" to the other servers
the other server first searches for the channel and then strips the modes from the channel name
he has to do the other way round: first strip and then check the channel name.

ChangeLog
src/ngircd/irc-channel.c

index 0b07949bd9e5fb659766c337743789e1fc7b739a..e717f2664c7b970316a8bbb94ba79deda4dd8521 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,8 @@
                                -- ChangeLog --
 ngIRCd 0.11.1
 
+ - Fix sending of JOINs between servers when remote server appended mode
+   flags. (Rolf Eike Beer) [from HEAD]
  - send "G" instead of "H" flag in WHO replies (reported by Dana Dahlstrom).
  - Under some circumstances ngIRCd issued
  channel MODE message with a trailing space. (Dana Dahlstrom) [from HEAD]
@@ -738,4 +740,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: ChangeLog,v 1.332.2.8 2008/02/26 12:06:57 fw Exp $
+$Id: ChangeLog,v 1.332.2.9 2008/02/26 12:07:41 fw Exp $
index 39ef83d383a98ce6430d13631149c7e85c3b513d..139f5061ce6b8afa6777b1760593db2b076d8c40 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-channel.c,v 1.40.2.1 2008/01/07 11:42:14 fw Exp $";
+static char UNUSED id[] = "$Id: irc-channel.c,v 1.40.2.2 2008/02/26 12:07:41 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -79,6 +79,14 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
        {
                chan = NULL; flags = NULL;
 
+               if (Client_Type(Client) == CLIENT_SERVER) {
+                       flags = strchr( channame, 0x7 );
+                       if( flags ) {
+                               *flags = '\0';
+                               flags++;
+                       }
+               }
+
                /* wird der Channel neu angelegt? */
                if( Channel_Search( channame )) {
                        is_new_chan = false;
@@ -92,18 +100,6 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
                        is_new_chan = true;
                }
 
-               /* Hat ein Server Channel-User-Modes uebergeben? */
-               if( Client_Type( Client ) == CLIENT_SERVER )
-               {
-                       /* Channel-Flags extrahieren */
-                       flags = strchr( channame, 0x7 );
-                       if( flags )
-                       {
-                               *flags = '\0';
-                               flags++;
-                       }
-               }
-
                /* Local client? */
                if( Client_Type( Client ) == CLIENT_USER )
                {