summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-06 03:11:32 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-06 03:11:32 +0000
commitf9c3f95cb7bdb84731e482788d4cb35cc0cfefc5 (patch)
tree4acabc250080d3a4e8a3eb6f49af8788f6e22ba9 /src/mode.cpp
parent6ac0d029123843666db8624fdc1cb72a08578d50 (diff)
Tidying of some vars here and there
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3485 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index b018d9117..8a85a621b 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -449,8 +449,7 @@ std::string ModeParser::CompressModes(std::string modes,bool channelmodes)
void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int status, int pcnt, bool servermode, bool silent, bool local)
{
- if (!parameters) {
- log(DEFAULT,"*** BUG *** process_modes was given an invalid parameter");
+ if ((!parameters) || (pcnt < 2)) {
return;
}
@@ -463,11 +462,6 @@ void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int
char* r = NULL;
bool k_set = false, l_set = false, previously_set_l = false, previously_unset_l = false, previously_set_k = false, previously_unset_k = false;
- if (pcnt < 2)
- {
- return;
- }
-
int MOD_RESULT = 0;
if (IS_LOCAL(user))
@@ -477,8 +471,6 @@ void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int
return;
}
- log(DEBUG,"process_modes: start: parameters=%d",pcnt);
-
char* modelist = parameters[1]; /* mode list, e.g. +oo-o *
* parameters[2] onwards are parameters for
* modes that require them :) */
@@ -496,9 +488,7 @@ void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int
while (modelist[len-1] == ' ')
modelist[--len] = '\0';
- char* modechar;
-
- for (modechar = (modelist + 1); *modechar; ptr++, modechar++)
+ for (char* modechar = (modelist + 1); *modechar; ptr++, modechar++)
{
r = NULL;