From 6aecd9cfa70f86af2dc981c63eb8ec839a416abb Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 3 May 2005 13:38:47 +0000 Subject: Fixed empty modes from nickserv git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1294 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index 610ea21e4..e0c4d21db 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -2087,12 +2087,15 @@ void merge_mode2(char **parameters, int pcnt, userrec* user) if ((b[z] == '-') || (b[z] == '+')) b[z] = '\0'; - if ((!strcmp(b,"+")) || (!strcmp(b,"-"))) - return; - // was sending 'b' - WriteTo(user,dest,"MODE %s :%s",dest->nick,b); - log(DEBUG,"Sent: :%s MODE %s",user->nick,b); + if ((!b[0]) || (!strcmp(b,"+")) || (!strcmp(b,"-"))) + return; + + if (strcmp(b,"")) + { + WriteTo(user,dest,"MODE %s :%s",dest->nick,b); + log(DEBUG,"Sent: :%s MODE %s",user->nick,b); + } if (strlen(dmodes)>MAXMODES) { @@ -2101,7 +2104,6 @@ void merge_mode2(char **parameters, int pcnt, userrec* user) log(DEBUG,"Stripped mode line"); log(DEBUG,"Line dest is now %s",dmodes); strlcpy(dest->modes,dmodes,MAXMODES); - } return; -- cgit v1.2.3