]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/tcpclient.cpp
Fixed some bugs
[irc/gameservirc.git] / gameserv / tcpclient.cpp
index 70007f2d790900c6efad7680ce0e2b7d3c14e4c8..0e96bb189340ead1c392965c382c9b9bcc0a8ab9 100644 (file)
@@ -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
            }