Changeset c72fab43b09a17aee353f8c11439c96ad71796dc
- 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
| re00ea33 |
rc72fab4 |
|
| 931 | 931 | end |
|---|
| 932 | 932 | |
|---|
| | 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 | |
|---|
| 933 | 949 | end |
|---|
| 934 | | |
|---|
| 935 | | |
|---|
| 936 | 950 | |
|---|
| 937 | 951 | plugin = QuizPlugin.new |
|---|
| … | … | |
| 951 | 965 | plugin.map 'quiz top :number', :action => 'cmd_top_number' |
|---|
| 952 | 966 | plugin.map 'quiz stats', :action => 'cmd_stats' |
|---|
| | 967 | plugin.map 'quiz stop', :action => :stop |
|---|
| 953 | 968 | |
|---|
| 954 | 969 | # Admin commands |
|---|