aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xidalius.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/idalius.pl b/idalius.pl
index 85fad47..5c13c24 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -174,6 +174,28 @@ sub irc_msg {
$irc->yield(privmsg => $nick => "Syntax: nick <nick>");
}
}
+ if ($what =~ /^ignore\s/) {
+ my ($target) = $what =~ /^ignore\s+(\S+)$/;
+ if ($target) {
+ push @{$config{ignore}}, $target;
+ $irc->yield(privmsg => $nick => "Ignoring $target.");
+ } else {
+ $irc->yield(privmsg => $nick => "Syntax: ignore <nick>");
+ }
+ }
+ if ($what =~ /^don't ignore\s/) {
+ my ($target) = $what =~ /^don't ignore\s+(\S+)$/;
+ if ($target) {
+ if (grep { $_ eq $target} @{$config{ignore}}) {
+ @{$config{ignore}} = grep { $_ ne $target } @{$config{ignore}};
+ $irc->yield(privmsg => $nick => "No longer ignoring $target.");
+ } else {
+ $irc->yield(privmsg => $nick => "I wasn't ignoring $target anyway.");
+ }
+ } else {
+ $irc->yield(privmsg => $nick => "Syntax: don't ignore <nick>");
+ }
+ }
if ($what =~ /^part\s/) {
my $message;
if ($what =~ /^part(\s+(\S+))+$/m) {