aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2016-09-17 05:54:28 -0400
committerTeddy Wing2016-09-17 05:54:28 -0400
commite0fa2d455da59a40710f87c6f20b8ea891857411 (patch)
treec97b152db236348c3c294458671ff8751fe92204
parente566b8e43841e998ef49780c44a88146937f8534 (diff)
parent1ede306ed047fa8f7e5219a63570a9c11adeeb72 (diff)
downloadirssi-slack-profile-e0fa2d455da59a40710f87c6f20b8ea891857411.tar.bz2
Merge branch 'fix-in-memory-cache-after-running-sync-command'
-rw-r--r--TODO4
-rw-r--r--slack_profile.pl8
2 files changed, 9 insertions, 3 deletions
diff --git a/TODO b/TODO
index e1150b7..fc47479 100644
--- a/TODO
+++ b/TODO
@@ -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;
}