diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-08-29 20:55:35 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-08-29 20:55:35 +0000 |
commit | abf44640b30133b3db5f614822b53cc015f9c705 (patch) | |
tree | 0d426f9831ed5701f57d0ffb6310a037196dec8a /data/rbot | |
parent | 5cb051d0ba8e32f4e044c3c1a6e8d11a5a57e3d9 (diff) |
wow plugin: thread, don't block
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/wow.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/data/rbot/plugins/wow.rb b/data/rbot/plugins/wow.rb index 1106d3cc..3b73414c 100644 --- a/data/rbot/plugins/wow.rb +++ b/data/rbot/plugins/wow.rb @@ -111,11 +111,15 @@ class RealmPlugin < Plugin tok.capitalize }.join(' ') @registry[m.sourcenick] = realm_name - m.reply Realm.get_realm_status(realm_name) + Thread.new do + m.reply Realm.get_realm_status(realm_name) + end else if @registry.has_key?(m.sourcenick) realm_name = @registry[m.sourcenick] - m.reply Realm.get_realm_status(realm_name) + Thread.new do + m.reply Realm.get_realm_status(realm_name) + end else m.reply "I don't know which realm you want.\n#{USAGE}" end |