projects
/
twirssi-net-twitter-lite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
01e6bdc
)
hilight the $meta{account} in a tweet with the irssi hilight_color. needs a hacky...
author
Brian S. Stephan
<bss@emptymatter.org>
Fri, 23 Jan 2009 01:39:04 +0000
(19:39 -0600)
committer
Brian S. Stephan
<bss@emptymatter.org>
Fri, 23 Jan 2009 01:39:04 +0000
(19:39 -0600)
twirssi.pl
patch
|
blob
|
history
diff --git
a/twirssi.pl
b/twirssi.pl
index a1b4bcf6e80e0636d9b8cdadeeb7d275d4ff6654..8f6be2507a965599af5a6789e72e267118ba0007 100644
(file)
--- a/
twirssi.pl
+++ b/
twirssi.pl
@@
-34,6
+34,24
@@
my %friends;
my $last_poll = time - 300;
my %tweet_cache;
my %id_map;
my $last_poll = time - 300;
my %tweet_cache;
my %id_map;
+my %irssi_to_mirc_colors = (
+ '%k' => '01',
+ '%r' => '05',
+ '%g' => '03',
+ '%y' => '07',
+ '%b' => '02',
+ '%m' => '06',
+ '%c' => '10',
+ '%w' => '15',
+ '%K' => '14',
+ '%R' => '04',
+ '%G' => '09',
+ '%Y' => '08',
+ '%B' => '12',
+ '%M' => '13',
+ '%C' => '11',
+ '%W' => '00',
+);
sub cmd_direct {
my ( $data, $server, $win ) = @_;
sub cmd_direct {
my ( $data, $server, $win ) = @_;
@@
-734,7
+752,8
@@
sub monitor_child {
$marker = ":$marker";
}
$marker = ":$marker";
}
- if ( $_ =~ /\@$meta{account}\W/ ) {
+ my $hilight_color = $irssi_to_mirc_colors{Irssi::settings_get_str("hilight_color")};
+ if ( $_ =~ s/\@($meta{account})\W/\cC$hilight_color\@$1\cO/g ) {
$hilight = MSGLEVEL_HILIGHT;
}
$hilight = MSGLEVEL_HILIGHT;
}