XChat Text Events



Contents

Text Events dialog
What does %C, %B, %U, %H, %O, $t, $1, $2, $3 and $4 mean?
Unhide/Add brackets around nicks
Show mode chars ~ @ % + in front of the nick with $3
Add round brackets around nicks
Mode char and nickname in separate colors
Bold brackets and text color
Text Event 'Your message'
Add brackets and color to your own nickname and change your own text color
Edit other text events - Color numbers, Color codes
CTRL codes
Color/Attribute buttons (Win32)




Text Events dialog

To change XChat's output strings open up Settings -> Advanced -> Text Events menu.. to display the current settings.



The box near the bottom of the 'Edit Events' window shows 2 columns named '$ Number' and 'Description'.
They tell you what the $1, $2, $3, $4 mean in the edit box.

Do not forget to hit enter in the edit box after modifying the event and before clicking the "OK" button or the event will not save!

So %C18%H<%H$4$1%H>%H%O$t$2 means here:

%C18- Color code %C with color number 18 (blue)
%H- Hides the brackets
$4- Identified text
$1- Nickname
%O- End of codes (capital letter O)
$t- Text separator
$2- Text


Event: Channel Message
The nicks and text will now look like this (default):





What does %C, %B, %U, %H, %O, $t, $1, $2, $3 and $4 mean?

%C = Color.
%B = Bold.
%U = Underlined.
%H = Hide.
%O = End of codes.
  $t = Text separator.

Usage:
%C
For colored text place %Cxx, where xx is the color number, at the beginning of your text. %C4 sets red, %C12 sets blue etc.,
'%C ' sets the default color (notice the space after it, without the quote marks).
To color both the fore- and background use %Cxx,yy where xx = foreground color and yy = background color.


%B
For bold text place %B at the beginning of the text you want to show bold and add another %B where you want the bold text to stop.


%U

For underlined text place %U at the beginning of the text you want to show underlined and add another %U where you want the underlined text to stop.


%H
%H hides text/character(s). Place %H at the beginning of the text/character you want to hide and add another %H where you want to end your hidden text/character
(Hides the brackets around the nick from the screen, but will show on a copy/paste text).


%O
%O will end all codes. e.g., in stead of %C4%B%UHello%U%B%CO you could use %C4%B%UHello%O


$t
The $t is a text separator which separates the nicks from the text. The text separator makes the nicks show on the left side of the separator line (indent nick names(right-justified)) and the text on the right side of the separator line.


~~~


Check the '$ Number' and 'Description' columns to see what $1, $2, $3, $4 mean for each event.

For event 'Channel Message':

$1
The $1 stands for the nickname.

$2
The $2 is the text others type.

$3

The $3 can be used to show mode chars ~ @ % + in front of the nick.

$4
The $4 can only be used on networks with CAPAB Identify support (like Freenode). It can be used to see who is identified with NickServ and who is not. e.g.,

/set irc_id_ytext %U

Shows all identified nicks underlined (see picture).

/set irc_id_ntext %C4

Will show all unidentified nicks in red.

In this picture all identified nicks are underlined.




Unhide/Add angle brackets around nicks

To add or show brackets around nicks and add color look up 'Channel Message' in the 'Event' column and click on it. Now you can edit the string that appears in the edit box.

Remove the %H's this make the angle brackets show around the nicks.
If you are using an older XChat version just add the brackets here.

You can also color the brackets, here I've made them red with %C4

Do not forget to hit enter in the edit box after modifying the event and before clicking the "OK" button or the event will not save!



Event: Channel Message

The nicks and text will now look like this:





Show mode chars ~ @ % + next to the nick with $3

Place the mode char ($3) on the left side of the nick ($1) to show mode chars ~ @ % + in front of the nick.

Do not forget to hit enter in the edit box after modifying the event and before clicking the "OK" button or the event will not save!



Event: Channel Message

The nicks and text will now look like this:





Add round brackets around nicks

Add or replace the angle brackets < > with round brackets ( ).

Do not forget to hit enter in the edit box after modifying the event and before clicking the "OK" button or the event will not save!



Event: Channel Message

The nicks and text will now look like this:





Mode chars and nickname in separate colors

Here a blue color %C18 is used for the mode chars and a green color %C3 for the nickname.

Do not forget to hit enter in the edit box after modifying the event and before clicking the "OK" button or the event will not save!



Event: Channel Message

The nicks and text will now look like this:





Bold brackets and text color

Here I've changed the color of the brackets to green and made them bold. The nickname is red and the color of the text is made brown.

Do not forget to hit enter in the edit box after modifying the event and before clicking the "OK" button or the event will not save!



Event: Channel Message

The nicks and text will now look like this:





Text Event 'Your Message'

To use colors and/or brackets for your own nickname and text you will need to edit 'Your Message' in the Edit Events dialog.
The default settings look like in the picture.

Do not forget to hit enter in the edit box after modifying the event and before clicking the "OK" button or the event will not save!



%C31%H<%H$4$1%H>%H%O%C30$t$2 means here:

%C31- Color code %C with color number 31 (light grey)
%H- Hides the brackets
$4- Identified text
$1- Your nickname
%O- End of codes (capital letter O)
%C30- Color code %C with color number 30 (dark grey)
$t- Text separator
$2- Text you type



Event: Your Message
Your own nick and text will now look like this (default):





Add brackets and color to your own nickname and change your own text color

The %H's to hide brackets are removed, it will now show brackets around your own nickname. Here I added another bracket on both sides of the nickname so the nickname will now have double brackets on each side.
The brackets are made purple with %C6, %C13 (pink) is used for the modechars($3) @ % +, the nickname($1) is made green with %C3 and the text($2) color is made blue with %C12.
Go to Settings -> Preferences -> Colors to get the color numbers.

Do not forget to hit enter in the edit box after modifying the event and before clicking the "OK" button or the event will not save!



Event: Your Message

Your own nick and text will now look like this:





Edit other text events

Now that you know how to add brackets around nicks and how to change the color of nicks and text, you can edit other events too. :)



Go to Settings -> Preferences -> Colors to get the color numbers or you can just add your own colors by clicking the color boxes.



%C6 = purple
%C4 = red
%C12 = blue
%C19 = green
%C0 = white
%C8 = yellow
%C1,8 will give black text on a yellow background
%B%C0,22 will give white bold text on a purple background
%U%B%C25,1 will give green bold underlined text on a black background




CTRL Codes

If you just want to type some colored or bold text in your channel you can also use the CTRL codes (like in mIRC press and hold the CTRL key then type K<colornumber>/B/U/O):
CTRL+K (color), CTRL+B (bold), CTRL+U (underlined) and CTRL+O (end of codes).

E.g. to type colored text in yellow bold with a blue background you could type:

CTRL+BK8,2 Hello!

It will look like this in your channel:

Hello!




Color/Attribute buttons (Win32)

In XChat 2.8.7 and above (Windows only) it is possible to use Color/Attribute buttons in the topic bar and input box.

The buttons will show when you click in the topic bar or click the hidden button "|" on the right side of the input box.










Help Auto Replace Buttons Charset Connect
CTCP Replies     Downloads Help Commands     Ignore Popups
Screenshots SET Variables     Spell Checking Strftime Text Events
Themes Timers Tips & Tricks User Commands     xchat-gnome!=xchat



XChat Official
- Documentation
- Download
- FAQ
- Forum
- News
- Scripts & Plugins



changed February 11, 2012