mIRC Homepage
Posted By: Wo3dy show online mods command - 01/08/14 04:51 PM
hey, im trying to make script for if anyone types "!mods"

that the bot/me says in chat what mods are currently online.

i have this sofar. but it only does the Else command msg.

Quote:
ON @*:text:!mods:#: {
if (Sniperpanda isin #) { /msg $chan Current Online mods are: Wo3dy, Sniperpanda.
}
else { /msg $chan Current Online Mods are: Wo3dy.
}
}


Also, if there are more mods. how to add them into the script?(just with more if lines?) or is there a more easier way for mIRC to see what mods are online.
its a script for twitch chat, (thru mIRC ofcourse)

thx in advance.
Posted By: Nillen Re: show online mods command - 01/08/14 05:06 PM
You want to use "ison" to check if a user is on the channel
To get a list of all ops, use "$nick(#,0,o)"
Posted By: Wo3dy Re: show online mods command - 01/08/14 05:10 PM
thank you very much. $nick(#,0,o) is perfect smile
Posted By: Wo3dy Re: show online mods command - 01/08/14 08:30 PM
it first i thought i worked. but now it only says a number instead of the names?

Quote:
ON @*:text:!mods:#:{ /msg $chan Current Online mods are: $nick(#,0,o) }



thx in advance
Posted By: Nillen Re: show online mods command - 01/08/14 09:12 PM
Use the help files. /help $nick
$nick(#,0,o) will return the 0th position of all ops, 0 indicating which position and o indicating it's ops. Since it's 0 it will return how many ops there are.

If you specify 1, it will return the name of the first op and so on.

Code:
var %ops $nick(#,0,o)
while (%ops) {
var %active $addtok(%active,$nick(#,%ops,o),32)
dec %ops
}
Msg # Active ops: %active
Something like this.
© mIRC Discussion Forums