forked from Blasman/mIRC-Twitch-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hosts.mrc
17 lines (15 loc) · 958 Bytes
/
hosts.mrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;; !HOSTS COMMAND ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This script relies on sections of ankhbot.mrc, otherwise you will have to edit the script to work properly without it.
ON *:TEXT:!hosts:%mychan: {
IF ($nick isop $chan) {
JSONOpen -ud gethosts http://tmi.twitch.tv/hosts?include_logins=1&target= $+ %TwitchID
VAR %x = 0 | WHILE ($json(gethosts, hosts, %x, host_login) != $null) {
VAR %hosts %hosts $cached_name($json(gethosts, hosts, %x, host_login)) $+ $chr(44)
INC %x
}
IF (%hosts != $null) MSG $chan bleedPurple Thank You to all these $numtok(%hosts, 32) awesome people who are currently hosting this stream: $left($sorttok(%hosts , 32, a), -1) bleedPurple
ELSE MSG $chan $nick $+ , no one is hosting the channel at the moment. FeelsBadMan
}
}