aboutsummaryrefslogtreecommitdiff
path: root/idalius.pl
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-09-10 20:55:16 +1200
committerDavid Phillips <david@sighup.nz>2018-09-10 20:55:16 +1200
commita2e167cbe2ace2ded2b19c12513100d5be5247db (patch)
treee5ff196867fb7830bff41a0f6ab293131c027bcf /idalius.pl
parent7fa7d0a4e3011caa6ad824c59cde43d4fe7c485b (diff)
downloadidalius-a2e167cbe2ace2ded2b19c12513100d5be5247db.tar.xz
Strip leading and trailing whitespace in handle_common
Diffstat (limited to 'idalius.pl')
-rwxr-xr-xidalius.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/idalius.pl b/idalius.pl
index d65a4e1..1771171 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -205,6 +205,8 @@ sub handle_common {
# Return early if should ignore
return if should_ignore($nick);
+ $what =~ s/^\s+|\s+$//g;
+
my $stripped_what = strip_color(strip_formatting($what));
my $no_prefix_what = $stripped_what;
if ($config{prefix_nick} && $no_prefix_what =~ s/^\Q$current_nick\E[:,]\s+//g ||