leaves/scorekeeper/controller.rb
# Displays the current point totals, or modifies someone's score, depending on
# the message provided with the command.
Displays the current point totals, or modifies someone's score, depending on
the message provided with the command.
Displays the current point totals or modifies someone ' s score depending on the message provided with the command .
def points_command(stem, sender, reply_to, msg)
    if msg.nil? or msg.empty? then
      var :totals => totals(stem, reply_to)
    elsif msg =~ /^(\w+)\s+history\s*(.*)$/ then
      parse_history stem, reply_to, $1, $2
      render :history
    elsif msg =~ /^(\w+)\s+([\+\-]\d+)\s*(.*)$/ then
      parse_change stem, reply_to, sender, $1, $2.to_i, $3
      render :change
    else
      render :usage
    end
  end
def points_command ( stem , sender , reply_to , msg ) if msg . nil? or msg . empty? then var :totals => totals ( stem , reply_to ) elsif msg =~ / ^( \w +) \s +history \s *(.*)$ / then parse_history stem , reply_to , $1 , $2 render :history elsif msg =~ / ^( \w +) \s +([ \+ \- ] \d +) \s *(.*)$ / then parse_change stem , reply_to , sender , $1 , $2 . to_i , $3 render :change else render :usage end end
Displays the current point totals, or modifies someone's score, depending on
the message provided with the command.
Displays the current point totals or modifies someone ' s score depending on the message provided with the command .
stem
<not_specific>
sender
<not_specific>
reply_to
<not_specific>
msg
<not_specific>