From: brain Date: Sun, 3 Apr 2005 17:24:05 +0000 (+0000) Subject: Fix to bug #36 reported by Yeti X-Git-Tag: v2.0.23~10686 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=2257e3266906fd3ec48b9290ed00d6ef3b897482;p=user%2Fhenk%2Fcode%2Finspircd.git Fix to bug #36 reported by Yeti git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@962 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/commands.cpp b/src/commands.cpp index 4ff6edc31..f3798b364 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -335,10 +335,16 @@ void handle_kill(char **parameters, int pcnt, userrec *user) { userrec *u = Find(parameters[0]); char killreason[MAXBUF]; - + log(DEBUG,"kill: %s %s",parameters[0],parameters[1]); if (u) { + int MOD_RESULT = 0; + FOREACH_RESULT(OnKill(user,u,parameters[1])); + if (MOD_RESULT) { + return; + } + if (strcmp(ServerName,u->server)) { // remote kill diff --git a/src/mode.cpp b/src/mode.cpp index eaee04f75..22e9816b3 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -1290,6 +1290,11 @@ void handle_mode(char **parameters, int pcnt, userrec *user) return; } } + if ((Ptr) && (!has_channel(user,Ptr))) + { + WriteServ(user->fd,"442 %s %s :You're not on that channel!",user->nick, Ptr->name); + return; + } process_modes(parameters,user,Ptr,cstatus(user,Ptr),pcnt,false,false,false); }