Thomas Molloy has proposed merging lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology.
Requested reviews: Ubuntu IRC Bots (ubuntu-bots) For more details, see: https://code.launchpad.net/~lderan/ubuntu-bots/meeetingology-output/+merge/176757 Changed private voting to be an actual bot function so it no longer returns an error to the user when they try to vote. Also changed the vote announcement to show how to go about private voting -- https://code.launchpad.net/~lderan/ubuntu-bots/meeetingology-output/+merge/176757 Your team Ubuntu IRC Bots is requested to review the proposed merge of lp:~lderan/ubuntu-bots/meeetingology-output into lp:~ubuntu-bots/ubuntu-bots/meetingology.
=== modified file 'meeting.py' --- meeting.py 2013-07-13 15:35:33 +0000 +++ meeting.py 2013-07-24 18:42:25 +0000 @@ -419,7 +419,7 @@ self.reply("Voting still open on: " + self.activeVote) return self.reply("Please vote on: " + line.strip()) - self.reply("Public votes can be registered by saying +1, +0 or -1 in channel, (private votes don't work yet, but when they do it will be by messaging the channel followed by +1/-1/+0 to me)") + self.reply("Public votes can be registered by saying +1, +0 or -1 in channel, (for private voting, private message me with 'vote +1/-1/+0 #channelname)") self.activeVote=line.strip() self.currentVote={} #need to set up a structure to hold vote results === modified file 'plugin.py' --- plugin.py 2013-07-13 15:35:33 +0000 +++ plugin.py 2013-07-24 18:42:25 +0000 @@ -125,7 +125,26 @@ (channel, network, time.ctime())) if len(recent_meetings) > 10: del recent_meetings[0] - + + # If there is no meeting going on, then we quit + if M is None: return + # Add line to our meeting buffer. + isop=(nick in irc.state.channels[channel].ops) + M.addline(nick, payload,isop) + # End meeting if requested: + if M._meetingIsOver: + #M.save() # now do_endmeeting in M calls the save functions + del meeting_cache[Mkey] + + def vote(self, irc, msg, args): + nick = msg.nick + channel = msg.args[0] + payload = msg.args[1] + network = irc.msg.tags['receivedOn'] + + """ sub string to remove 'vote ' from payload """ + payload = payload[5:] + """ private voting system """ if channel[:1] != '#' and re.match("\+1|0|\+0|-1",payload): for key in meeting_cache.keys(): @@ -135,21 +154,10 @@ time_ = time.localtime() private = True voteMeeting.doCastVote(nick,payload,time_,private) - irc.reply("received for vote " + voteMeeting.activeVote) + irc.reply("received for vote '" + voteMeeting.activeVote + "'") else: irc.reply("No active meetings in this channel") - - - # If there is no meeting going on, then we quit - if M is None: return - # Add line to our meeting buffer. - isop=(nick in irc.state.channels[channel].ops) - M.addline(nick, payload,isop) - # End meeting if requested: - if M._meetingIsOver: - #M.save() # now do_endmeeting in M calls the save functions - del meeting_cache[Mkey] - + def outFilter(self, irc, msg): """Log outgoing messages from supybot. """
-- Mailing list: https://launchpad.net/~ubuntu-bots Post to : ubuntu-bots@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-bots More help : https://help.launchpad.net/ListHelp