]> jfr.im git - irc/gameservirc.git/blob - gameserv/do_inventory.cpp
Refactored playerGO a bit
[irc/gameservirc.git] / gameserv / do_inventory.cpp
1 #include "extern.h"
2 #include "options.h"
3 #include "aClient.h"
4 #include "flags.h"
5
6 void do_inventory(char *u)
7 {
8 aClient *user;
9
10 if (!(user = find(u)))
11 {
12 notice(s_GameServ, u, "Fatal Error. Contact a <S admin!");
13 return;
14 }
15 else if (isIgnore(user))
16 {
17 #ifdef DEBUGMODE
18 log("Ignoring %s.", user->getNick());
19 #endif
20 return;
21 }
22 else if (!is_playing(user))
23 {
24 notice(s_GameServ, u, "You must be playing to check your inventory!");
25 return;
26 }
27 if (!is_fighting(user))
28 updateTS(user->stats);
29 showinventory(user->stats, user);
30 }