]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cgiirc.cpp
Argh, i give up
[user/henk/code/inspircd.git] / src / modules / m_cgiirc.cpp
index b30b9316b45d2875a5795fa68bc40d703c5e6e9e..c0739cb9c1adbd805b58173b58af0b4ae20f9587 100644 (file)
@@ -40,13 +40,13 @@ public:
 };
 typedef std::vector<CGIhost> CGIHostlist;
 
-class cmd_webirc : public Command
+class CommandWebirc : public Command
 {
        InspIRCd* Me;
        CGIHostlist Hosts;
        bool notify;
        public:
-               cmd_webirc(InspIRCd* Me, CGIHostlist &Hosts, bool notify) : Command(Me, "WEBIRC", 0, 4, true), Hosts(Hosts), notify(notify)
+               CommandWebirc(InspIRCd* Me, CGIHostlist &Hosts, bool notify) : Command(Me, "WEBIRC", 0, 4, true), Hosts(Hosts), notify(notify)
                {
                        this->source = "m_cgiirc.so";
                        this->syntax = "password client hostname ip";
@@ -123,7 +123,7 @@ class CGIResolver : public Resolver
 
 class ModuleCgiIRC : public Module
 {
-       cmd_webirc* mycommand;
+       CommandWebirc* mycommand;
        bool NotifyOpers;
        CGIHostlist Hosts;
 public:
@@ -131,19 +131,17 @@ public:
        {
                
                OnRehash(NULL,"");
-               mycommand=new cmd_webirc(Me, Hosts, NotifyOpers);
+               mycommand = new CommandWebirc(Me, Hosts, NotifyOpers);
                ServerInstance->AddCommand(mycommand);
-       }
 
-       void Implements(char* List)
-       {
-               List[I_OnRehash] = List[I_OnUserRegister] = List[I_OnCleanup] = List[I_OnSyncUserMetaData] = List[I_OnDecodeMetaData] = List[I_OnUserQuit] = List[I_OnUserConnect] = 1;
+               Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCleanup, I_OnSyncUserMetaData, I_OnDecodeMetaData, I_OnUserQuit, I_OnUserConnect };
+               ServerInstance->Modules->Attach(eventlist, this, 7);
        }
+
        
-       virtual Priority Prioritize()
+       virtual void Prioritize()
        {
-               // We want to get here before m_cloaking and m_hostchange etc
-               return PRIORITY_FIRST;
+               ServerInstance->Modules->SetPriority(this, I_OnUserConnect, PRIO_FIRST);
        }
 
        virtual void OnRehash(User* user, const std::string &parameter)