From: Giuseppe Bilotta Date: Mon, 3 Nov 2008 20:37:34 +0000 (+0100) Subject: script plugin: hook on message() rather than listen() X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=13391804db9e84749580811089f4be8e52dd1e0b;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git script plugin: hook on message() rather than listen() --- diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index eae14939..e3e718a7 100644 --- a/data/rbot/plugins/script.rb +++ b/data/rbot/plugins/script.rb @@ -48,7 +48,7 @@ class ScriptPlugin < Plugin end - def listen( m ) + def message( m ) name = m.message.split.first if m.address? and @commands.has_key?( name )