]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/configscript.cpp
Made it so missing directives are found on a config file load.
[irc/gameservirc.git] / gameserv / configscript.cpp
index c2a7806633a81964602b92d2ec908b72af75186c..13fb4c165c855f89ea000d1dfb71af659393cf31 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;
@@ -27,10 +28,26 @@ int main()
            case '1':
                outfile << "#define UNREAL" << endl;
                outfile << "#undef BAHAMUT" << endl;
+               outfile << "#undef P10" << endl;
+               outfile << "#undef HYBRID" << endl;
                break;
            case '2':
                outfile << "#undef UNREAL" << endl;
                outfile << "#define BAHAMUT" << endl;
+               outfile << "#undef P10" << endl;
+               outfile << "#undef HYBRID" << endl;
+               break;
+           case '3':
+               outfile << "#undef UNREAL" << endl;
+               outfile << "#undef BAHAMUT" << endl;
+               outfile << "#define P10" << endl;
+               outfile << "#undef HYBRID" << endl;
+               break;
+           case '4':
+               outfile << "#undef UNREAL" << endl;
+               outfile << "#undef BAHAMUT" << endl;
+               outfile << "#undef P10" << endl;
+               outfile << "#define HYBRID" << endl;
                break;
            default:
                break;
@@ -68,8 +85,10 @@ char menu(int page)
     else
     {
        cout << "Choose your IRCD" << endl;
-       cout << "1. Unreal3.x\r\n"
-            << "2. bahamut-1.4.x" << endl;
+       cout << "1. Unreal3.x" << endl
+            << "2. bahamut-1.4.x" << endl
+            << "3. ircu 2.10.x (P10)" << endl
+            << "4. ircd-hybrid, ircd-ratbox, or csircd" << endl;
        cout << "Make your selection: ";
     }