aboutsummaryrefslogtreecommitdiff
path: root/idalius.pl
diff options
context:
space:
mode:
Diffstat (limited to 'idalius.pl')
-rwxr-xr-xidalius.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/idalius.pl b/idalius.pl
index a451309..8f99eb1 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -190,7 +190,8 @@ sub irc_public {
return if (grep {$_ eq $nick} @{$config{ignore}});
my $stripped_what = strip_color(strip_formatting($what));
- if ($stripped_what =~ s/^$config{prefix}//) {
+ if ($config{prefix_nick} && $stripped_what =~ s/^\Q$current_nick\E[:,]\s+//g ||
+ $stripped_what =~ s/^$config{prefix}//) {
$output = run_command($stripped_what, $who, $where);
$irc->yield(privmsg => $where => $output) if $output;
strike_add($nick, $channel) if $output;