# mIRC IRCv3 tags: help!

**URL:** <https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490>\
**Category:** Chat and IRC\
**Created:** [June 12, 2015, 7:35pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490 "2015-06-12T19:35:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![arcrox](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arcrox](https://discuss.dev.twitch.com/u/arcrox)\
**Post date:** [June 12, 2015, 7:35pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/1 "2015-06-12T19:35:47Z")

</div>

I am an amateur who runs an mIRC chat bot for a small stream and am trying to update it to use IRCv3 tags in preparation for the deprecation of the TWITCHCLIENT command. I’m having trouble capturing messages sent to the console. When I attempt to capture the raw event ([http://en.wikichip.org/wiki/mirc/raw\_events](http://en.wikichip.org/wiki/mirc/raw_events)), I don’t receive any of the IRCv3 meta tags.

Raw message example:

```
<- @color=#FF4500;display-name=arcRox;emotes=;subscriber=0;turbo=0;user-type=mod;user_type=mod :arcrox!arcrox@arcrox.tmi.twitch.tv PRIVMSG #nutribot :123test

```

Using the following remote event:

```
raw *:*: { echo -t @raw RAW: nick $nick string $1- }

```

I get the following echo:

```
RAW: nick tmi.twitch.tv string arcrox!arcrox@arcrox.tmi.twitch.tv PRIVMSG #nutribot :123test

```

What am I missing to get the all the meta tag information?

edit: to clarify, I have sent the following commands to enable IRCv3 tags:

```
CAP REQ :twitch.tv/membership
CAP REQ :twitch.tv/commands
CAP REQ :twitch.tv/tags       

```

I see all the information in my console/status window. I just can’t seem to find a way to capture the and parse the meta tags.

---

<div class="post-metadata">

**Author:** ![tournymasterbotCurse](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@tournymasterbotCurse](https://discuss.dev.twitch.com/u/tournymasterbotCurse)\
**Post date:** [June 12, 2015, 7:50pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/2 "2015-06-12T19:50:29Z")

</div>

[https://github.com/justintv/Twitch-API/blob/master/chat/capabilities.md](https://github.com/justintv/Twitch-API/blob/master/chat/capabilities.md)

You want

`CAP REQ :twitch.tv/tags`

---

<div class="post-metadata">

**Author:** ![arcrox](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arcrox](https://discuss.dev.twitch.com/u/arcrox)\
**Post date:** [June 12, 2015, 7:56pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/3 "2015-06-12T19:56:56Z")

</div>

Yes, I have sent CAP REQ :twitch.tv/tags which is why I even see the meta tags at all in my console/status window. I am just having trouble capturing and parsing them.

---

<div class="post-metadata">

**Author:** ![splinny](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/splinny/32/495_2.png) [@splinny](https://discuss.dev.twitch.com/u/splinny)\
**Post date:** [June 12, 2015, 9:19pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/4 "2015-06-12T21:19:00Z")

</div>

you need $rawmsg isntead of $1-

---

<div class="post-metadata">

**Author:** ![arcrox](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arcrox](https://discuss.dev.twitch.com/u/arcrox)\
**Post date:** [June 12, 2015, 9:52pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/5 "2015-06-12T21:52:21Z")

</div>

Thank you!!!

---

<div class="post-metadata">

**Author:** ![keyeslol](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/keyeslol/32/1841_2.png) [@keyeslol](https://discuss.dev.twitch.com/u/keyeslol)\
**Post date:** [June 18, 2015, 1:54am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/6 "2015-06-18T01:54:18Z")

</div>

How did you manage to change your code in your remote to read console messages?

---

<div class="post-metadata">

**Author:** ![arcrox](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arcrox](https://discuss.dev.twitch.com/u/arcrox)\
**Post date:** [June 18, 2015, 4:08am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/7 "2015-06-18T04:08:57Z")

</div>

```
raw *:*: {
  if $nick == tmi.twitch.tv {
    if PRIVMSG isin $rawmsg {
      tokenize 59 $rawmsg
      ;echo -t @raw rawmsg tokens num: $0 1: $1 2: $2 3: $3 4: $4 5: $5 6: $6
      set %displayname $remove($2, display-name=)      
      set %subscriber $remove($4, subscriber=)
      tokenize 32 $6-
      ;echo -t @raw tokens num: $0 1: $1 2: $2 3: $3 4: $4 5: $5
      set %usertype $remove($1, user-type=)
      if (%displayname == $null) { set %displayname $mid($2, 2, $calc($pos($2, !) - 2)) }            
      set %msgtype $3
      set %chan $4
      set %msg $mid($5-, 2, $len($5-))
      ;echo -t @raw %msgtype on %chan (usertype: %usertype sub: %subscriber $+ ) < $+ %displayname $+ > %msg
      echo -t %chan < $+ $iif(%usertype != $null, @, $null) $+ %displayname $+ > %msg
      if (%displayname != bot_name) { parsecommand %msg }
      unset %displayname
      unset %subscriber
      unset %usertype
      unset %msgtype
      unset %chan
      unset %msg
    }
    elseif CLEARCHAT isin $rawmsg {
      tokenize 32 $rawmsg
      var %chan = $3
      var %user = $remove($4, $chr(58))
      if %user != $null {
        ;echo -t @raw user %user timed out on %chan
        echo -t %chan **%user has been timed out.**
        inc %bancount
        if (%chan == %mainchannelname) { hashstore bancount %user }
        if $inlist(%user, %unbanlist) { msg %chan .unban %user }
      }
    }
    elseif NOTICE isin $rawmsg {
      tokenize 32 $rawmsg
      echo -ts tokens num: $0 1: $1 2: $2 3: $3 4: $4 5-: $5-
      var %chan = $4
      var %notice = $mid($5-, 2, $len($5-))
      echo -t %chan **%notice**
    }
    else { $null }
  }
}
```

---

<div class="post-metadata">

**Author:** ![SReject](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SReject](https://discuss.dev.twitch.com/u/SReject)\
**Post date:** [June 18, 2015, 10:43am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/8 "2015-06-18T10:43:25Z")

</div>

Please note, that using IRCv3 with mIRC in the above manner bypasses alot of internal functionality of mIRC (such as on text events not firing). There is a feature suggestion to fix this within mIRC that can be found [HERE](http://forums.mirc.com/ubbthreads.php/topics/252880/Pre-parsing_Events#Post253083) if you’d like to show your support

---

<div class="post-metadata">

**Author:** ![keyeslol](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/keyeslol/32/1841_2.png) [@keyeslol](https://discuss.dev.twitch.com/u/keyeslol)\
**Post date:** [June 18, 2015, 11:26pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/9 "2015-06-18T23:26:04Z")

</div>

Thanks SReject!

---

<div class="post-metadata">

**Author:** ![keyeslol](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/keyeslol/32/1841_2.png) [@keyeslol](https://discuss.dev.twitch.com/u/keyeslol)\
**Post date:** [June 18, 2015, 11:26pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/10 "2015-06-18T23:26:37Z")

</div>

Thank you arcrox for providing this. Parsecommand unknown command is being displayed though. This gives me good ideas on how to utilize the sub = 1.

---

<div class="post-metadata">

**Author:** ![arcrox](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arcrox](https://discuss.dev.twitch.com/u/arcrox)\
**Post date:** [June 19, 2015, 12:15am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/11 "2015-06-19T00:15:08Z")

</div>

Yes, parsecommand is an alias in my script specific to my bot. The general idea is that’s the point in the code that will direct to the sub that will decipher all the commands the bot receives. Posting my code here would be a little overwhelming as there are lots of pieces that depend on others and 5 different pathways for commands to get parsed. I’m also changing things constantly…today for instance, I added whisper capability to my bot.

---

<div class="post-metadata">

**Author:** ![keyeslol](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/keyeslol/32/1841_2.png) [@keyeslol](https://discuss.dev.twitch.com/u/keyeslol)\
**Post date:** [June 19, 2015, 12:26am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/12 "2015-06-19T00:26:19Z")

</div>

So yes now i see what this code is doing, it’s echoing in the channel, essentially the old way. However like SReject said, on text events don’t fire.

Since my bot is still working with workarounds i’ve implemented, i’ll wait before making the jump into v3 until i get a better understanding.

Thanks guys!

---

<div class="post-metadata">

**Author:** ![Bill\_Larson](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@Bill\_Larson](https://discuss.dev.twitch.com/u/Bill_Larson)\
**Post date:** [June 27, 2015, 12:04am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/13 "2015-06-27T00:04:01Z")

</div>

In the newest mirc which is still in beta, there is a $msgtags identifier which returns color=#1E90FF;display-name=Lilqx;emotes=46354:7-17;subscriber=0;turbo=0;user-type=

To check if someone is a subscriber you can do:

if subscriber=1 isin $msgtags {  
…insert code here…  
}

to check if the user was a mod you can do

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

The messages display in channel properly, and all the capability requests work fine.

---

<div class="post-metadata">

**Author:** ![SReject](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SReject](https://discuss.dev.twitch.com/u/SReject)\
**Post date:** [June 27, 2015, 3:31am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/14 "2015-06-27T03:31:18Z")

</div>

Please note that it is a closed beta, and not available for download as of yet. There are still features to be added and bugs to be fixed before the beta will be made public

---

<div class="post-metadata">

**Author:** ![Bill\_Larson](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@Bill\_Larson](https://discuss.dev.twitch.com/u/Bill_Larson)\
**Post date:** [July 21, 2015, 6:41am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/15 "2015-07-21T06:41:09Z")

</div>

> [@Bill\_Larson](#):
>
> check if the user was a mod you can do
> 
> if user-type=mod isin $msgtags {…insert code here etc…

It’s out now.

---

<div class="post-metadata">

**Author:** ![keyeslol](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/keyeslol/32/1841_2.png) [@keyeslol](https://discuss.dev.twitch.com/u/keyeslol)\
**Post date:** [August 7, 2015, 3:09pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/16 "2015-08-07T15:09:26Z")

</div>

With the latest version, it does not appear to be reading $msgtags, as i wrote some quick code to see if subscriber=1 or not.

I am running 7.43 which has $msgtags in the release notes. Any ideas?

---

<div class="post-metadata">

**Author:** ![MattiSony](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/mattisony/32/1558_2.png) [@MattiSony](https://discuss.dev.twitch.com/u/MattiSony)\
**Post date:** [August 7, 2015, 11:42pm UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/17 "2015-08-07T23:42:13Z")

</div>

Are you requesting the [twitch.tv/tags](http://twitch.tv/tags) capabilities?

---

<div class="post-metadata">

**Author:** ![keyeslol](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/keyeslol/32/1841_2.png) [@keyeslol](https://discuss.dev.twitch.com/u/keyeslol)\
**Post date:** [August 8, 2015, 3:50am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/18 "2015-08-08T03:50:15Z")

</div>

Yup, i’ve requested membership, tags, commands via cap req.

---

<div class="post-metadata">

**Author:** ![MattiSony](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/mattisony/32/1558_2.png) [@MattiSony](https://discuss.dev.twitch.com/u/MattiSony)\
**Post date:** [August 8, 2015, 4:11am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/19 "2015-08-08T04:11:51Z")

</div>

just tested it and it’s working fine here.  
I used this to test it 😛

on _:text:!test_:#: {  
if (subscriber=1 isin $msgtags) {  
msg # You’re a sub  
}  
else { you’re not a sub  
}  
}

---

<div class="post-metadata">

**Author:** ![MattiSony](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/mattisony/32/1558_2.png) [@MattiSony](https://discuss.dev.twitch.com/u/MattiSony)\
**Post date:** [August 8, 2015, 4:14am UTC](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490/20 "2015-08-08T04:14:51Z")

</div>

oops, it takes away the star, so add a \* in front of :test: 😛

[Next page](https://discuss.dev.twitch.com/t/mirc-ircv3-tags-help/2490.md?page=2)
