From db248e7d99636809a88f0ddb5ccf9a8034cbdf36 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Thu, 4 Sep 2014 12:22:28 +0200 Subject: m_services_account Call ModeHandler::RemoveMode() instead of duplicating code --- src/modules/m_services_account.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index edb6f6ef5..f84c9a378 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -178,12 +178,7 @@ class ModuleServicesAccount : public Module { /* On nickchange, if they have +r, remove it */ if (user->IsModeSet(m5) && assign(user->nick) != oldnick) - { - std::vector modechange; - modechange.push_back(user->nick); - modechange.push_back("-r"); - ServerInstance->Modes->Process(modechange, ServerInstance->FakeClient, ModeParser::MODE_LOCALONLY); - } + m5.RemoveMode(user); } ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE -- cgit v1.2.3