mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2015
Posts: 19
F
Pikka bird
OP Offline
Pikka bird
F
Joined: Jul 2015
Posts: 19
So i'm having trouble trying to figure out why my script isn't working for mods in twitch chat, this is how I have it setup right now:

Code:
on *:TEXT:!echo *:#: {

  if ($nick == fluffehkittehn) {

    .timer 1 .03 describe # $2-
    .timer 1 .06 describe # $2-
    .timer 1 .09 describe # $2-
    .timer 1 .12 describe # $2-
    .timer 1 .15 describe # $2-
    .timer 1 .18 describe # $2-
  }
} 

And it works like it should, but that makes it so only I can use it. is there anyway I can make it so I can add names? Or am I just not doing the if ($nick isop #) { correctly...?

This is how it is when I try the so ops can use it, but nothing happens when we try.

Code:
on *:TEXT:!echo *:#: {

  if ($nick isop #) {

    .timer 1 .03 describe # $2-
    .timer 1 .06 describe # $2-
    .timer 1 .09 describe # $2-
    .timer 1 .12 describe # $2-
    .timer 1 .15 describe # $2-
    .timer 1 .18 describe # $2-
  }
} 

Any ideas?

Last edited by FluffehKitteh; 20/07/15 07:54 PM.
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Did you manually check that the user himself is recognized as an op by mIRC?

Are you using the same event twice in the remote script file or are you replacing the first one with the second one?


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jul 2015
Posts: 19
F
Pikka bird
OP Offline
Pikka bird
F
Joined: Jul 2015
Posts: 19
Oh is there a way to check if i'm op by mIRC?

And i'm replacing the first one with the second one

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
First of all, do you receive a nicklist at all when entering twitch channels? If not then you're not requesting membership for it. Try adding this to your remote script file and restart mIRC.
Code:
on 1:connect: {
if ($server == tmi.twitch.tv) {
/raw CAP REQ :twitch.tv/membership
}
}
This will populate the nicklist when entering a channel. Op users will have a @ displayed in their nick.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jul 2015
Posts: 19
F
Pikka bird
OP Offline
Pikka bird
F
Joined: Jul 2015
Posts: 19
Okay so I did that then I got my main account op which is awesome, and the command works for the op'd account but the "bot" account isn't op'd

Joined: Jul 2015
Posts: 19
F
Pikka bird
OP Offline
Pikka bird
F
Joined: Jul 2015
Posts: 19
Yay! I got it fixed, thank you for helping me Nillen!

Joined: Jul 2015
Posts: 13
K
Pikka bird
Offline
Pikka bird
K
Joined: Jul 2015
Posts: 13
hey guys, can you help me?

i got this script:

on *:text:!top10:#: {
if ($nick != isop) {
if ((%floodcommand) || ($($+(%,floodcommand.,$nick),2))) { return }
set -u120 %floodcommand On
set -u10 %floodcommand. $+ $nick
msg $chan !top 10
}
}

the part with "if nick is op" is not correct i guess...my problem is -> the bot should write !top 10 when USER write !top 10, but NOT when mods write !top 10, so is there a function called NOT OPERATOR? != isop?

Joined: Jan 2015
Posts: 168
P
Vogon poet
Offline
Vogon poet
P
Joined: Jan 2015
Posts: 168
This should work for you. I haven't tested it. Basically != means is not equal to. Try it out and let me know how it works for you. By the way, you were missing # after isop and also { return } If you do { then that means that it will tell the script to say ok, if they are not an OP I will continue on with the code.

Code:
on *:text:!top10:#: {
if ($nick !=isop #) { return }
if ((%floodcommand) || ($($+(%,floodcommand.,$nick),2))) { return }
set -u120 %floodcommand On
set -u10 %floodcommand. $+ $nick
msg $chan !top 10
}


Last edited by powerade661; 14/08/15 03:30 PM.
Joined: Sep 2011
Posts: 32
F
Ameglian cow
Offline
Ameglian cow
F
Joined: Sep 2011
Posts: 32
Originally Posted By: Karotte
hey guys, can you help me?

i got this script:

on *:text:!top10:#: {
if ($nick != isop) {
if ((%floodcommand) || ($($+(%,floodcommand.,$nick),2))) { return }
set -u120 %floodcommand On
set -u10 %floodcommand. $+ $nick
msg $chan !top 10
}
}

the part with "if nick is op" is not correct i guess...my problem is -> the bot should write !top 10 when USER write !top 10, but NOT when mods write !top 10, so is there a function called NOT OPERATOR? != isop?


The syntax of the test for whether a person is an operator in a channel should be written as follows, per the mIRC help file:
Code:
if ( $nick isop $chan ) { ... }

Since you want to test for the person not being an operator, use the ! prefix:
Code:
if ( $nick !isop $chan ) { ... }


Link Copied to Clipboard