From 7d37139ba6816cd8bf5161f8f0ae7a508ddd4619 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 29 Mar 2016 16:22:07 +0200 Subject: Handle numerics with a source other than the local server in User::WriteNumeric() --- src/users.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/users.cpp') 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) -- cgit v1.3.1-10-gc9f91