return sprintf "\003%d%s", $rcolors[$col % @rcolors], $nick;
}
+my %gui_commands = (
+ 'clear' => [ 'COLOR 0' ],
+ 'highlight' => [ 'FLASH' => 'COLOR 3' ],
+);
+
+sub gui {
+ my $commands = $gui_commands{$_[0] || 'nope'};
+ die 'Invalid command' unless defined $commands;
+ command "GUI $_" for @$commands;
+}
+
sub save_context {
my $cur_cxt = get_context;
bless \$cur_cxt, 'Xchat::XPI::Utils::ContextGuard';
our @EXPORT = ();
our %EXPORT_TAGS = ('funcs' => [ qw<
dye_nick
+ gui
save_context local_context
called_from_script
> ]);