Commit Diff


commit - 1ed602eb47ef7c9257559209407a5b9363c532f8
commit + 2dfa24d2fa42bdfece472da57c823a3968230fae
blob - 7861868d7bac8e4885466932f05473d6128036d2
blob + b469a16911f65292b0fddb3df21574dcaee0c642
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
@@ -242,16 +242,25 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Ori
 				x[0] = 'x';
 			break;
 		default:
-			Log(LOG_DEBUG, "Unknown mode \"%c%c\" from \"%s\"!?",
-			    set ? '+' : '-', *mode_ptr, Client_ID(Origin));
-			if (Client_Type(Client) != CLIENT_SERVER)
+			if (Client_Type(Client) != CLIENT_SERVER) {
+				Log(LOG_DEBUG,
+				    "Unknown mode \"%c%c\" from \"%s\"!?",
+				    set ? '+' : '-', *mode_ptr,
+				    Client_ID(Origin));
 				ok = IRC_WriteStrClient(Origin,
 							ERR_UMODEUNKNOWNFLAG2_MSG,
 							Client_ID(Origin),
 							set ? '+' : '-',
 							*mode_ptr);
-			x[0] = '\0';
-			goto client_exit;
+				x[0] = '\0';
+				goto client_exit;
+			} else {
+				Log(LOG_DEBUG,
+				    "Handling unknown mode \"%c%c\" from \"%s\" for \"%s\" ...",
+				    set ? '+' : '-', *mode_ptr,
+				    Client_ID(Origin), Client_ID(Target));
+				x[0] = *mode_ptr;
+			}
 		}
 
 		if (!ok)