diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mode.cpp | 11 | ||||
-rw-r--r-- | src/modules/m_timedbans.cpp | 2 | ||||
-rwxr-xr-x | src/svn-rev.sh | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 6ce15e203..1b59a1352 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -453,6 +453,7 @@ void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int } char outlist[MAXBUF]; + char mlist[MAXBUF]; char *outpars[32]; int param = 2; int pc = 0; @@ -470,9 +471,10 @@ void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int return; } - char* modelist = parameters[1]; /* mode list, e.g. +oo-o * - * parameters[2] onwards are parameters for - * modes that require them :) */ + std::string tidied = this->CompressModes(parameters[1],true); + strlcpy(mlist,tidied.c_str(),MAXBUF); + char* modelist = mlist; + *outlist = *modelist; char* outl = outlist+1; @@ -480,9 +482,6 @@ void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int log(DEBUG,"process_modes: modelist: %s",modelist); - std::string tidied = this->CompressModes(modelist,true); - strlcpy(modelist,tidied.c_str(),MAXBUF); - int len = tidied.length(); while (modelist[len-1] == ' ') modelist[--len] = '\0'; diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 0af4b7d72..470d0edee 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -83,7 +83,7 @@ class cmd_tban : public command_t char duration[MAXBUF]; snprintf(duration,MAXBUF,"%lu",Srv->CalcDuration(parameters[1])); std::string mask = parameters[2]; - char *setban[3]; + char *setban[32]; setban[0] = parameters[0]; setban[1] = "+b"; setban[2] = parameters[2]; diff --git a/src/svn-rev.sh b/src/svn-rev.sh index 0df5e545b..7b85fd8af 100755 --- a/src/svn-rev.sh +++ b/src/svn-rev.sh @@ -1 +1 @@ -echo 3513 +echo 3515 |