mIRC Homepage
Posted By: michaelukz On join Twitch Alert - 06/01/15 09:58 PM
Ok, So I have a script (Basic) that tells someone if there if someone is in the channel (IE when they join channel) EX: 'michaelukz' Has joined the channel' However I am trying to Create an admin alert

I have this currently

on *:JOIN:#: {
if ($nick isop #kryptonica) { msg $chan An admin has entered the channel }
}

I have a feeling that since twitch loads up the user before not at the same time as op, that It won't register until AFTER, however I can't seem to think or know of a fix.
Posted By: Nillen Re: On join Twitch Alert - 06/01/15 10:22 PM
Store the op status internally on the pc, when the user joins you cross reference with your own database and check if he's an op or not.

Code:
on 1:op:#: writini ops.ini # $nick 1
on 1:join:#: msg # $iif($readini(ops.ini,#,$nick),An admin,$nick) has entered the channel
Posted By: Raccoon Re: On join Twitch Alert - 07/01/15 04:49 AM
The problem is that nobody is ever opped as they join a channel, so the 'isop' test will always fail On Join. Nillen is suggesting you keep track of known past-admins on a per channel basis, so you remember who they are next time they join.
Posted By: michaelukz Re: On join Twitch Alert - 07/01/15 09:14 AM
I edited it slightly (Just the text)

on 1:op:#: writini ops.ini # $nick 1
on 1:join:#: msg # $iif($readini(ops.ini,#,$nick) An admin has entered the channel, The admin is $nick
}

However, This is the output-- '* Invalid format: $iif
-'
Posted By: Raccoon Re: On join Twitch Alert - 07/01/15 10:19 AM
$iif($readini(ops.ini,#,$nick) __ <- something's missing wink
Posted By: michaelukz Re: On join Twitch Alert - 07/01/15 08:05 PM
Oh, god, I hadn't even noticed, thanks.
Posted By: Nillen Re: On join Twitch Alert - 07/01/15 10:35 PM
I just got notified that
Code:
on 1:op:#: { }
doesn't work on Twitch.
Code:
on @1:RAWMODE:#: { if (($nick == jtv) && ($1 == +o)) { writeini ops.ini # $2 1 } }
will work however.

I noticed I made an error in my first post here as well, writini is obviously not a command, writeini is. :P
That's what I get for typing directly here without proof-checking my code at all :P
Posted By: michaelukz Re: On join Twitch Alert - 09/01/15 12:24 AM
Its saying who joined not just ops I joined the channel on my non mod acc and With this exactly

Code:
on @1:RAWMODE:#: { if (($nick == jtv) && ($1 == +o)) { writeini ops.ini # $2 1 } }


Code:
on 1:join:#: msg # $iif($readini(ops.ini,#,$nick),An admin,$nick) has entered the channel


And this was the output:
[00:19] <ukzbot> lolsauceluvscats has entered the channel
Posted By: Nillen Re: On join Twitch Alert - 09/01/15 06:01 AM
I thought that was the request?
If you don't want non-ops to be trigger it:
Code:
on 1:join:#: { if ($readini(ops.ini,#,$nick)) { msg # An admin has entered the channel) } }
© mIRC Discussion Forums