]> jfr.im git - irc/gameservirc.git/blob - gameserv/do_shutdown.cpp
Added code for the start of the DataLayer format as well as a basic FilePlayerDAO...
[irc/gameservirc.git] / gameserv / do_shutdown.cpp
1 #include "extern.h"
2 #include "aClient.h"
3 #include "flags.h"
4 #include "options.h"
5
6 void do_shutdown(char *u)
7 {
8 aClient *user;
9
10 if (!(user = find(u)))
11 {
12 notice(s_GameServ, u, "Error: aClient not found. Contact a <S admin");
13 log("Error: aClient not found: %s", u);
14 }
15 else if (!isAdmin(user))
16 {
17 notice(s_GameServ, u, "You must be a <S admin to use this command!");
18 }
19 else
20 {
21 save_gs_dbase();
22 #ifdef P10
23 raw("[] SQ %s 0 :leaving: %s used the Shutdown command.",
24 servername, user->getRealNick());
25 #else
26 raw("SQUIT %s :leaving: %s used the Shutdown command.", servername, u);
27 #endif
28 shuttingdown = true;
29 }
30 }