From 43dfa9b50d611a7421d77af8edaf7f0268b5d15c Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 12 May 2007 15:58:30 +0000 Subject: [PATCH] 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 --- src/cmd_die.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 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::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); -- 2.39.5