X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/1579dfa231a9abee79f7d74ea2e56fce4e2911b4..a5316c52125396d84910652402c16e39d7c3a7e2:/gameserv/tcpclient.cpp diff --git a/gameserv/tcpclient.cpp b/gameserv/tcpclient.cpp index 70007f2..0e96bb1 100644 --- a/gameserv/tcpclient.cpp +++ b/gameserv/tcpclient.cpp @@ -36,7 +36,7 @@ using std::cerr; using std::endl; char *PACKAGE = "GameServ"; -char *VERSION = "1.1.9"; +char *VERSION = "1.2.0 +devel"; int sock; int day; @@ -308,7 +308,23 @@ int main(int argc, char *argv[]) clients.remove(quitter); if ((quitter = findIRCplayer(source))) { + if (player_fight(quitter)) + { + // Stop the fight on the other client + aClient *otherplayer = quitter->stats->battle; + otherplayer->stats->battle = NULL; + notice(s_GameServ, otherplayer->getNick(), "%s "\ + "has quit IRC. The fight stops here.", + quitter->stats->name); + } + quitter->stats->battle = NULL; + quitter->stats->fight = NULL; + quitter->stats->master = NULL; + quitter->setNick("!NULL!"); + #ifdef P10 + quitter->setRealNick("!NULL!"); + #endif quitter->stats->user = NULL; // Unidentify them }