X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_showwhois.cpp;h=265a0f7753e96a65c3161310e229f60b173bfd90;hb=dd501fba3fd7e5806186b79fa1d7c2b464884e69;hp=4356dbcfd0056cd1fe1cd9caa4a20df30df046c8;hpb=e21ee18e62aecee6d27a0f9ba497a52688cb8349;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 4356dbcfd..265a0f775 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -51,14 +51,14 @@ class SeeWhois : public ModeHandler class ModuleShowwhois : public Module { - + SeeWhois* sw; public: ModuleShowwhois(InspIRCd* Me) : Module(Me) { - + sw = new SeeWhois(ServerInstance); if (!ServerInstance->Modes->AddMode(sw)) throw ModuleException("Could not add new modes!"); @@ -75,7 +75,7 @@ class ModuleShowwhois : public Module virtual Version GetVersion() { - return Version(1,1,0,3,VF_COMMON|VF_VENDOR,API_VERSION); + return Version("$Id$",VF_COMMON|VF_VENDOR,API_VERSION); } virtual void OnWhois(User* source, User* dest) @@ -84,17 +84,12 @@ class ModuleShowwhois : public Module { if (IS_LOCAL(dest)) { - dest->WriteServ("NOTICE %s :*** %s (%s@%s) did a /whois on you.",dest->nick,source->nick,source->ident,source->host); + dest->WriteServ("NOTICE %s :*** %s (%s@%s) did a /whois on you.", dest->nick.c_str(), source->nick.c_str(), source->ident.c_str(), source->host.c_str()); } else { - std::deque params; - params.push_back(dest->nick); - std::string msg = ":"; - msg = msg + dest->server + " NOTICE " + dest->nick + " :*** " + source->nick + " (" + source->ident + "@" + source->host + ") did a /whois on you."; - params.push_back(msg); - Event ev((char *) ¶ms, NULL, "send_push"); - ev.Send(ServerInstance); + std::string msg = std::string(":") + dest->server + " NOTICE " + dest->nick + " :*** " + source->nick + " (" + source->ident + "@" + source->host.c_str() + ") did a /whois on you."; + ServerInstance->PI->PushToClient(dest, msg); } } }