diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-24 17:04:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-24 17:04:40 +0000 |
commit | da185282a4606a84cd39ef0d47cd2b9f6e28f94d (patch) | |
tree | 0a61f4567474799ad8de79bbdc5d2e4faf976524 /src/modules | |
parent | 59c81b058084260c201938672d69cc6245a25301 (diff) |
Added code to remove +r on a nick if they have it and change nicks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2880 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-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) |