diff options
| author | Teddy Wing | 2016-09-10 21:44:58 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-09-10 21:44:58 -0400 |
| commit | bb2b602618da3df3d464984e97565cf5d25a37e2 (patch) | |
| tree | 7a14b8a8f32c7543a3ae735ab21e5c65c26d8b80 | |
| parent | 8b3febb99846f99d5576e9386e456186f9c1d0f8 (diff) | |
| download | irssi-slack-profile-bb2b602618da3df3d464984e97565cf5d25a37e2.tar.bz2 | |
swhois: Rename `$data` to `$username`
Because this name is so much clearer. I had used data because that's
what's used in the Irssi command example.
| -rw-r--r-- | slack-profile.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/slack-profile.pl b/slack-profile.pl index 7c61fed..68039a6 100644 --- a/slack-profile.pl +++ b/slack-profile.pl @@ -61,7 +61,7 @@ sub find_user { } sub swhois { - my ($data, $server, $window_item) = @_; + my ($username, $server, $window_item) = @_; # if (!$server || !$server->{connected}) { # Irssi::print("Not connected to server"); @@ -76,11 +76,11 @@ sub swhois { } } - if ($data) { - # If $data starts with @, strip it - $data =~ s/^@//; + if ($username) { + # If $username starts with @, strip it + $username =~ s/^@//; - if (my $user = find_user($data)) { + if (my $user = find_user($username)) { my $bot = ''; if ($user->{'is_bot'}) { |
