diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-07 22:00:49 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-07 22:00:49 +0000 |
commit | f78a6a90b194acfbabe61795470cabbdc36a32f4 (patch) | |
tree | 845bf970a7aa8f3597d61eb0008e91a992beb25d /src/channels.cpp | |
parent | 0b14c8ef1c2db7cac78db4bb9db6fdb643f814ab (diff) |
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
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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); |