diff options
-rw-r--r-- | src/cmd_nick.cpp | 4 | ||||
-rw-r--r-- | src/cmd_user.cpp | 3 | ||||
-rw-r--r-- | src/mode.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_stripcolor.cpp | 4 |
4 files changed, 5 insertions, 14 deletions
diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp index 2008e8e11..38ca0c7e3 100644 --- a/src/cmd_nick.cpp +++ b/src/cmd_nick.cpp @@ -138,8 +138,8 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) if (user->dns_done) ServerInstance->Log(DEBUG,"Aborting dns lookup of %s because dns server experienced a failure.",user->nick); } - - ServerInstance->next_call = ServerInstance->Time() + ServerInstance->Config->dns_timeout; + if (ServerInstance->next_call > ServerInstance->Time() + ServerInstance->Config->dns_timeout) + ServerInstance->next_call = ServerInstance->Time() + ServerInstance->Config->dns_timeout; } if (user->registered == REG_NICKUSER) { diff --git a/src/cmd_user.cpp b/src/cmd_user.cpp index d6565ce11..208e04380 100644 --- a/src/cmd_user.cpp +++ b/src/cmd_user.cpp @@ -55,7 +55,8 @@ CmdResult cmd_user::Handle (const char** parameters, int pcnt, userrec *user) if (user->registered == REG_NICKUSER) { /* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */ - ServerInstance->next_call = ServerInstance->Time() + ServerInstance->Config->dns_timeout; + if (ServerInstance->next_call > ServerInstance->Time() + ServerInstance->Config->dns_timeout) + ServerInstance->next_call = ServerInstance->Time() + ServerInstance->Config->dns_timeout; FOREACH_MOD(I_OnUserRegister,OnUserRegister(user)); } diff --git a/src/mode.cpp b/src/mode.cpp index 90489ce62..c07682bcf 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -891,14 +891,8 @@ void ModeHandler::RemoveMode(userrec* user) if (user->IsModeSet(this->GetModeChar())) { - userrec* n = new userrec(ServerInstance); - sprintf(moderemove,"-%c",this->GetModeChar()); - n->SetFd(FD_MAGIC_NUMBER); - - ServerInstance->SendMode(parameters, 2, n); - - delete n; + ServerInstance->Parser->CallHandler("MODE", parameters, 2, user); } } diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 684e6eed8..723225cca 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -32,10 +32,6 @@ class ChannelStripColor : public ModeHandler ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { - /* Only opers can change other users modes */ - if ((source != dest) && (!*source->oper)) - return MODEACTION_DENY; - if (adding) { if (!channel->IsModeSet('S')) |