aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2016-09-12 20:34:28 -0400
committerTeddy Wing2016-09-12 20:34:28 -0400
commitb2adb8415387659671290a7bbe4be6bad10cbf7e (patch)
treef123eff196df446a45d7dab652a14d4cb9f56c85
parentc8a665f52919500debd313bed5d6311419b325b5 (diff)
parentfb1a39d5c7bf923452248b85de6349a1c4e516fc (diff)
downloadirssi-slack-profile-b2adb8415387659671290a7bbe4be6bad10cbf7e.tar.bz2
Merge branch 'sync-command'
-rw-r--r--slack_profile.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/slack_profile.pl b/slack_profile.pl
index 91a4c7a..706da77 100644
--- a/slack_profile.pl
+++ b/slack_profile.pl
@@ -129,6 +129,12 @@ sub fetch_users_list {
store \@users_list, users_list_cache;
}
+# Re-fetch the users list for the most up-to-date information
+sub sync {
+ fetch_users_list();
+ Irssi::print('Done.');
+}
+
sub fetch_user_profile {
my ($user) = @_;
@@ -232,6 +238,11 @@ sub swhois {
}
Irssi::command_bind('swhois', 'swhois');
+
+Irssi::command_bind('slack_profile', 'sync');
+Irssi::command_bind('slack_profile sync', 'sync');
+
Irssi::command_bind('help', 'help');
+
Irssi::settings_add_str('slack_profile', 'slack_profile_token', '');