Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. <?php
  2. use Nuwani \ Bot;
  3.  
  4. class Burn extends ModuleBase
  5. {
  6. public $prevnick = '';
  7. public $prevcount = 0;
  8. public $bot_on = array();
  9.  
  10. public function onChannelPrivmsg (Bot $bot, $chan, $nick, $msg)
  11. {
  12. if($nick == $this->prevnick) {$this->prevcount++;}
  13. else {$this->prevcount = 0;}
  14. $this->prevnick = $nick;
  15.  
  16. if($nick == 'FailBot') {return;}
  17.  
  18. if(stripos($msg, '.ratbotoff') === 0) {
  19. $this->bot_on[$nick] = FALSE;
  20. $bot->send('PRIVMSG '.$chan.' :I have been disabled for '.$nick);
  21. }
  22. else if(stripos($msg, '.ratboton') === 0) {
  23. $this->bot_on[$nick] = TRUE;
  24. $bot->send('PRIVMSG '.$chan.' :I have been enabled for '.$nick);
  25. }
  26.  
  27.  
  28. if((!isset($this->bot_on[$nick])) || ($this->bot_on[$nick] === FALSE)) {return;} // Stop if they have ratbot turned off
  29.  
  30. if($this->prevcount % 4 == 3) {$bot->send('PRIVMSG '.$chan.' :'.strtolower($nick).' shut up');}
  31.  
  32. $facemom = rand(1,2);
  33. if($facemom == 1) {$word = 'face'; $msg = str_ireplace(array(' he ', ' she ', ' his ', ' hers ', ' him ', ' her ', ' they ', ' their ', ' them ', ' we ', ' us ', ' our ', ' ours '), array(' it ', ' it ', ' its ', ' its ', ' it ', ' it ', ' it ', ' its ', ' it ', ' it ', ' it ', ' its ', ' its '), $msg);}
  34. else {$word = 'mom'; $msg = str_ireplace(array(' he ', ' it ', ' his ', ' its ', ' him ', ' it ', ' they ', ' their ', ' them ', ' we ', ' us ', ' our ', ' ours '), array(' she ', ' her ', ' her ', ' her ', ' her ', ' her ', ' she ', ' her ', ' her ', ' her ', ' she ', ' her ', ' hers '), $msg);}
  35.  
  36. if (stripos($msg, ' is ') !== FALSE) {
  37. $msg = strtolower($msg);
  38. $args = explode(' is ', $msg, 2);
  39.  
  40. $bot->send('PRIVMSG '.$chan.' :ur '.$word.' is '.$args[1]);
  41. }
  42. else if (stripos($msg, ' should ') !== FALSE) {
  43. $msg = strtolower($msg);
  44. $args = explode(' should ', $msg, 2);
  45.  
  46. $bot->send('PRIVMSG '.$chan.' :ur '.$word.' should '.$args[1]);
  47. }
  48. else if (stripos($msg, ' isn\'t ') !== FALSE) {
  49. $msg = strtolower($msg);
  50. $args = explode(' isn\'t ', $msg, 2);
  51.  
  52. $bot->send('PRIVMSG '.$chan.' :ur '.$word.' isn\'t '.$args[1]);
  53. }
  54. else if (stripos($msg, ' shouldn\'t ') !== FALSE) {
  55. $msg = strtolower($msg);
  56. $args = explode(' shouldn\'t ', $msg, 2);
  57.  
  58. $bot->send('PRIVMSG '.$chan.' :ur '.$word.' shouldn\'t '.$args[1]);
  59. }
  60. else if (stripos($msg, 'plsgo') !== FALSE) {
  61. $nick = strtolower($nick);
  62. $bot->send('PRIVMSG '.$chan.' :plsgo '.$nick);
  63. }
  64. else if (stripos($msg, 'pls') !== FALSE) {
  65. $nick = strtolower($nick);
  66. $bot->send('PRIVMSG '.$chan.' :'.$nick.' pls');
  67. }
  68. else if (stripos($msg, 'how about') !== FALSE) {
  69. $bot->send('PRIVMSG '.$chan.' :how about you shut up');
  70. }
  71. else if (stripos($msg, 'mone') !== FALSE) {
  72. $bot->send('PRIVMSG '.$chan.' :SLUUUUUUUUUUUURP');
  73. }
  74. else if (stripos($msg, 'sucks') !== FALSE) {
  75. $bot->send('PRIVMSG '.$chan.' :you suck');
  76. }
  77. else if (stripos($msg, 'cri') !== FALSE) {
  78. $nick = strtolower($nick);
  79. $bot->send('PRIVMSG '.$chan.' :'.$nick.' cris evr tim');
  80. }
  81. else {
  82. $args = explode(' ', $msg);
  83. $count = 0;
  84. $check = TRUE;
  85. foreach ($args as $word) {
  86. if(ctype_lower($word[0]) == TRUE) {
  87. $check = FALSE;
  88. }
  89. $count++;
  90. }
  91. if(($count > 3) && ($check == TRUE)) {
  92. $bot->send('PRIVMSG '.$chan.' :plsgo');
  93. }
  94. }
  95. }
  96.  
  97. public function onChannelPart ( Bot $bot, $chan, $nick, $msg ) {
  98. if($this->bot_on[$nick] === TRUE)
  99. $bot->send('PRIVMSG '.$chan.' :good riddance');
  100. }
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement