diff options
-rw-r--r-- | src/modules/m_services.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index 7eed797e9..a35731370 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -63,7 +63,19 @@ class ModuleServices : public Module void Implements(char* List) { - List[I_OnUserPreMessage] = List[I_OnExtendedMode] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1; + List[I_OnUserPostNick] = List[I_OnUserPreMessage] = List[I_OnExtendedMode] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1; + } + + virtual void OnUserPostNick(userrec* user, std::string oldnick) + { + /* On nickchange, if they have +r, remove it */ + if (strchr(user->modes,'r')) + { + char* modechange[2]; + modechange[0] = user->nick; + modechange[1] = "-r"; + Srv->SendMode(modechange,2,user); + } } virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms) |