]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_helpop.cpp
Broken code commented out by brain until we can fix it.
[user/henk/code/inspircd.git] / src / modules / m_helpop.cpp
index 750362a511eec92816708acf1f82bec6ad1ed12b..1a7968b7f1a3451c7df5caa88a974cf11ec99e87 100644 (file)
@@ -18,7 +18,16 @@ void handle_helpop(char **parameters, int pcnt, userrec *user)
        char a[MAXBUF];
        std::string output = " ";
 
-       if (parameters[0] == "") { do_helpop(NULL,pcnt,user); }
+       if (pcnt < 1) {
+               do_helpop(NULL,pcnt,user);
+               return;
+       }
+
+       // FIX by brain: make the string lowercase, ConfigReader is
+       // case sensitive
+       char* lower = parameters[0];
+       for (int t = 0; t < strlen(lower); t++)
+               lower[t] = tolower(lower[t]);
 
        if (parameters[0][0] == '!')
        {
@@ -118,36 +127,37 @@ class ModuleHelpop : public Module
                h_file = conf->ReadValue("helpop", "file", 0);
 
                if (h_file == "") {
-                       printf("WE ARE AAAAALL GONNA DIEEEEEEEEEEEE!!");
+                       printf("m_helpop: Helpop file not Specified.");
                        exit(0);
                }
 
                helpop = new ConfigReader(h_file);
                if (!helpop->Verify())
                {
-                       printf("Thats it.. were all dead.");
+                       printf("m_helpop: Invalid Helpop File. Please Ensure it exists and is error free.");
                        exit(0);
                }
 
-               if ((helpop->ReadValue("nohelp",  "line1", 0) == "") || 
+               /*if ((helpop->ReadValue("nohelp",  "line1", 0) == "") || 
                     (helpop->ReadValue("nohelpo", "line1", 0) == "") ||
                     (helpop->ReadValue("start",   "line1", 0) == ""))
                {
-                       printf("m_helpop: Important Shit Missing. Please check your file.");
+                       printf("m_helpop: Helpop file is missing important entries. Please check the example conf.");
                        exit(0);
-               }
+               }*/
 
                if (!Srv->AddExtendedMode('h',MT_CLIENT,true,0,0))
                {
-                       Srv->Log(DEFAULT,"pr0n Found. Send it to Craig@chatspike.net for investigation.");
-                       printf("Could not claim usermode +h for this module!");
+                       Srv->Log(DEFAULT,"Unable to clame the +h usermode.");
+                       printf("m_helpop: Unable to claim the +h usermode!");
                        exit(0);
                }
 
-               /*if (!*/Srv->AddCommand("HELPOP",handle_helpop,0,1);/*)
+               // Loads of comments, untill supported properly.
+               /*if (!*/Srv->AddCommand("HELPOP",handle_helpop,0,0);/*)
                {
-                       Srv->Log(DEFAULT,"Someone br0ked it.. not me");
-                       printf("B0RKED! JUMP SHIP.. AAAAAAAAAAAAAAAAAHHHHHH!");
+                       Srv->Log(DEFAULT,"Unable to claim the HELPOP command.");
+                       printf("m_helpop: Unable to claim the HELPOP command.");
                        exit(0);
                }*/