using std::endl;
char *PACKAGE = "GameServ";
-char *VERSION = "1.1.8";
+char *VERSION = "1.2.0 +devel";
int sock;
int day;
char *cmd, *source = NULL, *conf = "gameserv.conf";
srand(time(NULL));
+ /*
+ * This needs to be fixed to work for any number of arguments in any
+ * order
+ *
+ */
if (argc > 1)
{
if ( argc > 2 || stricmp(argv[1], "--help") == 0)
log("Server: %s",buffer);
#endif
+ strcpy(boss.name, "Red Dragon");
+ strcpy(boss.weapon, "Breath of Unholy Fire");
+ boss.strength = 6667;
+ boss.gold = 2000000000;
+ boss.exp = 2000000000;
+ strcpy(boss.death, "You finally snuff out the deadly murderous "\
+ "dragon's dark flames. You have freed the land of its terror "\
+ "filled reign from above!");
+
init_masters();
load_gs_dbase();
load_day();
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!");
quitter->stats->user = NULL; // Unidentify them
}
case -1: return -1;
default:
ofstream outfile;
- outfile.open("gameserv.pid");
+ outfile.open(pidfile);
if (outfile.fail())
- cerr << "Unable to open gameserv.pid" << endl;
+ cerr << "Unable to open " << pidfile << endl;
outfile << pid << endl;
outfile.close();