aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}