diff options
| author | Teddy Wing | 2016-09-17 05:54:28 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-09-17 05:54:28 -0400 |
| commit | e0fa2d455da59a40710f87c6f20b8ea891857411 (patch) | |
| tree | c97b152db236348c3c294458671ff8751fe92204 | |
| parent | e566b8e43841e998ef49780c44a88146937f8534 (diff) | |
| parent | 1ede306ed047fa8f7e5219a63570a9c11adeeb72 (diff) | |
| download | irssi-slack-profile-e0fa2d455da59a40710f87c6f20b8ea891857411.tar.bz2 | |
Merge branch 'fix-in-memory-cache-after-running-sync-command'
| -rw-r--r-- | TODO | 4 | ||||
| -rw-r--r-- | slack_profile.pl | 8 |
2 files changed, 9 insertions, 3 deletions
@@ -18,3 +18,7 @@ v3: v Add a command to set/change the current user's profile fields - Profile field completion (see https://github.com/irssi/scripts.irssi.org/blob/22060fc4669627a9859c92efa2d6651e3673d494/scripts/go.pl) - Pad colons + +v4: +- Add sub header comments +- Add help for all commands diff --git a/slack_profile.pl b/slack_profile.pl index 15ce828..14e96dd 100644 --- a/slack_profile.pl +++ b/slack_profile.pl @@ -207,11 +207,13 @@ sub find_user { if (!-s users_list_cache) { fetch_users_list(); } - - @users_list = retrieve(users_list_cache); + else { + @users_list = retrieve(users_list_cache); + @users_list = @{@users_list[0]}; + } } - for my $user (@{@users_list[0]}) { + for my $user (@users_list) { if ($user->{'name'} eq $username) { return $user; } |
