]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/tcpclient.cpp
added items to the tavern.dat, added the filename option to the config file
[irc/gameservirc.git] / gameserv / tcpclient.cpp
index fa73761f74c8978c4e8fa7c5306b83e39f93f4af..d0ae5f0a1f29416976330d57724772987cc054cd 100644 (file)
 #include <stdlib.h>
 #include <fcntl.h>
 #include <signal.h>
+
 //#include <sys/types.h>
 //#include <sys/wait.h>
 //#include <errno.h>
 
-using std::ofstream;
-using std::ifstream;
-using std::cerr;
-using std::endl;
+using namespace std;
 
 char *PACKAGE = "GameServ";
-char *VERSION = "1.2.5 +devel";
+char *VERSION = "1.2.6 +devel";
 
 int sock;
 long lastrefresh;
@@ -102,26 +100,39 @@ int main(int argc, char *argv[])
         perror("Could not turn into a daemon");
         exit(3);
     }
+  if (load_items() == 0)
+    {
+      log("Error loading items");
+      goto end;
+    }
+
   load_gs_dbase();
   loadNews(newsdata, todaysnews);
 
-  if (load_masters() == false)
-  {
-       log("Error loading masters");
-       goto end;
-  }
 
+  if (load_masters() == false)
+    {
+      log("Error loading masters");
+      goto end;
+    }
+  
   if (load_monsters() == false)
-  {
-       log("Error loading monsters");
-       goto end;
-  }
-
+    {
+      log("Error loading monsters");
+      goto end;
+    }
+  
+  if (!load_dragon())
+    {
+      log("Error loading dragon");
+      goto end;
+    }
+  
   if (load_levels() == false)
-  {
-       log("Error loading levels");
-       goto end;
-  }
+    {
+      log("Error loading levels");
+      goto end;
+    }
 
     shuttingdown = false;
 
@@ -584,6 +595,7 @@ int main(int argc, char *argv[])
   end:
 
   save_gs_dbase();
+  save_dragon();
   saveNews(newsdata, todaysnews);
 
   delete_monsters();
@@ -837,14 +849,15 @@ void closeall(int fd)
 
 void prettyIntro()
 {
-cout << endl;
-cout << "  GGGG     AAA   MM    MM EEEEEEE  SSSSS  EEEEEEE RRRRRR  VV     VV " << endl;
-cout << " GG  GG   AAAAA  MMM  MMM EE      SS      EE      RR   RR VV     VV " << endl;
-cout << "GG       AA   AA MM MM MM EEEEE    SSSSS  EEEEE   RRRRRR   VV   VV  " << endl;
-cout << "GG   GGG AAAAAAA MM    MM EE           SS EE      RR  RR    VV VV   " << endl;
-cout << "G     G  AA   AA MM    MM EEEEEEE  SSSSS  EEEEEEE RR   RR    VVV" << endl;
-cout << " GGGGG                                                        V\n\n" << endl;
-cout << "Version: " << VERSION << endl;
+  cout << endl;
+  cout << "  GGGG     AAA   MM    MM EEEEEEE  SSSSS  EEEEEEE RRRRRR  VV     VV " << endl;
+  cout << " GG  GG   AAAAA  MMM  MMM EE      SS      EE      RR   RR VV     VV " << endl;
+  cout << "GG       AA   AA MM MM MM EEEEE    SSSSS  EEEEE   RRRRRR   VV   VV  " << endl;
+  cout << "GG   GGG AAAAAAA MM    MM EE           SS EE      RR  RR    VV VV   " << endl;
+  cout << "G     G  AA   AA MM    MM EEEEEEE  SSSSS  EEEEEEE RR   RR    VVV" << endl;
+  cout << " GGGGG                                                        V\n\n" << endl;
+  cout << "Version: " << VERSION << endl;
+  cout << "http://www.gameserv.us - http://www.sourceforge.net/projects/gameservirc" << endl;
 }
 
 void load_lastrefresh()