Search code examples
c#irc

Embed mIRC Color codes into a C# literal?


I'm working on a simple irc bot in C#, and I can't figure out how to embed the typical mirc control codes for bold/color etc into string literals.

Can someone point me towards how to do this?


Solution

  • The mIRC color code format is described here. I guess you're asking how to embed a ^C in a string.

    This is known as Caret notation. According to C0 and C1 control codes, ^C is:

    '\x03'
    

    Embedded in a string:

    "blabla \x035,12to be colored text and background\x03 blabla"