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:
d4c8bc6
)
if the tweet contains the {account}, also print the message at MSGLEVEL_HILIGHT
author
Brian S. Stephan
<bss@emptymatter.org>
Fri, 23 Jan 2009 01:02:12 +0000
(19:02 -0600)
committer
Brian S. Stephan
<bss@emptymatter.org>
Fri, 23 Jan 2009 01:02:12 +0000
(19:02 -0600)
twirssi.pl
patch
|
blob
|
history
diff --git
a/twirssi.pl
b/twirssi.pl
index e575b0751216dca8675f999b67d37c8a859f4904..edb207ea0432f9952f17cc65b938556c04fb9faa 100644
(file)
--- a/
twirssi.pl
+++ b/
twirssi.pl
@@
-707,6
+707,7
@@
sub monitor_child {
while (<FILE>) {
chomp;
last if /^__friends__/;
while (<FILE>) {
chomp;
last if /^__friends__/;
+ my $hilight = 0;
my %meta;
foreach my $key (qw/id account nick type/) {
if (s/^$key:(\S+)\s*//) {
my %meta;
foreach my $key (qw/id account nick type/) {
if (s/^$key:(\S+)\s*//) {
@@
-733,12
+734,16
@@
sub monitor_child {
$marker = ":$marker";
}
$marker = ":$marker";
}
+ if ( $_ =~ /\@$meta{account}\W/ ) {
+ $hilight = MSGLEVEL_HILIGHT;
+ }
+
if ( $meta{type} eq 'tweet' ) {
if ( $meta{type} eq 'tweet' ) {
- push @lines, [
MSGLEVEL_PUBLIC
, $meta{type}, $account, $meta{nick}, $marker, $_];
+ push @lines, [
(MSGLEVEL_PUBLIC | $hilight)
, $meta{type}, $account, $meta{nick}, $marker, $_];
} elsif ( $meta{type} eq 'reply' ) {
} elsif ( $meta{type} eq 'reply' ) {
- push @lines, [
MSGLEVEL_PUBLIC
, $meta{type}, $account, $meta{nick}, $marker, $_];
+ push @lines, [
(MSGLEVEL_PUBLIC | $hilight)
, $meta{type}, $account, $meta{nick}, $marker, $_];
} elsif ( $meta{type} eq 'dm' ) {
} elsif ( $meta{type} eq 'dm' ) {
- push @lines, [
MSGLEVEL_MSGS
, $meta{type}, $account, $meta{nick}, $_];
+ push @lines, [
(MSGLEVEL_MSGS | $hilight)
, $meta{type}, $account, $meta{nick}, $_];
} elsif ( $meta{type} eq 'error' ) {
$window->print("ERROR: $_", MSGLEVEL_PUBLIC);
} elsif ( $meta{type} eq 'debug' ) {
} elsif ( $meta{type} eq 'error' ) {
$window->print("ERROR: $_", MSGLEVEL_PUBLIC);
} elsif ( $meta{type} eq 'debug' ) {