class ModuleInvisible : public Module
{
private:
- InvisibleMode* qm;
- InvisibleDeOper* ido;
+ InvisibleMode qm;
+ InvisibleDeOper ido;
public:
ModuleInvisible(InspIRCd* Me)
- : Module(Me)
+ : Module(Me), qm(Me), ido(Me)
{
conf = new ConfigReader(ServerInstance);
- qm = new InvisibleMode(ServerInstance);
- if (!ServerInstance->Modes->AddMode(qm))
+ if (!ServerInstance->Modes->AddMode(&qm))
throw ModuleException("Could not add new modes!");
- ido = new InvisibleDeOper(ServerInstance);
- if (!ServerInstance->Modes->AddModeWatcher(ido))
+ if (!ServerInstance->Modes->AddModeWatcher(&ido))
throw ModuleException("Could not add new mode watcher on usermode +o!");
/* Yeah i know people can take this out. I'm not about to obfuscate code just to be a pain in the ass. */
virtual ~ModuleInvisible()
{
- ServerInstance->Modes->DelMode(qm);
- ServerInstance->Modes->DelModeWatcher(ido);
- delete qm;
- delete ido;
+ ServerInstance->Modes->DelMode(&qm);
+ ServerInstance->Modes->DelModeWatcher(&ido);
delete conf;
};
virtual Version GetVersion();
- virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent);
- virtual void OnRehash(User* user, const std::string ¶meter);
+ virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created);
+ virtual void OnRehash(User* user);
void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent);
void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message);
bool OnHostCycle(User* user);
return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
}
-void ModuleInvisible::OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
+void ModuleInvisible::OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created)
{
if (user->IsModeSet('Q'))
{
}
}
-void ModuleInvisible::OnRehash(User* user, const std::string ¶meter)
+void ModuleInvisible::OnRehash(User* user)
{
delete conf;
conf = new ConfigReader(ServerInstance);