[project @ 2003-04-10 01:53:57 by unknown_lamer]
[clinton/bobotpp.git] / source / Bot.C
index f1c4c30..91a35a2 100644 (file)
@@ -34,6 +34,9 @@
 #include "UserCommands.H"
 #include "DCCManager.H"
 
+
+unsigned int Bot::MAX_MESSAGES = 2;
+
 #define DEFAULT_NICKNAME "Bobot"
 #define DEFAULT_USERNAME "bobot"
 #define DEFAULT_IRCNAME "I'm a bobot++!"
@@ -385,17 +388,16 @@ Bot::waitForInput()
     }
 #ifdef USESCRIPTS
     botInterp->RunTimers(currentTime);
-#endif
 
-#ifdef USESCRIPTS
     tm *thisTime = localtime(&currentTime);
-    if (thisTime->tm_sec == 0) {
-      char s[6];
-      std::sprintf(s, "%2d:%2d", thisTime->tm_hour, thisTime->tm_min);
-      botInterp->RunHooks(Hook::TIMER, String(s),
-                          gh_list(Utils::string2SCM(String(s)), 
-                                 SCM_UNDEFINED));
-    }
+    if (thisTime->tm_sec == 0)
+      {
+       char s[6];
+       std::sprintf(s, "%2d:%2d", thisTime->tm_hour, thisTime->tm_min);
+       botInterp->RunHooks(Hook::TIMER, String(s),
+                           gh_list(Utils::string2SCM(String(s)), 
+                                   SCM_UNDEFINED));
+      }
 #endif
 
   }
@@ -644,6 +646,8 @@ Bot::init_user_functions ()
   userFunctions["SERVER"] = uf (UserCommands::Server, User::FRIEND, false);
   userFunctions["SERVERLIST"] =
     uf (UserCommands::ServerList, User::FRIEND, false);
+  userFunctions["SETFLOODRATE"] =
+    uf (UserCommands::SetFloodRate, User::MASTER, false);
   userFunctions["SETVERSION"] =
     uf (UserCommands::SetVersion, User::MASTER, false);
   userFunctions["SHITLIST"] =