aboutsummaryrefslogtreecommitdiff
path: root/idalius.pl
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-07-14 19:21:07 +1200
committerDavid Phillips <david@sighup.nz>2017-07-14 19:21:07 +1200
commite258d5a64d837681fbb870943c8a191d7ffd626c (patch)
tree58f1bbfc606996120692b43405fc05504047a82a /idalius.pl
parent947c02157e300a7a1e3a5b2fc5c4ec96544d69e1 (diff)
downloadidalius-e258d5a64d837681fbb870943c8a191d7ffd626c.tar.xz
Strip formatting in idalius.pl once instead of each module
Diffstat (limited to 'idalius.pl')
-rwxr-xr-xidalius.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/idalius.pl b/idalius.pl
index 8f9f81b..ef157ec 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -8,6 +8,7 @@ use POE::Kernel;
use POE::Component::IRC;
use POE::Component::IRC::Plugin::NickServID;
use config_file;
+use IRC::Utils qw(strip_color strip_formatting);
use Module::Pluggable search_path => "plugin", instantiate => 'configure';
my $config_file = "bot.conf";
@@ -116,7 +117,8 @@ sub irc_public {
return if (grep {$_ eq $nick} @{$config{ignore}});
for my $module (@plugin_list) {
- my $output = $module->message($irc->nick_name, $who, $where, $what);
+ my $stripped_what = strip_color(strip_formatting($what));
+ my $output = $module->message($irc->nick_name, $who, $where, $what, $stripped_what);
$irc->yield(privmsg => $where => $output) if $output;
}