repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 2fd42667c2a064bab6e28523a7e68383604a1e15:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 2fd42667c2a064bab6e28523a7e68383604a1e15
Author: Alexander Barton 
Date:   Mon Aug 1 22:30:00 2011 +0200

    Handle unknown channel modes on server links

diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c
index b469a16911f65292b0fddb3df21574dcaee0c642..
index ..326c1046f6d5f82597212ea4ae38f88bee104e82 100644
--- a/src/ngircd/irc-mode.c
+++ b/src/ngircd/irc-mode.c
@@ -650,18 +650,25 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 			}
 			break;
 		default:
-			Log(LOG_DEBUG,
-			    "Unknown mode \"%c%c\" from \"%s\" on %s!?",
-			    set ? '+' : '-', *mode_ptr, Client_ID(Origin),
-			    Channel_Name(Channel));
-			if (Client_Type(Client) != CLIENT_SERVER)
+			if (Client_Type(Client) != CLIENT_SERVER) {
+				Log(LOG_DEBUG,
+				    "Unknown mode \"%c%c\" from \"%s\" on %s!?",
+				    set ? '+' : '-', *mode_ptr,
+				    Client_ID(Origin), Channel_Name(Channel));
 				connected = IRC_WriteStrClient(Origin,
 					ERR_UMODEUNKNOWNFLAG2_MSG,
 					Client_ID(Origin),
 					set ? '+' : '-', *mode_ptr);
-			x[0] = '\0';
-			goto chan_exit;
-		}	/* switch() */
+				x[0] = '\0';
+				goto chan_exit;
+			} else {
+				Log(LOG_DEBUG,
+				    "Handling unknown mode \"%c%c\" from \"%s\" on %s ...",
+				    set ? '+' : '-', *mode_ptr,
+				    Client_ID(Origin), Channel_Name(Channel));
+				x[0] = *mode_ptr;
+			}
+		}

 		if (!connected)
 			break;

-----END OF PAGE-----