XCHAT - Nick Message - Color

Platform:  Perl
Published  Apr 12, 2011
Updated  Nov 29, 2011
When you type it changes the color of your message. Example: The Dog Ran < Changed to Blue text. #############################################################################
#!/usr/bin/perl

use warnings;
use Xchat qw( :all );

#############################################################################
my $version = "1.0";
Xchat::register("Nick Color", $version, "Displays Nick Colors!","");
IRC::print('Loaded - IRC Nick Colors -');

Xchat::print('Description: When you type it changes the color of your message. Example: The Dog Ran - Changed to Blue text. ');

##############################################################
my $textcolor = "44"; #desired text color
my $highlight = "00"; #desired highlight background
##############################################################

sub Colors{
$text=shift@_;
IRC::command ("\003$textcolor$text");
return 1;
}

IRC::add_command_handler("", "IRC::Xchat:Color::Colors");

Comments

Sign in to comment.
cmrocks   -  Apr 12, 2011
Notice:
IRC::command ("\003$textcolor$text"); should be IRC::command ("\003$textcolor$text \003"); to end the color!

Have fun coding!
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.