summaryrefslogtreecommitdiff
path: root/src/modules/m_samode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-09 15:29:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-09 15:29:42 +0000
commitbe60fccc6ca656636924d28eb1fa870f7e8f0144 (patch)
tree02cf1be2f13f15c236244baa3d38eda0f176c279 /src/modules/m_samode.cpp
parentb752181177a868a192ede87305957c165fa274f8 (diff)
Make SAMODE oper output tidier
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5184 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_samode.cpp')
-rw-r--r--src/modules/m_samode.cpp15
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;
}