From 1f83b592eae17726783d4cf7afebe36d96bb4b95 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 8 Jan 2007 19:13:48 +0000 Subject: Tweaks to mode parser git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6265 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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: -- cgit v1.2.3