diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_sqloper.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_operjoin.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_opermodes.cpp | 10 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index 14c373f28..aefc8528d 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -172,6 +172,7 @@ class ModuleSQLOper : public Module WriteServ(user->fd,"MODE %s :+o",user->nick); FOREACH_MOD(I_OnOper,OnOper(user,rowresult->GetField("type"))); AddOper(user); + FOREACH_MOD(I_OnPostOper,OnPostOper(user,rowresult->GetField("type"))); log(DEFAULT,"OPER: %s!%s@%s opered as type: %s",user->nick,user->ident,user->host,rowresult->GetField("type").c_str()); } break; diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp index 1e767bd86..01be11587 100644 --- a/src/modules/m_operjoin.cpp +++ b/src/modules/m_operjoin.cpp @@ -27,7 +27,13 @@ class ModuleOperjoin : public Module void Implements(char* List) { - List[I_OnOper] = 1; + List[I_OnPostOper] = List[I_OnRehash] = 1; + } + + virtual void OnRehash(std::string parameter) + { + delete Conf; + Conf = new ConfigReader; } virtual ~ModuleOperjoin() @@ -40,7 +46,7 @@ class ModuleOperjoin : public Module return Version(1,0,0,1,VF_VENDOR); } - virtual void OnOper(userrec* user, std::string opertype) + virtual void OnPostOper(userrec* user, std::string opertype) { if(operChan != "") { diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index a49cb34e8..c7ca62a69 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -40,7 +40,13 @@ class ModuleModesOnOper : public Module void Implements(char* List) { - List[I_OnOper] = 1; + List[I_OnPostOper] = List[I_OnRehash] = 1; + } + + virtual void OnRehash(std::string parameter) + { + delete Conf; + Conf = new ConfigReader; } virtual ~ModuleModesOnOper() @@ -53,7 +59,7 @@ class ModuleModesOnOper : public Module return Version(1,0,0,1,VF_VENDOR); } - virtual void OnOper(userrec* user, std::string opertype) + virtual void OnPostOper(userrec* user, std::string opertype) { // whenever a user opers, go through the oper types, find their <type:modes>, // and if they have one apply their modes. The mode string can contain +modes |