sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit b33467de9a4212b4d0c05b34dd78bfd33dc5c884
parent da79bac7d3c9e0be7d5025dd14977aaa6e7ebe83
Author: Kris Maglione <maglione.k@gmail.com>
Date:   Fri, 30 Oct 2009 05:57:38 -0400

Fix broken tab expansion.
Diffstat:
Mwmii.suckless.org/code_snippets/plan_9_port/irssi_notifier.md | 2+-
Mwmii.suckless.org/code_snippets/python/irssi_notifier.md | 15+++++++--------
2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/wmii.suckless.org/code_snippets/plan_9_port/irssi_notifier.md b/wmii.suckless.org/code_snippets/plan_9_port/irssi_notifier.md @@ -88,7 +88,7 @@ all channels. my $target = shift; my @notifies = split /,\s*/, Irssi::settings_get_str('notify_channels'); - return 1 if grep { $_ eq "*" || $_ eq $target } @notifies; + return 1 if grep { $_ eq "*" || $_ eq $target } @notifies; 0; } diff --git a/wmii.suckless.org/code_snippets/python/irssi_notifier.md b/wmii.suckless.org/code_snippets/python/irssi_notifier.md @@ -17,13 +17,12 @@ contents: return Client(client).label == 'irssi' def irc_message(whom, message): - if isirssi('sel'): - return - for c in Client.all(): - if isirssi(c): - c.urgent = True - notice.show('IRC: %s %s' % (whom, message)) - return + if not isirssi('sel'): + for c in Client.all(): + if isirssi(c): + c.urgent = True + notice.show('IRC: %s %s' % (whom, message)) + return events.bind({ Match('ClientFocus', _): lambda e, c: isirssi(c) and setattr(Client(c), 'urgent', False), @@ -90,7 +89,7 @@ notify you of messages to, or '*' to notify you for all channels. my $target = shift; my @notifies = split /,\s*/, Irssi::settings_get_str('notify_channels'); - return 1 if grep { $_ eq "*" || $_ eq $target } @notifies; + return 1 if grep { $_ eq "*" || $_ eq $target } @notifies; 0; }