diff options
Diffstat (limited to 'src/modules/m_showwhois.cpp')
-rw-r--r-- | src/modules/m_showwhois.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 434d1b07f..57d496f1f 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -46,9 +46,9 @@ class WhoisNoticeCmd : public Command void HandleFast(User* dest, User* src) { - dest->WriteServ("NOTICE %s :*** %s (%s@%s) did a /whois on you", - dest->nick.c_str(), src->nick.c_str(), src->ident.c_str(), - dest->HasPrivPermission("users/auspex") ? src->host.c_str() : src->dhost.c_str()); + dest->WriteNotice("*** " + src->nick + " (" + src->ident + "@" + + (dest->HasPrivPermission("users/auspex") ? src->host : src->dhost) + + ") did a /whois on you"); } CmdResult Handle(const std::vector<std::string> ¶meters, User *user) @@ -79,7 +79,7 @@ class ModuleShowwhois : public Module { } - void init() + void init() CXX11_OVERRIDE { ConfigTag* tag = ServerInstance->Config->ConfValue("showwhois"); @@ -98,17 +98,17 @@ class ModuleShowwhois : public Module delete sw; } - Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { return Version("Allows opers to set +W to see when a user uses WHOIS on them",VF_OPTCOMMON|VF_VENDOR); } - void OnWhois(User* source, User* dest) + void OnWhois(User* source, User* dest) CXX11_OVERRIDE { if (!dest->IsModeSet('W') || source == dest) return; - if (!ShowWhoisFromOpers && IS_OPER(source)) + if (!ShowWhoisFromOpers && source->IsOper()) return; if (IS_LOCAL(dest)) @@ -125,7 +125,7 @@ class ModuleShowwhois : public Module ServerInstance->PI->SendEncapsulatedData(params); } } - }; MODULE_INIT(ModuleShowwhois) + |