aboutsummaryrefslogtreecommitdiffstats
path: root/slack_profile.pl
diff options
context:
space:
mode:
authorTeddy Wing2016-09-18 02:15:54 -0400
committerTeddy Wing2016-09-18 02:15:54 -0400
commitdaaa803dd9e76435bae1e1afa2c9b6583bae89e7 (patch)
treecce960f9877013e3d294a6604a82b6af8878cbb4 /slack_profile.pl
parentfcd4f7f60b564543b0e1fd03e586e2fe1d670495 (diff)
parent670ccf53297b3ca398ef78b3c4b5cd5edbcdca6d (diff)
downloadirssi-slack-profile-daaa803dd9e76435bae1e1afa2c9b6583bae89e7.tar.bz2
Merge branch 'swhois--trim-surrounding-spaces-from-argument'
Diffstat (limited to 'slack_profile.pl')
-rw-r--r--slack_profile.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/slack_profile.pl b/slack_profile.pl
index 1c6f1a7..88b1a66 100644
--- a/slack_profile.pl
+++ b/slack_profile.pl
@@ -479,6 +479,10 @@ sub swhois {
# If $username starts with @, strip it
$username =~ s/^@//;
+ # Trim leading and trailing whitespace
+ $username =~ s/^\s+//;
+ $username =~ s/\s+$//;
+
if (my $user = find_user($username)) {
print_whois($user);
}