* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
void DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed SVSHOLD %s (set by %s %ld seconds ago)", this->nickname.c_str(), this->source, this->duration);
+ ServerInstance->SNO->WriteToSnoMask('x',"Removing expired SVSHOLD %s (set by %s %ld seconds ago)", this->nickname.c_str(), this->source, (long int)(ServerInstance->Time() - this->set_time));
}
const char* Displayable()
class ModuleSVSHold : public Module
{
- CommandSvshold *mycommand;
- SVSHoldFactory *s;
+ CommandSvshold cmd;
+ SVSHoldFactory s;
public:
- ModuleSVSHold(InspIRCd* Me) : Module(Me)
+ ModuleSVSHold(InspIRCd* Me) : Module(Me), cmd(Me), s(Me)
{
- s = new SVSHoldFactory(ServerInstance);
- ServerInstance->XLines->RegisterFactory(s);
- mycommand = new CommandSvshold(Me);
- ServerInstance->AddCommand(mycommand);
- Implementation eventlist[] = { I_OnUserPreNick, I_OnSyncOtherMetaData, I_OnDecodeMetaData, I_OnStats };
- ServerInstance->Modules->Attach(eventlist, this, 4);
+ ServerInstance->XLines->RegisterFactory(&s);
+ ServerInstance->AddCommand(&cmd);
+ Implementation eventlist[] = { I_OnUserPreNick, I_OnStats };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
}
virtual ~ModuleSVSHold()
{
ServerInstance->XLines->DelAll("SVSHOLD");
- ServerInstance->XLines->UnregisterFactory(s);
+ ServerInstance->XLines->UnregisterFactory(&s);
}
virtual Version GetVersion()