Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Nuwani \ Bot;
- class Burn extends ModuleBase
- {
- public $prevnick = '';
- public $prevcount = 0;
- public $bot_on = array();
- public function onChannelPrivmsg (Bot $bot, $chan, $nick, $msg)
- {
- if($nick == $this->prevnick) {$this->prevcount++;}
- else {$this->prevcount = 0;}
- $this->prevnick = $nick;
- if($nick == 'FailBot') {return;}
- if(stripos($msg, '.ratbotoff') === 0) {
- $this->bot_on[$nick] = FALSE;
- $bot->send('PRIVMSG '.$chan.' :I have been disabled for '.$nick);
- }
- else if(stripos($msg, '.ratboton') === 0) {
- $this->bot_on[$nick] = TRUE;
- $bot->send('PRIVMSG '.$chan.' :I have been enabled for '.$nick);
- }
- if((!isset($this->bot_on[$nick])) || ($this->bot_on[$nick] === FALSE)) {return;} // Stop if they have ratbot turned off
- if($this->prevcount % 4 == 3) {$bot->send('PRIVMSG '.$chan.' :'.strtolower($nick).' shut up');}
- $facemom = rand(1,2);
- 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);}
- 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);}
- if (stripos($msg, ' is ') !== FALSE) {
- $msg = strtolower($msg);
- $args = explode(' is ', $msg, 2);
- $bot->send('PRIVMSG '.$chan.' :ur '.$word.' is '.$args[1]);
- }
- else if (stripos($msg, ' should ') !== FALSE) {
- $msg = strtolower($msg);
- $args = explode(' should ', $msg, 2);
- $bot->send('PRIVMSG '.$chan.' :ur '.$word.' should '.$args[1]);
- }
- else if (stripos($msg, ' isn\'t ') !== FALSE) {
- $msg = strtolower($msg);
- $args = explode(' isn\'t ', $msg, 2);
- $bot->send('PRIVMSG '.$chan.' :ur '.$word.' isn\'t '.$args[1]);
- }
- else if (stripos($msg, ' shouldn\'t ') !== FALSE) {
- $msg = strtolower($msg);
- $args = explode(' shouldn\'t ', $msg, 2);
- $bot->send('PRIVMSG '.$chan.' :ur '.$word.' shouldn\'t '.$args[1]);
- }
- else if (stripos($msg, 'plsgo') !== FALSE) {
- $nick = strtolower($nick);
- $bot->send('PRIVMSG '.$chan.' :plsgo '.$nick);
- }
- else if (stripos($msg, 'pls') !== FALSE) {
- $nick = strtolower($nick);
- $bot->send('PRIVMSG '.$chan.' :'.$nick.' pls');
- }
- else if (stripos($msg, 'how about') !== FALSE) {
- $bot->send('PRIVMSG '.$chan.' :how about you shut up');
- }
- else if (stripos($msg, 'mone') !== FALSE) {
- $bot->send('PRIVMSG '.$chan.' :SLUUUUUUUUUUUURP');
- }
- else if (stripos($msg, 'sucks') !== FALSE) {
- $bot->send('PRIVMSG '.$chan.' :you suck');
- }
- else if (stripos($msg, 'cri') !== FALSE) {
- $nick = strtolower($nick);
- $bot->send('PRIVMSG '.$chan.' :'.$nick.' cris evr tim');
- }
- else {
- $args = explode(' ', $msg);
- $count = 0;
- $check = TRUE;
- foreach ($args as $word) {
- if(ctype_lower($word[0]) == TRUE) {
- $check = FALSE;
- }
- $count++;
- }
- if(($count > 3) && ($check == TRUE)) {
- $bot->send('PRIVMSG '.$chan.' :plsgo');
- }
- }
- }
- public function onChannelPart ( Bot $bot, $chan, $nick, $msg ) {
- if($this->bot_on[$nick] === TRUE)
- $bot->send('PRIVMSG '.$chan.' :good riddance');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement