]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_showwhois.cpp
Improved strhashcomp with no allocations
[user/henk/code/inspircd.git] / src / modules / m_showwhois.cpp
index c16135679e9c667dd041600496e8f6543a1a6f33..dddd29406702a9eb20d2ff296ff99b1400b9b76a 100644 (file)
@@ -1,6 +1,7 @@
 using namespace std;
 
 // showwhois module by typobox43
+// Modified by Craig
 
 #include "users.h"
 #include "channels.h"
@@ -25,6 +26,11 @@ class ModuleShowwhois : public Module
                {
                }
 
+               void Implements(char* List)
+               {
+                       List[I_OnWhois] = List[I_OnExtendedMode] = 1;
+               }
+
                virtual Version GetVersion()
                {
                        return Version(1,0,0,3,VF_STATIC);
@@ -42,7 +48,7 @@ class ModuleShowwhois : public Module
 
                virtual void OnWhois(userrec* source, userrec* dest)
                {
-                       if(strchr(dest->modes,'W'))
+                       if((strchr(dest->modes,'W')) && (source != dest))
                        {
                                WriteServ(dest->fd,"NOTICE %s :*** %s (%s@%s) did a /whois on you.",dest->nick,source->nick,source->ident,source->host);
                        }