Yawhatnever commented on a Page, "Bop" Command [Twitch.TV]  -  Mar 10, 2014

A few issues:

if (ismod) { }

is ALWAYS true because 'ismod' has no special meaning (it's just a normal string). Since it's not $null, $false, or 0 the condition evaluates as $true. This means that anybody can use the !bop command, not just mods. Consider replacing with the following:

if ($nick isop $chan) { }

This is not a perfect fix because mIRC will sometimes see mods deopped due to the order in which twitch sends +o/-o messages and joins. It will, however, prevent non-mods from using the command. The only way to keep an accurate list of mods currently in the channel on twitch is to track the +o/-o messages independently and store the list separately.

msg $chan .timeout $2 1 $2-

This actually breaks the intended function of the script. The [./]timeout command doesn't accept a third parameter (the $2- after '1' is the third parameter you're sending), and sending a third parameter breaks the command for whatever reason and it defaults back to a 600 second timeout.

Chemich  -  Mar 16, 2014

isop seems to only work for the broadcaster, while for some reason on twitch servers ismod works? I haven't seen ismod work with any non mods,.

Also I tried finding a fix for the one second timeout, but there seems to be no easy alternative thus far, if you have any better ideas feel free to tell me... I'm new at this scripting stuff myself and only know a few ins and outs.

Yawhatnever  -  Mar 16, 2014

To paraphrase:
'ismod' has no meaning in a conditional; It's a plain string of text. However, because it's not $null (or $false, or 0) the condition evaluates to true every time. A conditional that will evaluate to true no matter what is useless to you. If checking 'if ($nick isop $chan)' didn't work then you either used it wrong or didn't realize it was working.

To fix the one-second timeout, don't send the third parameter. Re-read my original comment if you don't know what that is.

Chemich  -  Mar 16, 2014

oh i see what you're saying now, the extra parameter just isn't needed overall... strange... also I assume you're right about the ismod thing, I just find it strange that when I test it myself for some strange reason non moderators cannot use the command. (Maybe coincidence?) Thank you for your help regardless. For now I'll do as you say until I can get actual verification that "ismod" actually works the way I think it does on twitch servers.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.