]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/cmd_die.cpp
Updated copyrights in headers etc using perl inplace edit
[user/henk/code/inspircd.git] / src / cmd_die.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
6  *                       E-mail:
7  *                <brain@chatspike.net>
8  *                <Craig@chatspike.net>
9  *
10  * Written by Craig Edwards, Craig McLure, and others.
11  * This program is free but copyrighted software; see
12  *            the file COPYING for details.
13  *
14  * ---------------------------------------------------
15  */
16
17 using namespace std;
18
19 #include "inspircd_config.h"
20 #include "inspircd.h"
21 #include "inspircd_io.h"
22 #include <time.h>
23 #include <string>
24 #include "users.h"
25 #include "ctables.h"
26 #include "globals.h"
27 #include "wildcard.h"
28 #include "message.h"
29 #include "commands.h"
30 #include "inspstring.h"
31 #include "helperfuncs.h"
32 #include "hashcomp.h"
33 #include "typedefs.h"
34 #include "cmd_die.h"
35
36 extern ServerConfig* Config;
37
38 void cmd_die::Handle (char **parameters, int pcnt, userrec *user)
39 {
40         log(DEBUG,"die: %s",user->nick);
41         if (!strcmp(parameters[0],Config->diepass))
42         {
43                 WriteOpers("*** DIE command from %s!%s@%s, terminating...",user->nick,user->ident,user->host);
44                 sleep(Config->DieDelay);
45                 Exit(ERROR);
46         }
47         else
48         {
49                 WriteOpers("*** Failed DIE Command from %s!%s@%s.",user->nick,user->ident,user->host);
50         }
51 }
52
53