From f78a6a90b194acfbabe61795470cabbdc36a32f4 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 7 Apr 2008 22:00:49 +0000 Subject: This should probably be tested, but makes a whole lot more sense like this (users.cpp) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9404 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/channels.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index 49c289784..effc47d73 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -523,7 +523,7 @@ long Channel::PartUser(User *user, const char* reason) return this->GetUserCounter(); } -long Channel::ServerKickUser(User* user, const char* reason, bool triggerevents) +long Channel::ServerKickUser(User* user, const char* reason, bool triggerevents, const char* servername) { bool silent = false; @@ -539,6 +539,9 @@ long Channel::ServerKickUser(User* user, const char* reason, bool triggerevents) } } + if (servername == NULL) + servername = ServerInstance->Config->ServerName; + if (triggerevents) { FOREACH_MOD(I_OnUserKick,OnUserKick(NULL, user, this, reason, silent)); @@ -548,7 +551,7 @@ long Channel::ServerKickUser(User* user, const char* reason, bool triggerevents) if (i != user->chans.end()) { if (!silent) - this->WriteChannelWithServ(ServerInstance->Config->ServerName, "KICK %s %s :%s", this->name, user->nick, reason); + this->WriteChannelWithServ(servername, "KICK %s %s :%s", this->name, user->nick, reason); user->chans.erase(i); this->RemoveAllPrefixes(user); -- cgit v1.2.3