mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 11:39:02 -04:00
cgiirc: Pass hosts to WEBIRC command on rehash. No fucking wonder this never worked except on module load. _ARGH_. Thanks to Jeremy for his help in tracking this down.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11528 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
6c5dc5e7b5
commit
c71801ebc4
@ -56,7 +56,7 @@ class CommandWebirc : public Command
|
||||
CGIHostlist Hosts;
|
||||
bool notify;
|
||||
public:
|
||||
CommandWebirc(InspIRCd* Instance, CGIHostlist &cHosts, bool bnotify) : Command(Instance, "WEBIRC", 0, 4, true), Hosts(cHosts), notify(bnotify)
|
||||
CommandWebirc(InspIRCd* Instance, bool bnotify) : Command(Instance, "WEBIRC", 0, 4, true), notify(bnotify)
|
||||
{
|
||||
this->source = "m_cgiirc.so";
|
||||
this->syntax = "password client hostname ip";
|
||||
@ -86,6 +86,11 @@ class CommandWebirc : public Command
|
||||
ServerInstance->SNO->WriteGlobalSno('a', "Connecting user %s tried to use WEBIRC, but didn't match any configured webirc blocks.", user->GetFullRealHost().c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
void SetHosts(CGIHostlist &phosts)
|
||||
{
|
||||
this->Hosts = phosts;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -141,9 +146,8 @@ class ModuleCgiIRC : public Module
|
||||
public:
|
||||
ModuleCgiIRC(InspIRCd* Me) : Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new CommandWebirc(Me, NotifyOpers);
|
||||
OnRehash(NULL);
|
||||
mycommand = new CommandWebirc(Me, Hosts, NotifyOpers);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
|
||||
Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCleanup, I_OnSyncUserMetaData, I_OnDecodeMetaData, I_OnUserDisconnect, I_OnUserConnect };
|
||||
@ -203,6 +207,8 @@ public:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
mycommand->SetHosts(Hosts);
|
||||
}
|
||||
|
||||
virtual void OnCleanup(int target_type, void* item)
|
||||
|
Loading…
x
Reference in New Issue
Block a user