summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-02 19:34:57 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-02 19:34:57 +0000
commitc3b861b2507dd2ef52802c69a2d737925846e2e0 (patch)
tree0acd160336f53426b273af935f3ecb5189117cee /src/mode.cpp
parentd7c9583c8ec819444efdb326d15b2ff92a881089 (diff)
Added IS_SINGLE, see comment in include/inspircd.h
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3438 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 30000dfe2..f14c3bcb5 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -1460,10 +1460,10 @@ void cmd_mode::Handle (char **parameters, int pcnt, userrec *user)
if ((b[z] == '-') || (b[z] == '+'))
b[z] = '\0';
- if ((!b[0]) || (!strcmp(b,"+")) || (!strcmp(b,"-")))
+ if ((!*b) || (IS_SINGLE(b,"+")) || (IS_SINGLE(b,"-")))
return;
- if (strcmp(b,""))
+ if (*b)
{
WriteTo(user, dest, "MODE %s :%s", dest->nick, b);
FOREACH_MOD(I_OnMode,OnMode(user, dest, TYPE_USER, b));
@@ -1711,7 +1711,7 @@ void ModeParser::ServerMode(char **parameters, int pcnt, userrec *user)
if ((b[z] == '-') || (b[z] == '+'))
b[z] = '\0';
- if ((!b[0]) || (!strcmp(b,"+")) || (!strcmp(b,"-")))
+ if ((!*b) || (IS_SINGLE(b,'+')) || (IS_SINGLE(b,'-')))
return;
if (*b)