ON $*:TEXT:/^!(follow|caster|so|shoutout|streamer|ally)\s/iS:#lmpred: {
IF (($nick isop $chan) && ($2) && (!%follow.cd)) {
IF (!$3) {
VAR %follow.name $twitch_name($remove($2, @))
IF (%follow.name != $null) {
SET -eu3 %follow.cd On
DESCRIBE $chan Everyone just take just a few seconds and follow %follow.name $+ : twitch.tv/ $+ %follow.name and press the follow button! sodaL
}
ELSE MSG $chan $nick $+ , $2 is not a valid user on Twitch. FailFish
}
ELSE {
SET -eu3 %follow.cd On
VAR %follow.total $calc($0 - 1)
VAR %x = 1
WHILE (%x <= %follow.total) {
VAR %follow.name [ $+ [ %x ] ] $twitch_name($remove($ [ $+ [ $calc(%x + 1) ] ], @))
IF (%follow.name [ $+ [ %x ] ] != $null) VAR %follow.names %follow.names twitch.tv/ $+ %follow.name [ $+ [ %x ] ] |
INC %x
}
VAR %follow.names $left(%follow.names, -1)
IF ($numtok(%follow.names,32) >= 2) DESCRIBE $chan Everyone go and give all these amazing people a follow: %follow.names sodaL
ELSEIF ($numtok(%follow.names,32) == 1) DESCRIBE $chan Everyone just take just a few seconds and follow %follow.name $+ : twitch.tv/ $+ %follow.names and press the follow button! sodaL
ELSE MSG $chan $nick $+ , none of those names are valid Twitch users. FailFish
}
}
}