]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_userip.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / m_userip.cpp
index bfac36b1a5ce2534e0a1c6a5a5b48ba616f63669..97e4c92845aeeb4490084745d2795912ae7f1266 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for USERIP command */
-
 /** Handle /USERIP
  */
 class CommandUserip : public Command
@@ -61,8 +59,8 @@ class CommandUserip : public Command
                                                continue;
                                }
 
-                               retbuf = retbuf + u->nick + (IS_OPER(u) ? "*" : "") + "=";
-                               if (IS_AWAY(u))
+                               retbuf = retbuf + u->nick + (u->IsOper() ? "*" : "") + "=";
+                               if (u->IsAway())
                                        retbuf += "-";
                                else
                                        retbuf += "+";
@@ -87,28 +85,20 @@ class ModuleUserIP : public Module
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(cmd);
-               Implementation eventlist[] = { I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
-       }
-
-       virtual void On005Numeric(std::string &output)
-       {
-               output = output + " USERIP";
        }
 
-       virtual ~ModuleUserIP()
+       void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
        {
+               tokens["USERIP"];
        }
 
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides support for USERIP command",VF_VENDOR);
        }
-
 };
 
 MODULE_INIT(ModuleUserIP)
-