From 92974819e3bf1c3a97b83f6f4ccc612283120794 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 17 Jan 2010 16:00:02 +0000 Subject: Change more modules to VF_OPTCOMMON and assert identical charsets in m_nationalchars git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12277 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_showwhois.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/modules/m_showwhois.cpp') diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 9cfa76008..2b27de388 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -65,9 +65,10 @@ class WhoisNoticeCmd : public Command CmdResult Handle(const std::vector ¶meters, User *user) { User* dest = ServerInstance->FindNick(parameters[0]); + User* source = ServerInstance->FindNick(parameters[1]); - if (IS_LOCAL(dest)) - HandleFast(dest, user); + if (IS_LOCAL(dest) && source) + HandleFast(dest, source); return CMD_SUCCESS; } @@ -100,12 +101,12 @@ class ModuleShowwhois : public Module delete sw; } - virtual Version GetVersion() + Version GetVersion() { - return Version("Allows opers to set +W to see when a user uses WHOIS on them",VF_COMMON|VF_VENDOR); + return Version("Allows opers to set +W to see when a user uses WHOIS on them",VF_OPTCOMMON|VF_VENDOR); } - virtual void OnWhois(User* source, User* dest) + void OnWhois(User* source, User* dest) { if (!dest->IsModeSet('W') || source == dest) return; @@ -122,6 +123,7 @@ class ModuleShowwhois : public Module std::vector params; params.push_back(dest->server); params.push_back("WHOISNOTICE"); + params.push_back(source->uuid); params.push_back(dest->uuid); ServerInstance->PI->SendEncapsulatedData(params); } -- cgit v1.2.3