diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_samode.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 95c13f69a..781875594 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -54,21 +54,14 @@ class cmd_samode : public command_t /* * Handles an SAMODE request. Notifies all +s users. */ - std::string result; - ServerInstance->Log(DEBUG,"SAMODE: Being handled"); + userrec* n = new userrec(ServerInstance); n->SetFd(FD_MAGIC_NUMBER); ServerInstance->SendMode(parameters,pcnt,n); delete n; - ServerInstance->Log(DEBUG,"SAMODE: Modechange handled"); - result = std::string(user->nick); - result.append(" used SAMODE"); - for (int n = 0; n < pcnt; n++) - { - result.append(" "); - result.append(parameters[n]); - } - ServerInstance->WriteOpers(result); + + if (ServerInstance->Modes->GetLastParse().length()) + ServerInstance->WriteOpers(std::string(user->nick)+" used SAMODE: "+ServerInstance->Modes->GetLastParse()); return CMD_SUCCESS; } |