]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Make this use SendError rather than rolling it's own. Fun fact: this notice was alway...
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 12 May 2007 15:58:30 +0000 (15:58 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 12 May 2007 15:58:30 +0000 (15:58 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6988 e03df62e-2008-0410-955e-edbf42e46eb7

src/cmd_die.cpp

index d9aecb4be4dc4490614268954a037c2d44191887..c5e87e6a0709c5c078d456c7aa7963ac0d1f273f 100644 (file)
@@ -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);