Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;Your bot's names, any order separated by a space
- alias isbot return [1]Bot [2]Bot [3]Bot
- ;; Slupply the main part of your bot's nick for example
- ;; if your bots were [1]Bot [2]Bot, you would put Bot
- alias botname return NAME
- ;;The hub channel must be a channel which all the bots are in
- ;;I don't recommend using your home channel as it spams..
- alias hubchan return #CHANNEL
- alias invitehandle {
- if (($1 == UPDATE) || ($1 == JOIN)) {
- msg $hubchan $me $2
- set % $+ $me $2
- }
- elseif (($1 == PART) || ($1 == KICK)) {
- var %x $2 - 1
- msg $hubchan $me %x
- set % $+ $me %x
- }
- }
- ON *:TEXT:!updatechan:#: if (($chan == $hubchan) && ($nick isop $chan)) invitehandle UPDATE $chan(0)
- ON *:TEXT:*:#:if (($istok($isbot,$nick,32)) && ($nick == $1) && ($2 isnum) && ($chan == $hubchan)) set % $+ $1 $2
- ON *:JOIN:#:if ($nick == $me) invitehandle JOIN $chan(0)
- ON *:PART:#:if ($nick == $me) invitehandle PART $chan(0)
- on *:KICK:#:if ($knick == $me) invitehandle KICK $chan(0)
- ON *:QUIT:if ($istok($isbot,$nick,32)) unset % $+ $nick
- ctcp *:JOIN:*:if ($istok($isbot,$nick,32)) join $2
- on *:INVITE:#: {
- if ($var($+(%,*,$botname,*),0)) {
- var %x 1
- while ($var($+(%,*,$botname,*),%x)) {
- var %target $($v1,2),%target-name $v1
- if ((%lowest == $null) || (%lowest > %target)) var %lowest %target,%lowest-name %target-name
- inc %x
- }
- var %y $remove(%lowest-name,%)
- ctcp %y JOIN $chan
- }
- else notice $nick Please see the support channel and ask them to type !updatechan
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement