public:
ModuleAutoOp() : mh(this)
+ {
+ }
+
+ void init()
{
ServerInstance->Modules->AddService(mh);
mh.DoImplements(this);
Implementation list[] = { I_OnPostJoin, };
- ServerInstance->Modules->Attach(list, this, 1);
+ ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation));
}
void OnPostJoin(Membership *memb)
for(std::string::size_type i = modeline.length(); i > 1; --i) // we use "i > 1" instead of "i" so we skip the +
modechange.push_back(memb->user->nick);
if(modechange.size() >= 3)
- ServerInstance->SendMode(modechange,ServerInstance->FakeClient);
+ ServerInstance->SendGlobalMode(modechange, ServerInstance->FakeClient);
}
}
- void OnCleanup(int target_type, void* item)
- {
- mh.DoCleanup(target_type, item);
- }
-
void OnSyncChannel(Channel* chan, Module* proto, void* opaque)
{
mh.DoSyncChannel(chan, proto, opaque);