Module: ngircd.git Branch: master Commit: 2dfa24d2fa42bdfece472da57c823a3968230fae URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=2dfa2...
Author: Alexander Barton alex@barton.de Date: Mon Aug 1 22:09:40 2011 +0200
Handle unknown user modes on server links
---
src/ngircd/irc-mode.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index 7861868..b469a16 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -242,16 +242,25 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target ) 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)