# Retreive sent messages back from the IRC server

**URL:** <https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603>\
**Category:** Chat and IRC\
**Created:** [February 11, 2015, 12:56am UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603 "2015-02-11T00:56:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpaksoy](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tpaksoy](https://discuss.dev.twitch.com/u/tpaksoy)\
**Post date:** [February 11, 2015, 12:56am UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/1 "2015-02-11T00:56:11Z")

</div>

I’m writing a simple IRC client. I’m trying to utilize the IRCv3 tags. When sending messages to a channel, the line looks like this:

`1423614744866 >>>PRIVMSG #lirik :test`

What I would like to see is:

`1423614744866 @color=#8A2BE2;emotes=;subscriber=1;turbo=0;user_type= :tpaksoy!tpaksoy@tpaksoy.tmi.twitch.tv PRIVMSG #lirik :test`

so that I know what my own chat color is and whether I’m subscribed to the channel and that I have turbo.

I there some IRC CAP that I can turn on to retreive the PRIVMSGs I send to the IRC server back with message tags?

---

<div class="post-metadata">

**Author:** ![george](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/george/32/120_2.png) [@george](https://discuss.dev.twitch.com/u/george)\
**Post date:** [February 11, 2015, 10:14am UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/2 "2015-02-11T10:14:22Z")

</div>

If you `CAP REQ :twitch.tv/commands` you should also get a USERSTATE command on channel join (and I believe when sending a message) with the color.

---

<div class="post-metadata">

**Author:** ![tpaksoy](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tpaksoy](https://discuss.dev.twitch.com/u/tpaksoy)\
**Post date:** [February 11, 2015, 12:29pm UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/3 "2015-02-11T12:29:19Z")

</div>

Thank you George, that partially works. I can get the color and sub info back. Too bad the emote message tag is not provided. Its only a “USERSTATE” and it doesn’t know anything about the message I sent.

Do you by any chance have a list of CAPs that the Twitch TMI accepts?

---

<div class="post-metadata">

**Author:** ![george](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/george/32/120_2.png) [@george](https://discuss.dev.twitch.com/u/george)\
**Post date:** [February 11, 2015, 1:29pm UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/4 "2015-02-11T13:29:35Z")

</div>

tags and commands are the only ones at this time.

---

<div class="post-metadata">

**Author:** ![Freddy](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/freddy/32/111_2.png) [@Freddy](https://discuss.dev.twitch.com/u/Freddy)\
**Post date:** [February 11, 2015, 11:25pm UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/5 "2015-02-11T23:25:29Z")

</div>

unrelated to the topic but can you combine tag and commands or are they exclusive.  
If you can combine them how would you do it. Send both commands separately or in one message?

---

<div class="post-metadata">

**Author:** ![george](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/george/32/120_2.png) [@george](https://discuss.dev.twitch.com/u/george)\
**Post date:** [February 11, 2015, 11:37pm UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/6 "2015-02-11T23:37:28Z")

</div>

`CAP REQ :twitch.tv/tags twitch.tv/commands` or as separate commands. They both work.

---

<div class="post-metadata">

**Author:** ![tpaksoy](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tpaksoy](https://discuss.dev.twitch.com/u/tpaksoy)\
**Post date:** [February 19, 2015, 7:29am UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/7 "2015-02-19T07:29:00Z")

</div>

George, this workflow forces me to implement two completely different emoticon parsing and replacing because I have to use use emoticon\_set for my sent messages, and the IRCv3 emoticon-tag for incoming messages. I hope it will be possible to retrieve your own message back from the IRC server WITH all the corresponding message tags so I can apply the same logic as incoming messages to the outgoing messages.

Edit: I forgot to mention, but the USERSTATE only gives back the emoticon\_set and does not know anything about my previously sent message (obviously).

---

<div class="post-metadata">

**Author:** ![george](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/george/32/120_2.png) [@george](https://discuss.dev.twitch.com/u/george)\
**Post date:** [February 19, 2015, 10:17am UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/8 "2015-02-19T10:17:34Z")

</div>

You have two options:

1. Separate parsing for your own messages and those from other users. Twitch’s web client uses this method
2. Separate connections for sending and receiving messages. You’ll see your own messages back if they are on different connections.

---

<div class="post-metadata">

**Author:** ![tpaksoy](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tpaksoy](https://discuss.dev.twitch.com/u/tpaksoy)\
**Post date:** [February 19, 2015, 10:32am UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/9 "2015-02-19T10:32:36Z")

</div>

Hmm, I like the second option very much. That will extremely simplify my chat parsing code. Thanks for the suggestion!

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [March 1, 2015, 10:32am UTC](https://discuss.dev.twitch.com/t/retreive-sent-messages-back-from-the-irc-server/1603/10 "2015-03-01T10:32:53Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
