Changeset c72fab43b09a17aee353f8c11439c96ad71796dc

Show
Ignore:
Timestamp:
09/05/08 22:42:38 (3 months ago)
Author:
dmitry kim <jason@nichego.net>
git-committer:
dmitry kim <jason@nichego.net> 1220640158 +0400
git-parent:

[107f1de91b246fbacbe7ad9de1281d0c25831e89]

git-author:
dmitry kim <jason@nichego.net> 1220640120 +0400
Message:

+ plugins/games/quiz: '!quiz stop' command implemented

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • data/rbot/plugins/games/quiz.rb

    re00ea33 rc72fab4  
    931931  end 
    932932 
     933  def stop(m, params) 
     934    unless m.public? 
     935      m.reply 'you must be on some channel to use this command' 
     936      return 
     937    end 
     938    if @quizzes.delete m.channel 
     939      @ask_mutex.synchronize do 
     940        t = @waiting.delete(m.channel) 
     941        @bot.timer.remove t if t 
     942      end 
     943      m.okay 
     944    else 
     945      m.reply(_("there is no active quiz on #{m.channel}")) 
     946    end 
     947  end 
     948 
    933949end 
    934  
    935  
    936950 
    937951plugin = QuizPlugin.new 
     
    951965plugin.map 'quiz top :number',      :action => 'cmd_top_number' 
    952966plugin.map 'quiz stats',            :action => 'cmd_stats' 
     967plugin.map 'quiz stop', :action => :stop 
    953968 
    954969# Admin commands