X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fscript.rb;h=e3e718a70546350808ec410c4eb2abe1b17e09e8;hb=13391804db9e84749580811089f4be8e52dd1e0b;hp=7a8c0c84696abc03ab36e2025a03c7577b148e8b;hpb=1371de4f0799590c5fc19889fef137acdc53a020;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index 7a8c0c84..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 ) @@ -112,7 +112,7 @@ class ScriptPlugin < Plugin code = params[:code].to_s nick = m.sourcenick created = Time.new.strftime '%Y/%m/%d %H:%m' - channel = m.target + channel = m.target.to_s command = Command.new( code, nick, created, channel ) @commands[name] = command