]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_swhois.cpp
Remove CMD_LOCALONLY, enforce use of GetRouting for routed commands
[user/henk/code/inspircd.git] / src / modules / m_swhois.cpp
index 9939a83a2c281e626d3d14c479d88e6ea8db76c9..ebff25cb838ace4ad742134d54e06c07d7b269da 100644 (file)
@@ -21,9 +21,8 @@ class CommandSwhois : public Command
 {
 
  public:
-       CommandSwhois (InspIRCd* Instance) : Command(Instance,"SWHOIS","o",2, 2)
+       CommandSwhois (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SWHOIS","o",2, 2)
        {
-               this->source = "m_swhois.so";
                syntax = "<nick> :<swhois>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
@@ -73,7 +72,7 @@ class CommandSwhois : public Command
                        delete text;
                }
 
-               return CMD_LOCALONLY;
+               return CMD_SUCCESS;
        }
 
 };
@@ -85,7 +84,7 @@ class ModuleSWhois : public Module
        ConfigReader* Conf;
 
  public:
-       ModuleSWhois(InspIRCd* Me) : Module(Me), cmd(Me)
+       ModuleSWhois(InspIRCd* Me) : Module(Me), cmd(Me, this)
        {
 
                Conf = new ConfigReader(ServerInstance);
@@ -102,7 +101,7 @@ class ModuleSWhois : public Module
 
 
        // :kenny.chatspike.net 320 Brain Azhrarn :is getting paid to play games.
-       int OnWhoisLine(User* user, User* dest, int &numeric, std::string &text)
+       ModResult OnWhoisLine(User* user, User* dest, int &numeric, std::string &text)
        {
                /* We use this and not OnWhois because this triggers for remote, too */
                if (numeric == 312)
@@ -116,7 +115,7 @@ class ModuleSWhois : public Module
                }
 
                /* Dont block anything */
-               return 0;
+               return MOD_RES_PASSTHRU;
        }
 
        // Whenever the linking module wants to send out data, but doesnt know what the data