Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.56 KB | None | 0 0
  1. <?php
  2. //By Volvagia356
  3. //Part of MY|Pedobear Bot
  4. //This code is public domain
  5. if (!$init_asxvote) {
  6.   $lastvote=0xFFFFFFFF;
  7.   $init_asxvote=true;
  8.   echo "ASX Autovoting ACTIVE!\n";
  9. }
  10. if ($privmsg) {
  11.   $selfvote_difference=time()-$selfvote_time;
  12.   if ($selfvote_difference>2) {unset($selfvote);}
  13. }
  14. if ($privmsg['message']=="!forcevote" && $privmsg['nick']=="Volvagia356") {
  15. $forcevote=true;
  16. }
  17. if (!$selfvote && $privmsg['message']!=".moe" &&!((substr($privmsg['message'],0,22)=="03[MSX] 06New Match:" || substr($privmsg['message'],0,26)=="03[MSX] 06Current Match:") && $privmsg['recepient']=="#asx")) {
  18.   $difference=time()-$lastvote;
  19.   if ($difference>52) {
  20.     mt_srand(time());
  21.     $randomness=mt_rand(1,5);
  22.     if($randomness==5 || $forcevote) {
  23.       $selfvote=true;
  24.       $selfvote_time=time();
  25.       privmsg("#asx",".moe");
  26.       unset($forcevote);
  27.     }
  28.   }
  29. }
  30. if ((substr($privmsg['message'],0,22)=="03[MSX] 06New Match:" || substr($privmsg['message'],0,26)=="03[MSX] 06Current Match:") && $privmsg['recepient']=="#asx") {
  31.   echo "ASX Voting Active: ";
  32.   $lastvote=time();
  33.   if ($selfvote) {
  34.     $charlist=fopen("ext/moevote.txt","r");
  35.     while(!feof($charlist) && !$voted) {
  36.       $character=trim(fgets($charlist));
  37.       if (strpos($privmsg['message'],$character)) {
  38.         privmsg("#asx",".vote $character");
  39.         echo "Voted for $character!\n";
  40.         $voted=true;
  41.       }
  42.     }
  43.     fclose($charlist);
  44.     unset($selfvote);
  45.   } else {echo "Not SelfVote. ";}
  46.   if(!$voted) {echo "Did not vote!\n";}
  47.   unset($voted);
  48.   }
  49. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement