mIRC Home    About    Download    Register    News    Help

Print Thread
#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.
Joined: Dec 2013
Posts: 779
N
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
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

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

Joined: Dec 2013
Posts: 779
N
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

Link Copied to Clipboard