summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-10 20:50:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-10 20:50:51 +0000
commit07ccbd0fb442ddc7cb6647def7c64cb1de9cc1e8 (patch)
treef9b7727be44bd536ed37495376e29bbce5b5407a /src/inspircd.cpp
parent3013fd48407d6b3c89f6807911b154d785a5b854 (diff)
More fixes to cross-server mode handling
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@512 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index ba511e583..904cae4be 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -6007,6 +6007,18 @@ void handle_m(char token,char* params,serverrec* source,serverrec* reply, char*
char* pars[128];
char original[MAXBUF];
strncpy(original,params,MAXBUF);
+
+ if (!strchr(params,' '))
+ {
+ WriteOpers("WARNING! 'm' token in data stream without any parameters! Something fishy is going on!");
+ return;
+ }
+
+ char* o = original;
+ while (o != ' ')
+ o++;
+ o++;
+
int index = 0;
char* src = strtok(params," ");
@@ -6027,12 +6039,12 @@ void handle_m(char token,char* params,serverrec* source,serverrec* reply, char*
if (FindChan(pars[0]))
{
log(DEBUG,"Target is channel");
- WriteChannelLocal(FindChan(pars[0]), user, "MODE %s",original);
+ WriteChannelLocal(FindChan(pars[0]), user, "MODE %s",o);
}
if (Find(pars[0]))
{
log(DEBUG,"Target is nick");
- WriteTo(user,Find(pars[0]),"MODE %s",original);
+ WriteTo(user,Find(pars[0]),"MODE %s",o);
}
}
}