/* m_unreal_privdeaf: Add support for umode +D * * Copyright 2016 Michael Hazell * * You may use this module under the terms of docs/COPYING, * located in the Anope source directory */ #include "module.h" class ProtoUnrealPrivDeaf : public Module { public: ProtoUnrealPrivDeaf(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, THIRD) { this->SetAuthor("Techman"); this->SetVersion("1.0.1"); if (!ModuleManager::FindModule("unreal") || !ModuleManager::FindModule("unreal4") || !IRCD) throw ModuleException("This module is only designed to work with UnrealIRCd; aborting..."); UserMode *um = ModeManager::FindUserModeByChar('D'); if (um) throw ModuleException("A user mode with character D was found; aborting..."); ModeManager::AddUserMode(new UserMode("PRIVDEAF", 'D')); } ~ProtoUnrealPrivDeaf() { UserMode *um = ModeManager::FindUserModeByChar('D'); if (um) ModeManager::RemoveUserMode(um); Log(this) << "Anope support for Unreal PRIVDEAF (+D) was unloaded."; } }; MODULE_INIT(ProtoUnrealPrivDeaf)