From acf2c3bc71321cac71ef1dbc7c26c89a7dd8a076 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 10 Apr 2004 20:35:16 +0000 Subject: Fix to 'm' handling in server to server links git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@509 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5b7eecbb7..8a25bd261 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3526,7 +3526,7 @@ void merge_mode2(char **parameters, int pcnt, userrec* user) Ptr = FindChan(parameters[0]); if (Ptr) { - process_modes(parameters,user,Ptr,STATUS_OP,pcnt,true,true); + process_modes(parameters,user,Ptr,STATUS_OP,pcnt,false,true); } } @@ -6004,7 +6004,7 @@ void handle_M(char token,char* params,serverrec* source,serverrec* reply, char* void handle_m(char token,char* params,serverrec* source,serverrec* reply, char* udp_host,int udp_port) { char* pars[128]; - char original[MAXBUF],target[MAXBUF]; + char original[MAXBUF]; strncpy(original,params,MAXBUF); int index = 0; @@ -6020,14 +6020,15 @@ void handle_m(char token,char* params,serverrec* source,serverrec* reply, char* pars[index++] = parameter; parameter = strtok(NULL," "); } + merge_mode2(pars,--index,user); - if (FindChan(target)) + if (FindChan(pars[0])) { - WriteChannelLocal(FindChan(target), user, "MODE %s",original); + WriteChannelLocal(FindChan(pars[0]), user, "MODE %s",original); } - if (Find(target)) + if (Find(pars[0])) { - WriteTo(user,Find(target),"MODE %s",original); + WriteTo(user,Find(pars[0]),"MODE %s",original); } } } -- cgit v1.2.3