Advertisement
Terrah

nightbot

Dec 4th, 2014
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. function MOD.CheckNightbot()
  2.  
  3.     local users = #GetUsers();
  4.  
  5.     if UserStatus("nightbot")==0 and users > 1 then
  6.         print("ATTENTION: Nightbot is missing!");
  7.         MOD.Timer("nightbot",900,MOD.CheckNightbot);
  8.     else
  9.         MOD.Timer("nightbot",30,MOD.CheckNightbot);
  10.     end
  11. end
  12.  
  13. local Hook = MOD.EventMsg;
  14.  
  15. MOD.EventMsg = function(user,msg)
  16.    
  17.     if msg:lower():find("http://strawpoii.me",1,true) then
  18.         print("Fake strawpoll; strawpoii detected");
  19.         if UserStatus("kitsunebot")==2 and UserStatus(user)~=2 then
  20.             MOD.Timeout(user);
  21.         end
  22.     end
  23.  
  24.     if type(Hook) == "function" then
  25.                 return Hook(user,msg);
  26.         end
  27. end
  28.  
  29. local Hook2 = MOD.EventSub;
  30.  
  31. MOD.EventSub = function(sub)
  32.  
  33.     print("PogChamp " .. sub .. " has subscribed! PogChamp");
  34.  
  35.     if type(Hook2) == "function" then
  36.                 return Hook2 (sub);
  37.         end
  38. end
  39.  
  40. MOD.Timer("nightbot",30,MOD.CheckNightbot);
  41.  
  42. return MOD.CheckNightbot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement