summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-12 15:58:30 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-12 15:58:30 +0000
commit43dfa9b50d611a7421d77af8edaf7f0268b5d15c (patch)
treeb9e6cb8b0a4fa1e13033e67d1cecb33444cc8433 /src
parentfe04cdd9dc0d504e2a0d8fb74fcf80dc59a051d7 (diff)
Make this use SendError rather than rolling it's own. Fun fact: this notice was always broken, as it send the nick, user, host of the oper it was *sending* to, not the nuh of the oper issuing the die.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6988 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/cmd_die.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/cmd_die.cpp b/src/cmd_die.cpp
index d9aecb4be..c5e87e6a0 100644
--- a/src/cmd_die.cpp
+++ b/src/cmd_die.cpp
@@ -28,21 +28,7 @@ CmdResult cmd_die::Handle (const char** parameters, int pcnt, userrec *user)
if (!strcmp(parameters[0],ServerInstance->Config->diepass))
{
ServerInstance->Log(SPARSE, "/DIE command from %s!%s@%s, terminating in %d seconds...", user->nick, user->ident, user->host, ServerInstance->Config->DieDelay);
-
- /* This would just be WriteOpers(), but as we just sleep() and then die then the write buffers never get flushed.
- * so we iterate the oper list, writing the message and immediately trying to flush their write buffer.
- */
-
- for (std::vector<userrec*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++)
- {
- userrec* a = *i;
-
- if (IS_LOCAL(a) && (a->modes[UM_SERVERNOTICE]))
- {
- a->WriteServ("NOTICE %s :*** DIE command from %s!%s@%s, terminating...", a->nick, a->nick, a->ident, a->host);
- a->FlushWriteBuf();
- }
- }
+ ServerInstance->SendError("*** DIE command from %s!%s@%s, terminating...", user->nick, user->nick, user->ident, user->dhost);
if (ServerInstance->Config->DieDelay)
sleep(ServerInstance->Config->DieDelay);