From 427b14e3ee7f7d7d7769069b8b0816e4e59e3bad Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 19 Mar 2008 00:20:20 +0100 Subject: script plugin: reindent --- data/rbot/plugins/script.rb | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'data/rbot/plugins/script.rb') diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index 5e2f1e58..f6d867c5 100644 --- a/data/rbot/plugins/script.rb +++ b/data/rbot/plugins/script.rb @@ -70,29 +70,29 @@ class ScriptPlugin < Plugin def handle_eval( m, params ) code = params[:code].to_s.dup.untaint - Thread.start { - # TODO allow different safe levels for different botusers - begin - eval( code ) - rescue Exception => e - m.reply( "Script '#{name}' crapped out :(" ) - m.reply( e.inspect ) - end - } + Thread.start { + # TODO allow different safe levels for different botusers + begin + eval( code ) + rescue Exception => e + m.reply( "Script '#{name}' crapped out :(" ) + m.reply( e.inspect ) + end + } end def handle_echo( m, params ) code = params[:code].to_s.dup.untaint - Thread.start { - # TODO allow different safe levels for different botusers - begin - m.reply eval( code ).to_s - rescue Exception => e - m.reply( "Script '#{name}' crapped out :(" ) - m.reply( e.inspect ) - end - } + Thread.start { + # TODO allow different safe levels for different botusers + begin + m.reply eval( code ).to_s + rescue Exception => e + m.reply( "Script '#{name}' crapped out :(" ) + m.reply( e.inspect ) + end + } end -- cgit v1.2.3 From 3d901ac98e5bf4c4c8e1a605208fabc4ba71a73e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 19 Mar 2008 00:21:49 +0100 Subject: script plugin: script echo and eval mark the message as replied --- data/rbot/plugins/script.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'data/rbot/plugins/script.rb') diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index f6d867c5..83a1c914 100644 --- a/data/rbot/plugins/script.rb +++ b/data/rbot/plugins/script.rb @@ -79,6 +79,7 @@ class ScriptPlugin < Plugin m.reply( e.inspect ) end } + m.replied = true end @@ -93,6 +94,7 @@ class ScriptPlugin < Plugin m.reply( e.inspect ) end } + m.replied = true end -- cgit v1.2.3 From a51ae05ee0252576a10a77c9f92c0ce096be73aa Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 19 Mar 2008 00:22:39 +0100 Subject: script plugin: use m.okay --- data/rbot/plugins/script.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/rbot/plugins/script.rb') diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index 83a1c914..c994d4da 100644 --- a/data/rbot/plugins/script.rb +++ b/data/rbot/plugins/script.rb @@ -113,7 +113,7 @@ class ScriptPlugin < Plugin command = Command.new( code, nick, created, channel ) @commands[name] = command - m.reply( "done" ) + m.okay end @@ -129,7 +129,7 @@ class ScriptPlugin < Plugin end @commands.delete( name ) - m.reply( "done" ) + m.okay end -- cgit v1.2.3