aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-08-10 13:32:44 +1200
committerDavid Phillips <david@sighup.nz>2017-08-10 13:32:44 +1200
commit5f45cca86e4ac1e017b1a193ca87bc2326e116ce (patch)
tree6bc612d7584cc2728227566dd3749e87b54d5e21
parent479e93acf9c61dec84743483c174412e67d262ff (diff)
downloadidalius-5f45cca86e4ac1e017b1a193ca87bc2326e116ce.tar.xz
Set a default part message
Fixes a bug where some IRC servers get angry at us for having an empty part message.
-rwxr-xr-xidalius.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/idalius.pl b/idalius.pl
index 271f447..3bf21f8 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -153,6 +153,7 @@ sub irc_msg {
$what =~ s/^part\s+//;
my ($chan_str, $reason) = split /\s+(?!#)/, $what, 2;
my @channels = split /\s+/, $chan_str;
+ $reason = "Commanded by $nick" unless $reason;
$irc->yield(part => @channels => $reason);
$irc->yield(privmsg => $nick => "Requested.");
} else {