From 241f70f869c9d04ad13fdaa8b53ba57067426e8b Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 12 Jul 2007 15:00:45 +0000 Subject: Fixed bugs with IRC color in messages, now color codes are inserted in command line with ^Cc,^Cb,.. instead of %C,%B,.. (bug #20222, task #7060) --- doc/en/weechat.en.xml | 159 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 143 insertions(+), 16 deletions(-) (limited to 'doc/en/weechat.en.xml') diff --git a/doc/en/weechat.en.xml b/doc/en/weechat.en.xml index aebe0866d..ffd42c85f 100644 --- a/doc/en/weechat.en.xml +++ b/doc/en/weechat.en.xml @@ -804,7 +804,8 @@ along with this program. If not, see . If option for sending IRC colors ("irc_colors_send") - is enabled, you can use color codes and attributes, as follow: + is enabled, you can use color codes and attributes, as follow (press + Ctrl-C then following letter, with optional value): @@ -815,20 +816,20 @@ along with this program. If not, see . - %B + ^Cb bold text - %Cxx + ^Ccxx text color "xx" (see colors table below) - %Cxx,yy + ^Ccxx,yy text color "xx" and background "yy" @@ -836,38 +837,32 @@ along with this program. If not, see . - %O + ^Co disable color and attributes - %R + ^Cr reverse video (revert text color with background) - %U + ^Cu underlined text - - %% - - display one "%" - - - Note: the same code (without number for %C) may be used to stop the + Note: the same code (without number for ^Cc) may be used to stop the attribute. - Color codes for %C are: + Color codes for ^Cc are: @@ -950,7 +945,7 @@ along with this program. If not, see . Example: display of "hello everybody!" with "hello" in light blue bold, and "everybody" in light red underlined: -%C12%Bhello%B%C04%U everybody%U%C! +^Cc12^Cbhello^Cb^Cc04^Cu everybody^Cu^Cc! @@ -1850,6 +1845,62 @@ plugin->exec_on_files (plugin, "/tmp", &callback); + + To display colored text, there are following codes: + + + + + Code + Description + + + + + 0x02 + + bold text + + + + 0x03 + "xx" + + text color "xx" + (see for colors) + + + + 0x03 + "xx,yy" + + text color "xx" + and background "yy" + (see for colors) + + + + 0x0F + + disable color and attributes + + + + 0x12 + + reverse video (revert text color with background) + + + + 0x1F + + underlined text + + + + + + Note: the same code (without number for 0x03) may be used to stop + the attribute. + Return value: none. @@ -1859,6 +1910,10 @@ plugin->exec_on_files (plugin, "/tmp", &callback); plugin->print (plugin, NULL, NULL, "hello"); plugin->print (plugin, NULL, "#weechat", "hello"); plugin->print (plugin, "freenode", "#weechat", "hello"); +plugin->print (plugin, NULL, NULL, + "test: \x02 bold \x0F\x03%02d blue \x03%02d green", + plugin->get_irc_color (plugin, "blue"), + plugin->get_irc_color (plugin, "green")); @@ -1891,6 +1946,9 @@ plugin->print (plugin, "freenode", "#weechat", "hello"); + + To display colored text, see . + Return value: none. @@ -5253,6 +5311,9 @@ weechat.set_charset("ISO-8859-1") + + To display colored text, see . + Return value: 1 if success, 0 if an error occurred. @@ -5263,6 +5324,7 @@ weechat.set_charset("ISO-8859-1") weechat::print("message"); weechat::print("message", "#weechat"); weechat::print("message", "#weechat", "freenode"); +weechat::print("test: \x0305 red \x0F normal"); # python weechat.prnt("message") @@ -5282,6 +5344,71 @@ weechat.print("message", "#weechat", "freenode") +
+ print_server + + + Perl prototype: + + weechat::print_server(message) + + + + Python prototype: + + weechat.print_server(message) + + + + Ruby prototype: + + Weechat.print_server(message) + + + + Lua prototype: + + weechat.print_server(message) + + + + Display a message on server buffer. + + + Arguments: + + + + : message + + + + + + To display colored text, see . + + + Return value: 1 if success, 0 if an error occurred. + + + Examples: + +# perl +weechat::print_server("message"); +weechat::print_server("test: \x0305 red \x0F normal"); + +# python +weechat.print_server("message") + +# ruby +Weechat.print_server("message") + +-- lua +weechat.print_server("message") + + +
+
print_infobar -- cgit v1.2.3