diff options
-rw-r--r-- | src/mode.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_noctcp.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_nokicks.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_redirect.cpp | 1 |
5 files changed, 13 insertions, 7 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index e7ed4badf..1f03a20bf 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -40,6 +40,8 @@ using namespace std; extern int MODCOUNT; extern vector<Module*> modules; extern vector<ircd_module*> factory; +extern std::vector<std::string> module_names; + extern int LogLevel; extern char ServerName[MAXBUF]; @@ -1006,7 +1008,7 @@ bool process_module_umode(char umode, userrec* source, void* dest, bool adding) { if (modules[i]->OnExtendedMode(source,(void*)dest,umode,MT_CLIENT,adding,p)) { - log(DEBUG,"Module claims umode %c",umode); + log(DEBUG,"Module %s claims umode %c",module_names[i].c_str(),umode); return true; } } diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 7639b1651..b467c01d5 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -67,8 +67,11 @@ class ModuleCloaking : public Module // so we must be VERY careful to only act upon modes which // we have claimed ourselves. This is a feature to allow // modules to 'spy' on extended mode activity if they so wish. + log(DEBUG,"modechar=%c type=%d MT_CLIENT=%d",modechar,type,MT_CLIENT); + if ((modechar == 'x') && (type == MT_CLIENT)) { + Srv->Log(DEBUG,"Mode x being handled"); // OnExtendedMode gives us a void* as the target, we must cast // it into a userrec* or a chanrec* depending on the value of // the 'type' parameter (MT_CLIENT or MT_CHANNEL) @@ -85,7 +88,7 @@ class ModuleCloaking : public Module // will not work if the user has only one level of domain // naming in their hostname (e.g. if they are on a lan or // are connecting via localhost) -- this doesnt matter much. - if (strstr(dest->host,".")) + if (strchr(dest->host,'.')) { // in inspircd users have two hostnames. A displayed // hostname which can be modified by modules (e.g. diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 3a7959277..bf7cb8d62 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -4,7 +4,7 @@ #include "channels.h" #include "modules.h" -/* $ModDesc: Provides support for unreal-style channel mode +Q */ +/* $ModDesc: Provides support for unreal-style channel mode +c */ class ModuleNoCTCP : public Module { @@ -20,7 +20,7 @@ class ModuleNoCTCP : public Module virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text) { - if (target_type == TARGET_CHANNEL) + if (target_type == TYPE_CHANNEL) { chanrec* c = (chanrec*)dest; if (c->IsCustomModeSet('C')) @@ -37,7 +37,7 @@ class ModuleNoCTCP : public Module virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text) { - if (target_type == TARGET_CHANNEL) + if (target_type == TYPE_CHANNEL) { chanrec* c = (chanrec*)dest; if (c->IsCustomModeSet('C')) diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index 5050101e0..b90932e6c 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -8,7 +8,7 @@ class ModuleNoKicks : public Module { - ConfigReader *Conf; + Server *Srv; public: @@ -32,7 +32,7 @@ class ModuleNoKicks : public Module else { // nobody else can (not even opers with override, and founders) - WriteServ(source->fd,"484 %s %s :Can't kick user %s from channel (+Q set)",source->nick, c->name,dest->nick); + WriteServ(source->fd,"484 %s %s :Can't kick user %s from channel (+Q set)",source->nick, channel->name,dest->nick); return ACR_DENY; } } diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index aab9e2750..307afb3a3 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -38,6 +38,7 @@ class ModuleRedirect : public Module } return 1; } + return 0; } virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) |