diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-03 13:38:47 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-03 13:38:47 +0000 |
commit | 6aecd9cfa70f86af2dc981c63eb8ec839a416abb (patch) | |
tree | 81e57239cbbc7632022f0ce71fb71efcef101b65 | |
parent | 45d179acdd77c2c9469f19d0a053059a75ea03d7 (diff) |
Fixed empty modes from nickserv
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1294 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/mode.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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; |