aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2016-09-17 06:37:41 -0400
committerTeddy Wing2016-09-17 06:37:41 -0400
commit4f17970533cfea1e6e8d0e2f2d63b64b9433ae2b (patch)
treef28b5ab46c4c39626d277f0b48b2d99bea5c9170
parent27bccdc42ad093f75b60d56f71651d6b6d0bc8a7 (diff)
downloadirssi-slack-profile-4f17970533cfea1e6e8d0e2f2d63b64b9433ae2b.tar.bz2
complete_profile_field: Simplify complist data
Just set the array of default profile fields as the complist directly instead of doing the loop/push rigmarole.
-rw-r--r--slack_profile.pl7
1 files changed, 1 insertions, 6 deletions
diff --git a/slack_profile.pl b/slack_profile.pl
index fa00ad2..f240b3f 100644
--- a/slack_profile.pl
+++ b/slack_profile.pl
@@ -172,12 +172,7 @@ sub complete_profile_field {
return unless $linestart =~ /^\Q${slash}\Eslack_profile_set\b/i;
- my @profile_fields = qw(first_name last_name email phone skype title);
- @$complist = ();
-
- for my $field (@profile_fields) {
- push @$complist, $field;
- }
+ @$complist = qw(first_name last_name email phone skype title);
Irssi::signal_stop();
}