diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-08 23:29:21 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-08 23:29:21 +0000 |
commit | 7e843c22e16c81054bad18073d24fe1a07026431 (patch) | |
tree | 44ca0213c7d7a80270b993fec1fbed275ec56424 /src/modules/m_override.cpp | |
parent | c440038736f749a56dbac1badee5b2f099286117 (diff) |
Update Event and Request APIs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11808 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_override.cpp')
-rw-r--r-- | src/modules/m_override.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 8162d45e3..c737be286 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -12,7 +12,6 @@ */ #include "inspircd.h" -#include "m_override.h" /* $ModDesc: Provides support for unreal-style oper-override */ @@ -31,12 +30,8 @@ class ModuleOverride : public Module // read our config options (main config file) OnRehash(NULL); ServerInstance->SNO->EnableSnomask('G', "GODMODE"); - if (!ServerInstance->Modules->PublishFeature("Override", this)) - { - throw ModuleException("m_override: Unable to publish feature 'Override'"); - } - Implementation eventlist[] = { I_OnRehash, I_OnPreMode, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPreTopicChange, I_OnRequest }; - ServerInstance->Modules->Attach(eventlist, this, 7); + Implementation eventlist[] = { I_OnRehash, I_OnPreMode, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPreTopicChange }; + ServerInstance->Modules->Attach(eventlist, this, 6); } void OnRehash(User* user) @@ -205,19 +200,8 @@ class ModuleOverride : public Module return MOD_RES_PASSTHRU; } - const char* OnRequest(Request* request) - { - if(strcmp(OVRREQID, request->GetId()) == 0) - { - OVRrequest* req = static_cast<OVRrequest*>(request); - return this->CanOverride(req->requser,req->reqtoken.c_str()) ? "yes":""; - } - return NULL; - } - ~ModuleOverride() { - ServerInstance->Modules->UnpublishFeature("Override"); ServerInstance->SNO->DisableSnomask('G'); } |