Skip to content

Commit

Permalink
upped the version, blacklist now updates without need for reloading t…
Browse files Browse the repository at this point in the history
…he script
  • Loading branch information
terminaldweller committed Aug 21, 2023
1 parent d49cd47 commit d32d350
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/irssi_logger.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# - postgresql
# - postgresql-contrib (pg_trgm)

$VERSION = "1.0";
$VERSION = "1.1";
%IRSSI = (
authors => "Aaron Bieber",
contact => "deftly\@gmail.com",
Expand Down Expand Up @@ -134,6 +134,10 @@ sub log {
write_db($nick, $message, $target)
}

sub setup_changed {
%blacklist = map{$_ => undef} split /\s+/, Irssi::settings_get_str('il_blacklist');
}

Irssi::signal_add_last('message public', 'log');
Irssi::signal_add_last('message own_public', 'log_me');

Expand All @@ -145,5 +149,8 @@ sub log {
# a space separated list of channel names to exclude from logging
Irssi::settings_add_str('irssi_logger', 'il_blacklist', "");

Irssi::signal_add('setup changed' => 'setup_changed');


%blacklist = map{$_ => undef} split /\s+/, Irssi::settings_get_str('il_blacklist');
Irssi::print("irssi_logger loaded!");

0 comments on commit d32d350

Please sign in to comment.