diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-28 23:55:59 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-28 23:55:59 +0000 |
commit | 8caeee3853ef66dd0e326ff17906f9ca544b8a35 (patch) | |
tree | 03faa650efa4ca6ed11bcc4faec1f2ee4ab3a9dc /bin | |
parent | da8e3efa6400c25f4e572c4187a15a37c72af6b8 (diff) |
Thu Jul 28 23:45:26 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
* Reworked the Timer module. The Timer now has a smart thread manager to
start/stop the tick() thread. This means the timer isn't called every 0.1
seconds to see what needs doing, which is much more efficient
* reworked the ircsocket queue mechanism to use a Timer
* reworked the nickserv plugin to use maps
* made server.reconnect_wait configurable
* added Class tracing mechanism to bin/rbot, use --trace Classname for
debugging
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/rbot | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -35,7 +35,7 @@ rescue LoadError => e exit 2 end -$debug = true +$debug = false $version="0.9.8" $opts = Hash.new @@ -47,7 +47,8 @@ end opts = GetoptLong.new( ["--debug", "-d", GetoptLong::NO_ARGUMENT], - ["--help", "-h", GetoptLong::OPTIONAL_ARGUMENT], + ["--help", "-h", GetoptLong::NO_ARGUMENT], + ["--trace", "-t", GetoptLong::REQUIRED_ARGUMENT], ["--version", "-v", GetoptLong::NO_ARGUMENT] ) @@ -56,6 +57,15 @@ opts.each {|opt, arg| $opts[opt.sub(/^-+/, "")] = arg } +if ($opts["trace"]) + set_trace_func proc { |event, file, line, id, binding, classname| + if classname.to_s == $opts["trace"] + printf "TRACE: %8s %s:%-2d %10s %8s\n", event, File.basename(file), line, id, classname + end + } +end + + if ($opts["version"]) puts "rbot #{$version}" exit 0 |