mIRC Home    About    Download    Register    News    Help

Print Thread
#254369 07/08/15 03:20 PM
Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
With the latest release of mirc, $msgtags support is supposed to be included.

I am trying to read in ircv3 tags, using this new identifier and wrote some simple code to check. I've requested tags using the appropriate CAP REQ.

Code:
  if (subscriber=1 isin $msgtags) {
    echo -a yes
  }
  if (subscriber=0 isin $msgtags) {
    echo -a no
  }


My expectation is for yes to be output, with the assumption that subscriber is indeed 1.


twitter @keyeslol
Joined: Sep 2014
Posts: 52
Babel fish
Offline
Babel fish
Joined: Sep 2014
Posts: 52
I believe this works:

Code:
  if ($msgtags(subscriber).key == 1) {
    echo -a yes
  }
  if ($msgtags(subscriber).key == 0) {
    echo -a no
  }

Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
I am getting the same result. One thing i've noticed, since upgrading to 7.43 i no longer am receiving raw events. Could this be the issue? Or did 7.43 parse raw silently.


twitter @keyeslol
Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Originally Posted By: keyeslol
I am getting the same result. One thing i've noticed, since upgrading to 7.43 i no longer am receiving raw events. Could this be the issue? Or did 7.43 parse raw silently.


I figured this out, as for some reason my PC i was testing from had some sort of issue. The correct way is:

Code:
if subscriber=1 isin $msgtags {
...insert code here...
}

if user-type=mod isin $msgtags {
...insert code here etc...
}


twitter @keyeslol

Link Copied to Clipboard