diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-24 16:06:51 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-24 16:06:51 +0000 |
commit | 272349a3e921ac880ad94f09508160915f7ffe9c (patch) | |
tree | ea69068a7dd0028d0c62a13c75fb6aa4ca9ef5e4 | |
parent | 22fdb2f3465b657250813cbd5453efd7e52f2777 (diff) |
When the mode sequence doesnt start with + or -, assume a +
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5009 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/mode.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index dfda8a8b7..8351ab2e0 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -351,6 +351,10 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool unsigned char handler_id = 0; int parameter_counter = 2; /* Index of first parameter */ + /* A mode sequence that doesnt start with + or -. Assume +. - Thanks for the suggestion spike (bug#132) */ + if ((*mode_sequence.begin() != '+') && (*mode_sequence.begin() != '-')) + mode_sequence.insert(0, "+"); + for (std::string::const_iterator letter = mode_sequence.begin(); letter != mode_sequence.end(); letter++) { unsigned char modechar = *letter; |