+
+ return ServerInstance->HandleOnCheckExemption.Call(user, chan, restriction);
+ }
+};
+
+class ModuleExemptChanOps : public Module
+{
+ std::string defaults;
+ ExemptHandler eh;
+
+ public:
+
+ ModuleExemptChanOps() : eh(this)
+ {
+ }
+
+ void init()
+ {
+ ServerInstance->Modules->AddService(eh.ec);
+ Implementation eventlist[] = { I_OnRehash, I_OnSyncChannel };
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
+ ServerInstance->OnCheckExemption = &eh;
+
+ OnRehash(NULL);
+ }
+
+ ~ModuleExemptChanOps()
+ {
+ ServerInstance->OnCheckExemption = &ServerInstance->HandleOnCheckExemption;
+ }
+
+ Version GetVersion()
+ {
+ return Version("Provides the ability to allow channel operators to be exempt from certain modes.",VF_VENDOR);
+ }
+
+ void OnRehash(User* user)
+ {
+ eh.ec.DoRehash();
+ }
+
+ void OnSyncChannel(Channel* chan, Module* proto, void* opaque)
+ {
+ eh.ec.DoSyncChannel(chan, proto, opaque);