summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-08 19:13:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-08 19:13:48 +0000
commit1f83b592eae17726783d4cf7afebe36d96bb4b95 (patch)
treef1902757dc2223826c1cfad48af7e288d52129f2
parent2fe4636fa44ad48b801d0e38b892c0e47998327d (diff)
Tweaks to mode parser
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6265 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/mode.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index a7e8be620..4d6023c1c 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -386,8 +386,6 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
if ((*mode_sequence.begin() != '+') && (*mode_sequence.begin() != '-'))
mode_sequence.insert(0, "+");
- last_successful_state_change = (mode_sequence[0] == '-');
-
for (std::string::const_iterator letter = mode_sequence.begin(); letter != mode_sequence.end(); letter++)
{
unsigned char modechar = *letter;
@@ -408,12 +406,16 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
if ((!adding) || (!output_sequence.length()))
state_change = true;
adding = true;
+ if (!output_sequence.length())
+ last_successful_state_change = false;
continue;
break;
case '-':
if ((adding) || (!output_sequence.length()))
state_change = true;
adding = false;
+ if (!output_sequence.length())
+ last_successful_state_change = true;
continue;
break;
default: