Merge lp:~cjohnston/ubuntu-classroom/force-refresh into lp:~ubuntu-classroom/ubuntu-classroom/classbot

Proposed by Chris Johnston
Status: Rejected
Rejected by: Nathan Handler
Proposed branch: lp:~cjohnston/ubuntu-classroom/force-refresh
Merge into: lp:~ubuntu-classroom/ubuntu-classroom/classbot
Diff against target: 18 lines (+8/-0)
1 file modified
classbot.pl (+8/-0)
To merge this branch: bzr merge lp:~cjohnston/ubuntu-classroom/force-refresh
Reviewer Review Type Date Requested Status
Nathan Handler Needs Information
Review via email: mp+19796@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chris Johnston (cjohnston) wrote :

Allows admins to force a refresh

Revision history for this message
Nathan Handler (nhandler) wrote :

Under what situation would an admin need to trigger a refresh? If the settings are changed from within irssi, the script should call refresh_settings automatically. If the settings are changed within the script, the script calls refresh_settings.

review: Needs Information

Unmerged revisions

16. By Chris Johnston

Allows admins to force a refresh

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'classbot.pl'
2--- classbot.pl 2010-02-20 22:10:26 +0000
3+++ classbot.pl 2010-02-21 03:59:13 +0000
4@@ -390,6 +390,14 @@
5 Irssi::print("$nick is not an admin, so they cannot use !devoice.") if($debug);
6 $server->command("^MSG $nick You are not currently an admin, so you cannot use !devoice.");
7 }
8+ elsif($target =~ m/^$mynick$/i && $admins{lc($nick)} && $text =~ m/^!(refresh)\s*(.*?)$/i) {
9+ Irssi::print("Forced refresh by $nick") if($debug);
10+ &refresh_settings;
11+ }
12+ elsif($target =~ m/^$mynick$/i && $text =~ m/^!(refresh)\s*(.*?)$/i) {
13+ Irssi::print("$nick is not an admin, so they cannot use !refresh.") if($debug);
14+ $server->command("^MSG $nick You are not currently an admin, so you cannot use !refresh.");
15+ }
16 }
17
18 sub cmd_help {

Subscribers

People subscribed via source and target branches

to all changes: