X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fusers.cpp;h=afc8f6f11bc17199f217cf5b862a8119fa88a97c;hb=7770cd985405c7630e9149fc08c314ec824a9c75;hp=12fb902fb99488bdb0c1051fcc170c55037e7566;hpb=55ad0595a714dcf07e94fe2fafc790c0be7a85a1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 12fb902fb..afc8f6f11 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) @@ -926,31 +927,9 @@ void User::ForEachNeighbor(ForEachNeighborHandler& handler, bool include_self) } } -void LocalUser::SendText(const std::string& line) -{ - Write(line); -} - -void RemoteUser::SendText(const std::string& line) -{ - ServerInstance->PI->PushToClient(this, line); -} - -void FakeUser::SendText(const std::string& line) -{ -} - -void User::SendText(const char *text, ...) -{ - std::string line; - VAFORMAT(line, text, text); - SendText(line); -} - void User::WriteRemoteNumeric(const Numeric::Numeric& numeric) { - const std::string& servername = (numeric.GetServer() ? numeric.GetServer()->GetName() : ServerInstance->Config->ServerName); - SendText(BuildNumeric(servername, this, numeric.GetNumeric(), numeric.GetParams())); + WriteNumeric(numeric); } /* return 0 or 1 depending if users u and u2 share one or more common channels