mIRC Home    About    Download    Register    News    Help

Print Thread
show online mods command #247404 01/08/14 04:51 PM
Joined: Aug 2014
Posts: 3
W
Wo3dy Offline OP
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Aug 2014
Posts: 3
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.

Last edited by Wo3dy; 01/08/14 04:54 PM.
Re: show online mods command [Re: Wo3dy] #247406 01/08/14 05:06 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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)"


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: show online mods command [Re: Nillen] #247407 01/08/14 05:10 PM
Joined: Aug 2014
Posts: 3
W
Wo3dy Offline OP
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Aug 2014
Posts: 3
thank you very much. $nick(#,0,o) is perfect smile

Re: show online mods command [Re: Wo3dy] #247418 01/08/14 08:30 PM
Joined: Aug 2014
Posts: 3
W
Wo3dy Offline OP
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Aug 2014
Posts: 3
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

Re: show online mods command [Re: Wo3dy] #247424 01/08/14 09:12 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net