mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 11:39:02 -04:00
Add OnExpireLine hook to xline db stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8677 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
6f84254ed6
commit
fd71f2ac19
@ -24,8 +24,8 @@ class ModuleXLineDB : public Module
|
||||
public:
|
||||
ModuleXLineDB(InspIRCd* Me) : Module(Me)
|
||||
{
|
||||
Implementation eventlist[] = { I_OnAddLine, I_OnDelLine };
|
||||
ServerInstance->Modules->Attach(eventlist, this, 2);
|
||||
Implementation eventlist[] = { I_OnAddLine, I_OnDelLine, I_OnExpireLine };
|
||||
ServerInstance->Modules->Attach(eventlist, this, 3);
|
||||
|
||||
reading_db = true;
|
||||
ReadDatabase();
|
||||
@ -58,6 +58,16 @@ class ModuleXLineDB : public Module
|
||||
* @param line the line being deleted
|
||||
*/
|
||||
void OnDelLine(User* source, XLine* line)
|
||||
{
|
||||
RemoveLine(line);
|
||||
}
|
||||
|
||||
void OnExpireLine(XLine *line)
|
||||
{
|
||||
RemoveLine(line);
|
||||
}
|
||||
|
||||
void RemoveLine(XLine *line)
|
||||
{
|
||||
ServerInstance->Log(DEBUG, "xlinedb: Removing a line");
|
||||
for (std::vector<XLine *>::iterator i = xlines.begin(); i != xlines.end(); i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user