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

Proposed by Chris Johnston
Status: Merged
Merge reported by: Nathan Handler
Merged at revision: not available
Proposed branch: lp:~cjohnston/ubuntu-classroom/force-calendar
Merge into: lp:~ubuntu-classroom/ubuntu-classroom/classbot
Diff against target: 20 lines (+10/-0)
1 file modified
classbot.pl (+10/-0)
To merge this branch: bzr merge lp:~cjohnston/ubuntu-classroom/force-calendar
Reviewer Review Type Date Requested Status
Nathan Handler Approve
Review via email: mp+19793@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chris Johnston (cjohnston) wrote :

Fixes Bug #525111 by allowing admins to run !cal to redownload the calendar.

Revision history for this message
Chris Johnston (cjohnston) wrote :

I'm not sure if it needs the sleep or not.. If it doesn't please remove.

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

I made a few small changes and merged the branch. Thanks for your contribution.

review: Approve

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 02:06:15 +0000
4@@ -390,6 +390,16 @@
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/^!(cal)\s*(.*?)$/i) {
9+ Irssi::print("Forced new calendar download by $nick") if($debug);
10+ &fetch_ical;
11+ sleep(1);
12+ &refresh_settings;
13+ }
14+ elsif($target =~ m/^$mynick$/i && $text =~ m/^!(cal)\s*(.*?)$/i) {
15+ Irssi::print("$nick is not an admin, so they cannot use !cal.") if($debug);
16+ $server->command("^MSG $nick You are not currently an admin, so you cannot use !cal.");
17+ }
18 }
19
20 sub cmd_help {

Subscribers

People subscribed via source and target branches

to all changes: