summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/markov.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-29 10:46:14 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-29 10:46:14 +0000
commit9f3561b05bef1ba04f9cc49ea4fb89a49b6291a4 (patch)
treebd7054418b7b0b1bf44bc91feded676d0a65722e /data/rbot/plugins/markov.rb
parent4a86158144a13bc901222442ccd2db9c2bbd6bb0 (diff)
timers: get rid of useless data passing to timer actions.
The timer blocks are closures, so they inherit the variables in the scope they were created. Passing those same variables to the block as data is useless.
Diffstat (limited to 'data/rbot/plugins/markov.rb')
-rw-r--r--data/rbot/plugins/markov.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/markov.rb b/data/rbot/plugins/markov.rb
index de33136e..14cd0f99 100644
--- a/data/rbot/plugins/markov.rb
+++ b/data/rbot/plugins/markov.rb
@@ -133,7 +133,7 @@ class MarkovPlugin < Plugin
line = generate_string(word1, word2)
return unless line
return if line == message
- @bot.timer.add_once(delay, m) {|m|
+ @bot.timer.add_once(delay) {
m.reply line
}
end