retrobot.rb in botfly-0.3.1 vs retrobot.rb in botfly-0.3.2

- old
+ new

@@ -32,24 +32,24 @@ h end.sort {|a,b| b[-1] <=> a[-1] } sorted.each {|pair| say "#{pair[0]} => #{pair[-1]}"}#)}" : #{room[:voted][pair[0]].person} - #{room[:voted][pair[0]].name}" } end - # on.message.from(/^rkneufeld/).body(/^rb tally$/) do - # say "Tally HO! Please start your message with +, -, or ∂ (that's option-d) to have it tallied up" - # say "=================" - # room[:tally_responders] = []; room[:tally] = {} - # room[:plus] = {}; room[:minus] = {}; room[:delta] = {} - # - # room[:tally_responders] << on.message.body(/^\+(.*)/) { room[:tally][@from] ||= []; room[:tally][@from] << @body } - # room[:tally_responders] << on.message.body(/^d (.*)/) { room[:tally][@from] ||= []; room[:tally][@from] << @body } - # room[:tally_responders] << on.message.body(/^-(.*)/) { room[:tally][@from] ||= []; room[:tally][@from] << @body } + on.message.from(/^rkneufeld/).body(/^rb tally$/) do + say "Tally HO! Please start your message with +, -, or ∂ (that's option-d) to have it tallied up" + say "=================" + room[:tally_responders] = []; room[:tally] = {} + room[:plus] = {}; room[:minus] = {}; room[:delta] = {} + + room[:tally_responders] << on.message.body(/^\+(.*)/) { room[:tally][@from] ||= []; room[:tally][@from] << @body } + room[:tally_responders] << on.message.body(/^d (.*)/) { room[:tally][@from] ||= []; room[:tally][@from] << @body } + room[:tally_responders] << on.message.body(/^-(.*)/) { room[:tally][@from] ||= []; room[:tally][@from] << @body } # end - # on.message.from(/^rkneufeld/).body(/^rb stop tally/) do - # room[:tally_responders].each { |id| remove id } - # room[:tally] - # # stored to room[:voted] - # end + on.message.from(/^rkneufeld/).body(/^rb stop tally/) do + room[:tally_responders].each { |id| remove id } + room[:tally] + # stored to room[:voted] + end end end Thread.stop;loop