]> jfr.im git - irc/gameservirc.git/commitdiff
Updated some log entries and changed some cerr to log().
authorkainazzzo <redacted>
Sat, 31 Jan 2004 07:12:27 +0000 (07:12 +0000)
committerkainazzzo <redacted>
Sat, 31 Jan 2004 07:12:27 +0000 (07:12 +0000)
Also, changed all deprecated #include <*stream.h> lines to the new method.

git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@98 bc333340-6410-0410-a689-9d09f3c113fa

gameserv/Makefile.in
gameserv/aClient.h
gameserv/config.cpp
gameserv/configscript.cpp
gameserv/gameserv.cpp
gameserv/list.h
gameserv/log.cpp
gameserv/player.h
gameserv/run
gameserv/tcpclient.cpp

index 47b7eb69b56bf0a706d4dce5ee8f46c5c080e7c1..ef0cfda6e00dcad962496c778c80e46db4c7246a 100644 (file)
@@ -12,7 +12,7 @@ libdir = $(prefix)/lib/gnudl
 mandir = $(prefix)/man/man1
 
 CC = @CXX@
-CPPFLAGS = -Wno-deprecated -Wall @CPPFLAGS@
+CPPFLAGS = -Wall @CPPFLAGS@
 CFLAGS = $(CPPFLAGS) @CFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
index 591f09bdd490f18c72014179842a6d44fbfced09..3dbad5653dcde02262b677e1c11ee26ca9cf9cef 100644 (file)
@@ -2,8 +2,9 @@
 #define ACLIENT_H
 
 #include <string.h>
-#include <iostream.h>
 #include "player.h"
+#include <iostream>
+using std::ostream;
 
 class Player; // forward declaration
 
index 3426a67ddc1d03c73a0cd90bea62e703be710c55..9e8e321e9e47c65b3c6687983e13390d09c3975d 100644 (file)
@@ -1,9 +1,11 @@
-#include <fstream.h>
+#include <fstream>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include "extern.h"
 
+using std::ifstream;
+
 void load_config_file(char *config);
 void unload_config_file();
 
@@ -71,7 +73,7 @@ void load_config_file(char *config)
     infile.open(config);
     if (infile.fail())
     {
-       cerr << "Error opening " << config << endl;
+       log("Error opening %s", config);
        return;
     }
 
@@ -89,7 +91,7 @@ void load_config_file(char *config)
         if (stricmp(directive, "DIE") == 0)
        {
            value = strtok(NULL, "");
-           cerr << value << endl;
+           log("You should read the entire %s file!", config);
            exit(0);
        }
        if (stricmp(directive, "S_GAMESERV") == 0)
index c2a7806633a81964602b92d2ec908b72af75186c..943bcbeb38f1a9b7c8923cb9ef452e6a8dff9272 100644 (file)
@@ -2,6 +2,7 @@
 #include <iostream>
 
 using std::cout;
+using std::cerr;
 using std::cin;
 using std::endl;
 using std::ofstream;
@@ -15,7 +16,7 @@ int main()
     outfile.open("options.h");
     if (outfile.fail())
     {
-       cout << "Error opening options.h" << endl;
+       cerr << "Error opening options.h" << endl;
        return 1;
     }
     char c = 0;
index 2758e512f16ae6643b45fd72e03a82cdef180d05..1faf5e3fc5468f483c79455d83c4dab3cd2cebfc 100644 (file)
@@ -6,7 +6,10 @@
 #include "sockhelp.h"
 
 #include <cctype>
-#include <fstream.h>
+#include <fstream>
+
+using std::ifstream;
+using std::ofstream;
 
 #if defined(HAVE_CRYPT_H)
 
@@ -2817,7 +2820,7 @@ int save_gs_dbase()
 
     if (!outfile)
     {
-       cerr << "Error opening " << playerdata << endl;
+       log("Error opening %s", playerdata);
        return 0;
     }
 
@@ -2848,7 +2851,7 @@ int load_gs_dbase()
 
     if (infile.fail())
     {
-       cerr << "Error opening " << playerdata << endl;
+       log("Error opening %s", playerdata);
        return 0;
     }
 
@@ -3728,7 +3731,7 @@ void display_help(char *u, char *file)
        infile.open("helpfiles/help");
        if (infile.fail())
        {
-           cerr << "Error opening helpfiles/help" << endl;
+           log("Error opening helpfiles/help");
            notice(s_GameServ, u, "Error opening helpfiles/help");
            return;
        }
@@ -3819,7 +3822,7 @@ bool load_monsters()
 
     if (infile.fail())
     {
-       cerr << "Error opening monsters.dat" << endl;
+       log("Error opening monsters.dat");
        return false;
     }
     init_monsters();
index 5469257ce90da415c23ec89043fcc9cad6fdde84..944035dd531df4ccdb32a36a0064d14f62df9b4a 100644 (file)
@@ -1,12 +1,15 @@
 #ifndef LIST_H
 #define LIST_H
 
-#include <iostream.h>
+#include <iostream>
 #include <cassert>
 #include "listnode.h"
 #include "aClient.h"
 #include "extern.h"
 
+using std::cout;
+using std::endl;
+
 template <class T>
 class List {
     public:
index a1e9ec765dbd0a8266a3ddfe16dd02c11305b22c..fda60ba9d2f8e1621b7cc035ce71b9d1b6d73346 100644 (file)
@@ -1,7 +1,12 @@
 #include "extern.h"
 #include <cctype>
 #include <stdio.h>
-#include <fstream.h>
+#include <fstream>
+
+using std::endl;
+using std::cerr;
+using std::ofstream;
+using std::ios;
 
 void log(const char *fmt, ...)
 {
index b8582fac973886daa4b4da6bb3cb618c060fca86..3ea5fa1b165fa8fa449f186dde26bab31e9e4f90 100644 (file)
@@ -2,7 +2,6 @@
 #define PLAYER_H
 
 #include <string.h>
-#include <iostream.h>
 #include "aClient.h"
 #include "pouch.h"
 
index 6f240a2ff64120b1fab944347d1da29dfaadb156..b80d870b2df39775acaa4bda204ccc6904406564 100755 (executable)
@@ -1,2 +1,2 @@
 #!/bin/bash
-./gameserv > /dev/null 2>&1 &
+./gameserv > /dev/null 2>>error.log &
index 2a35d82b7108237484a8aebf30c38b10a94b2d8f..8add11214b07fa38fe2a7cfeb08361ff1ebf6564 100644 (file)
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
-#include <iostream.h>
-#include <fstream.h>
-#include <iomanip.h>
+#include <fstream>
 #include <stdlib.h>
 
+using std::ofstream;
+using std::ifstream;
+
 char *PACKAGE = "GameServ";
 char *VERSION = "1.1.8";
 
@@ -329,7 +330,7 @@ void save_timestamp()
 
     if (outfile.fail())
     {
-       cerr << "Error creating new file." << endl;
+       log("Error creating new file .gstimestamp");
        return;
     }