diff options
| author | Jari Matilainen | 2017-04-24 22:50:32 +0200 |
|---|---|---|
| committer | Jari Matilainen | 2017-04-24 22:50:32 +0200 |
| commit | edbfe4ab2163902408da5f688233f8046fc57509 (patch) | |
| tree | e423f0d6398f6843165bcf7a29b2117830ff5fa3 | |
| parent | 61a0592a8f1240f3a10744a9e752a2cbe81b7fce (diff) | |
| download | scripts.irssi.org-edbfe4ab2163902408da5f688233f8046fc57509.tar.bz2 | |
when using -purge it's defined but valueless
| -rw-r--r-- | scripts/notes.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/notes.pl b/scripts/notes.pl index ea60379..28ba217 100644 --- a/scripts/notes.pl +++ b/scripts/notes.pl @@ -145,7 +145,7 @@ sub cmd_notes_del { my $patt = join('|', @chatnets); my @networks = grep {/$patt/i} keys %$args; - my $purge = $args->{purge}; + my $purge = (defined $args->{purge} ? 1 : 0); unless ($purge || ($type && $pattern)) { _error "Could not parse command\n" . usage(), $witem; return; @@ -253,9 +253,9 @@ Irssi::command_bind('notes' => sub { Irssi::command_runsub ('notes', $data, $server, $item ) ; }); -Irssi::command_bind('notes add', \&cmd_notes_add); -Irssi::command_bind('notes del', \&cmd_notes_del); -Irssi::command_bind('notes list', \&cmd_notes_list); +Irssi::command_bind('notes add', 'cmd_notes_add'); +Irssi::command_bind('notes del', 'cmd_notes_del'); +Irssi::command_bind('notes list', 'cmd_notes_list'); Irssi::command_bind('notes help', sub { Irssi::active_win()->print(usage()); }); Irssi::command_set_options('notes add', join(' ', @chatnets) . ' +nick +mask'); |
