mIRC Home    About    Download    Register    News    Help

Print Thread
#255678 13/11/15 06:29 PM
Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Hey guys, trying to figure out why something isn't working. Using ircv3 msgtags i am looking for @msg-id=timeout_success in @raw.

The latest version of mIRC is supposed to strip the @ and store the event in $msgtags, however the following code does not echo:

Code:
if (timeout_success isin $msgtags) {
  echo -a timeout success
}


i am debugging raw events, and see the event come through. Any ideas?

Last edited by keyeslol; 13/11/15 06:29 PM.

twitter @keyeslol
keyeslol #255679 13/11/15 06:36 PM
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Can you reply the full RAW message that you received?

also try use this and reply back the results:

Code:
//if (!$msgtags(0)) { echo Not any tags. } | else { var %t = $msgtags(0) | while (%t) { echo -a %t $+ : $msgtags(%t) | dec %t } }


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #255680 13/11/15 06:46 PM
Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Here's the full raw event:

Code:
@msg-id=timeout_success :tmi.twitch.tv NOTICE # :nick has been timed out for 1 seconds.

the output you asked for:

Code:
7: user-type
6: user-id
5: turbo
4: subscriber
3: emotes
2: display-name
1: color


So it looks like the msg-id is not there, which means does it not get stored in $msgtags?

Last edited by keyeslol; 13/11/15 08:54 PM.

twitter @keyeslol
keyeslol #255682 13/11/15 09:11 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
To get the msg-id msgtag value use:
Code:
if (timeout_success == $msgtags(msg-id).key) {
  /do stuff here
}


I've made a bug report about the inconsistancies of $msgtags HERE

Last edited by FroggieDaFrog; 13/11/15 09:12 PM.

I am SReject
My Stuff
FroggieDaFrog #255683 13/11/15 09:31 PM
Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
So maybe i need to clarify what exactly i am trying to do to see if my expectations can actually be achieved.

Let's say i want to time out a particular word,

my code would look like this:

Code:
on *:text:test:#: {
  msg # .timeout $nick 1
}


Now, sometimes the user doesn't actually get timed out. Normally what i would do is add a timer to time them out twice to make sure. I've seen even this not work, and since there is a timeout_success that get's sent back I wanted to use this to timeout people.

My code now would look like:

Code:
on *:text:test:#: {
  var %t = 2
  while (%t) {
    if (timeout_success != $msgtags(msg-id).key) { msg # .timeout $nick 1 | dec %t }
  }
  if (timeout_success == $msgtags(msg-id).key) {
    echo -a success
  }
}


Does that make sense? Or am I insane and should just keep doing timers that time out a user twice?

Last edited by keyeslol; 13/11/15 09:36 PM.

twitter @keyeslol

Link Copied to Clipboard