]>
jfr.im git - irc/gameservirc.git/blob - gameserv/do_logout.cpp
9 void do_logout(char *u
)
13 char *name
= strtok(NULL
, " ");
15 if (!(user
= find(u
)))
17 notice(s_GameServ
, u
, "Fatal error. Cannot find aClient. "\
19 log("Could not find aClient Buf: %s LOGOUT",
23 else if (isIgnore(user
))
26 log("Ignoring %s.", user
->getNick());
35 notice(s_GameServ
, u
, "You must be a <S admin to use this command!");
37 else if (!(p
= findplayer(name
)))
39 notice(s_GameServ
, u
, "Couldn't find a player named %s", name
);
43 notice(s_GameServ
, u
, "Logging out %s", p
->getName().c_str());
44 logout(p
->getClient());
49 if (!is_playing(user
))
51 notice(s_GameServ
, u
, "You're not logged in!");
53 else if (is_fighting(user
))
55 notice(s_GameServ
, u
, "You can't logout while fighting!");
59 notice(s_GameServ
, u
, "You have left the fields. You have lived to kill another day!");