Advertisement
Seb

Bot management

Seb
Jun 20th, 2010
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.52 KB | None | 0 0
  1. ;;Your bot's names, any order separated by a space
  2. alias isbot return [1]Bot [2]Bot [3]Bot
  3. ;; Slupply the main part of your bot's nick for example
  4. ;; if your bots were [1]Bot [2]Bot, you would put Bot
  5. alias botname return NAME
  6. ;;The hub channel must be a channel which all the bots are in
  7. ;;I don't recommend using your home channel as it spams..
  8. alias hubchan return #CHANNEL
  9. alias invitehandle {
  10.   if (($1 == UPDATE) || ($1 == JOIN)) {
  11.     msg $hubchan $me $2
  12.     set % $+ $me $2
  13.   }
  14.   elseif (($1 == PART) || ($1 == KICK)) {
  15.     var %x $2 - 1
  16.     msg $hubchan $me %x
  17.     set % $+ $me %x
  18.  
  19.   }
  20. }
  21.  
  22. ON *:TEXT:!updatechan:#: if (($chan == $hubchan) && ($nick isop $chan)) invitehandle UPDATE $chan(0)
  23. ON *:TEXT:*:#:if (($istok($isbot,$nick,32)) && ($nick == $1) && ($2 isnum) && ($chan == $hubchan)) set % $+ $1 $2
  24. ON *:JOIN:#:if ($nick == $me) invitehandle JOIN $chan(0)
  25. ON *:PART:#:if ($nick == $me) invitehandle PART $chan(0)
  26. on *:KICK:#:if ($knick == $me) invitehandle KICK $chan(0)
  27. ON *:QUIT:if ($istok($isbot,$nick,32)) unset % $+ $nick
  28.  
  29. ctcp *:JOIN:*:if ($istok($isbot,$nick,32)) join $2
  30.  
  31. on *:INVITE:#: {  
  32.   if ($var($+(%,*,$botname,*),0)) {
  33.     var %x 1
  34.     while ($var($+(%,*,$botname,*),%x)) {
  35.       var %target $($v1,2),%target-name $v1
  36.       if ((%lowest == $null) || (%lowest > %target)) var %lowest %target,%lowest-name %target-name
  37.       inc %x
  38.     }
  39.     var %y $remove(%lowest-name,%)
  40.     ctcp %y JOIN $chan
  41.   }
  42.   else notice $nick Please see the support channel and ask them to type !updatechan
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement