--- chanact.pl.orig 2003-03-10 21:12:20.000000000 +0100 +++ scripts/chanact.pl 2006-10-09 15:55:53.000000000 +0200 @@ -175,7 +175,9 @@ sub remake() { my ($afternumber,$finish,$hilight,$mode,$number,$display); my $separator = Irssi::settings_get_str('chanact_separator'); + my $remove_prefix = Irssi::settings_get_str('chanact_remove_prefix'); my $abbrev = Irssi::settings_get_int('chanact_abbreviate_names'); + my $remove_hash = Irssi::settings_get_bool('chanact_remove_hash'); $actString = ""; foreach my $win (sort { ($a->{refnum}) <=> ($b->{refnum})} Irssi::windows) { @@ -231,6 +233,9 @@ } } + if ($remove_prefix) { + $name =~ s/^([&#+!=]?)$remove_prefix/$1/; + } if ($abbrev) { if ($name =~ /^[&#+!=]/) { $name = substr($name, 0, $abbrev + 1); @@ -238,6 +243,9 @@ $name = substr($name, 0, $abbrev); } } + if ($remove_hash) { + $name =~ s/^[&#+!=]//; + } if (Irssi::settings_get_bool('chanact_show_alias') == 1 && $win->{name} =~ /^[a-zA-Z+]$/) { @@ -379,6 +387,8 @@ Irssi::settings_add_bool('chanact', 'chanact_show_alias', 1); Irssi::settings_add_str('chanact', 'chanact_separator', " "); Irssi::settings_add_bool('chanact', 'chanact_autorenumber', 0); +Irssi::settings_add_bool('chanact', 'chanact_remove_hash', 0); +Irssi::settings_add_str('chanact', 'chanact_remove_prefix', ""); Irssi::settings_add_int('chanact', 'chanact_renumber_start', 50); Irssi::settings_add_str('chanact', 'chanact_header', "Act: "); Irssi::settings_add_bool('chanact', 'chanact_chop_status', 1);