diff options
-rwxr-xr-x | bin/rbot | 2 | ||||
-rw-r--r-- | data/rbot/plugins/chucknorris.rb | 4 | ||||
-rw-r--r-- | data/rbot/plugins/insult.rb | 3 | ||||
-rw-r--r-- | data/rbot/plugins/quakeauth.rb | 2 | ||||
-rw-r--r-- | lib/rbot/ircbot.rb | 2 |
5 files changed, 10 insertions, 3 deletions
@@ -52,7 +52,7 @@ opts.each {|opt, arg| $opts[opt.sub(/^-+/, "")] = arg } -$cl_loglevel = $opts["loglevel"] +$cl_loglevel = $opts["loglevel"].to_i if ($opts["trace"]) set_trace_func proc { |event, file, line, id, binding, classname| diff --git a/data/rbot/plugins/chucknorris.rb b/data/rbot/plugins/chucknorris.rb index b4cec84e..78327ccf 100644 --- a/data/rbot/plugins/chucknorris.rb +++ b/data/rbot/plugins/chucknorris.rb @@ -25,6 +25,10 @@ class ChuckNorrisPlugin < Plugin super end + + def name + "chucknorris" + end # Just a little helper for the initialize method... def find_facts_file(name) diff --git a/data/rbot/plugins/insult.rb b/data/rbot/plugins/insult.rb index f610efc0..f7217756 100644 --- a/data/rbot/plugins/insult.rb +++ b/data/rbot/plugins/insult.rb @@ -216,6 +216,9 @@ class InsultPlugin < Plugin return "insult module topics: msginsult, insult" end end + def name + "insult" + end def privmsg(m) suffix="" unless(m.params) diff --git a/data/rbot/plugins/quakeauth.rb b/data/rbot/plugins/quakeauth.rb index dd1c884d..e9aeab2b 100644 --- a/data/rbot/plugins/quakeauth.rb +++ b/data/rbot/plugins/quakeauth.rb @@ -48,4 +48,4 @@ class QPlugin < Plugin end plugin = QPlugin.new plugin.map 'qauth set :nick :passwd', :action => "set" -plugin.map 'quath identify', :action => "identify" +plugin.map 'qauth identify', :action => "identify" diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index fac6c290..1f11e85f 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -17,12 +17,12 @@ def rawlog(level, message=nil, who_pos=1) call_stack = caller if call_stack.length > who_pos who = call_stack[who_pos].sub(%r{(?:.+)/([^/]+):(\d+)(:in .*)?}) { "#{$1}:#{$2}#{$3}" } + who.gsub!(/./," ") else who = "(unknown)" end message.to_s.each_line { |l| $logger.add(level, l.chomp, who) - who.gsub!(/./," ") } end |