summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-03-29 16:22:07 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-03-29 16:22:07 +0200
commit7d37139ba6816cd8bf5161f8f0ae7a508ddd4619 (patch)
treeb0e6a34532cce56dbd8177f0e8753eaa632f15d8 /src
parentc0514526561e5fde6db765e294c19e0aaee15e1e (diff)
Handle numerics with a source other than the local server in User::WriteNumeric()
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 12fb902fb..e1bda1ad3 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -811,7 +811,8 @@ void User::WriteNumeric(const Numeric::Numeric& numeric)
if (MOD_RESULT == MOD_RES_DENY)
return;
- this->Write(BuildNumeric(ServerInstance->Config->ServerName, this, numeric.GetNumeric(), numeric.GetParams()));
+ const std::string& servername = (numeric.GetServer() ? numeric.GetServer()->GetName() : ServerInstance->Config->ServerName);
+ this->Write(BuildNumeric(servername, this, numeric.GetNumeric(), numeric.GetParams()));
}
void User::WriteFrom(User *user, const std::string &text)