diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-08-29 10:46:14 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-08-29 10:46:14 +0000 |
commit | 9f3561b05bef1ba04f9cc49ea4fb89a49b6291a4 (patch) | |
tree | bd7054418b7b0b1bf44bc91feded676d0a65722e /data/rbot/plugins/markov.rb | |
parent | 4a86158144a13bc901222442ccd2db9c2bbd6bb0 (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.rb | 2 |
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 |