|
|
Joined: Dec 2014
Posts: 68
Babel fish
|
OP
Babel fish
Joined: Dec 2014
Posts: 68 |
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.
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
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
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
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.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Dec 2014
Posts: 68
Babel fish
|
OP
Babel fish
Joined: Dec 2014
Posts: 68 |
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 -'
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
$iif ($readini (ops.ini,#,$nick ) __ <- something's missing
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Dec 2014
Posts: 68
Babel fish
|
OP
Babel fish
Joined: Dec 2014
Posts: 68 |
Oh, god, I hadn't even noticed, thanks.
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
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
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: Dec 2014
Posts: 68
Babel fish
|
OP
Babel fish
Joined: Dec 2014
Posts: 68 |
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
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
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) } }
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
|
|