]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sethost.cpp
Fix these to use new hook system (u_listmode wasnt fixed yet)
[user/henk/code/inspircd.git] / src / modules / m_sethost.cpp
index 7ea03ebbca1bd0ac12487f9ec31470869a32917f..7f0b3e1aadc9344146971db983b77fa0197e23d3 100644 (file)
 
 /** Handle /SETHOST
  */
-class cmd_sethost : public Command
+class CommandSethost : public Command
 {
  private:
        char* hostmap;
  public:
-       cmd_sethost (InspIRCd* Instance, char* hmap) : Command(Instance,"SETHOST",'o',1), hostmap(hmap)
+       CommandSethost (InspIRCd* Instance, char* hmap) : Command(Instance,"SETHOST",'o',1), hostmap(hmap)
        {
                this->source = "m_sethost.so";
                syntax = "<new-hostname>";
@@ -63,15 +63,17 @@ class cmd_sethost : public Command
 
 class ModuleSetHost : public Module
 {
-       cmd_sethost* mycommand;
+       CommandSethost* mycommand;
        char hostmap[256];
  public:
        ModuleSetHost(InspIRCd* Me)
                : Module(Me)
        {       
                OnRehash(NULL,"");
-               mycommand = new cmd_sethost(ServerInstance, hostmap);
+               mycommand = new CommandSethost(ServerInstance, hostmap);
                ServerInstance->AddCommand(mycommand);
+               Implementation eventlist[] = { I_OnRehash };
+               ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
        void Implements(char* List)