From 4423aaf010ce6d30ddc19989371a861c6a17c825 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 12 Apr 2004 11:25:47 +0000 Subject: 'K' token fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@560 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index dd79bd0a1..607c79b83 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3915,7 +3915,7 @@ void handle_kill(char **parameters, int pcnt, userrec *user) { // remote kill WriteOpers("*** Remote kill: %s!%s@%s (%s)",user->nick,u->nick,u->ident,u->host,parameters[1]); - sprintf(killreason,"[%s] Killed (%s (%s))",u->server,user->nick,parameters[1]); + sprintf(killreason,"[%s] Killed (%s (%s))",ServerName,user->nick,parameters[1]); WriteCommonExcept(u,"QUIT :%s",killreason); // K token must go to ALL servers!!! char buffer[MAXBUF]; @@ -6272,6 +6272,7 @@ void handle_K(char token,char* params,serverrec* source,serverrec* reply, char* char* src = strtok(params," "); char* nick = strtok(NULL," :"); char* reason = strtok(NULL,"\r\n"); + char kreason[MAXBUF]; reason++; userrec* u = Find(nick); @@ -6279,10 +6280,10 @@ void handle_K(char token,char* params,serverrec* source,serverrec* reply, char* if ((user) && (u)) { - WriteTo(user, u, "KILL %s :%s!%s!%s!%s (%s)", u->nick, source->name,ServerName,user->dhost,user->nick,reason); + WriteTo(user, u, "KILL %s :%s!%s!%s!%s (%s)", u->nick, ServerName, reply->name, user->dhost,user->nick,reason); WriteOpers("*** Remote kill from %s by %s: %s!%s@%s (%s)",source->name,user->nick,u->nick,u->ident,u->host,reason); - snprintf(reason,MAXQUIT,"[%s] Killed (%s (%s))",source->name,user->nick,reason); - kill_link(u,reason); + snprintf(kreason,MAXBUF,"[%s] Killed (%s (%s))",reply->name,user->nick,reason); + kill_link(u,kreason); } } -- cgit v1.2.3