};
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";
class ModuleCgiIRC : public Module
{
- cmd_webirc* mycommand;
+ CommandWebirc* mycommand;
bool NotifyOpers;
CGIHostlist Hosts;
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 ¶meter)