Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //By Volvagia356
- //Part of MY|Pedobear Bot
- //This code is public domain
- if (!$init_asxvote) {
- $lastvote=0xFFFFFFFF;
- $init_asxvote=true;
- echo "ASX Autovoting ACTIVE!\n";
- }
- if ($privmsg) {
- $selfvote_difference=time()-$selfvote_time;
- if ($selfvote_difference>2) {unset($selfvote);}
- }
- if ($privmsg['message']=="!forcevote" && $privmsg['nick']=="Volvagia356") {
- $forcevote=true;
- }
- 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")) {
- $difference=time()-$lastvote;
- if ($difference>52) {
- mt_srand(time());
- $randomness=mt_rand(1,5);
- if($randomness==5 || $forcevote) {
- $selfvote=true;
- $selfvote_time=time();
- privmsg("#asx",".moe");
- unset($forcevote);
- }
- }
- }
- if ((substr($privmsg['message'],0,22)=="03[MSX] 06New Match:" || substr($privmsg['message'],0,26)=="03[MSX] 06Current Match:") && $privmsg['recepient']=="#asx") {
- echo "ASX Voting Active: ";
- $lastvote=time();
- if ($selfvote) {
- $charlist=fopen("ext/moevote.txt","r");
- while(!feof($charlist) && !$voted) {
- $character=trim(fgets($charlist));
- if (strpos($privmsg['message'],$character)) {
- privmsg("#asx",".vote $character");
- echo "Voted for $character!\n";
- $voted=true;
- }
- }
- fclose($charlist);
- unset($selfvote);
- } else {echo "Not SelfVote. ";}
- if(!$voted) {echo "Did not vote!\n";}
- unset($voted);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement