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.
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.
on 1:op:#: writini ops.ini # $nick 1
on 1:join:#: msg # $iif($readini(ops.ini,#,$nick),An admin,$nick) has entered the channel
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.
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
-'
Oh, god, I hadn't even noticed, thanks.
I just got notified that
doesn't work on Twitch.
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
Its saying who joined not just ops I joined the channel on my non mod acc and With this exactly
on @1:RAWMODE:#: { if (($nick == jtv) && ($1 == +o)) { writeini ops.ini # $2 1 } }
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
I thought that was the request?
If you don't want non-ops to be trigger it:
on 1:join:#: { if ($readini(ops.ini,#,$nick)) { msg # An admin has entered the channel) } }