Software /
code /
clix
Diff
clix.lua @ 122:1dfd28db10bd
Merge with MattJ
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 08 Sep 2014 12:20:24 +0200 |
parent | 120:f1166645a56c |
parent | 105:a074eaacefe7 |
child | 127:6a27edf256c3 |
line wrap: on
line diff
--- a/clix.lua Sun Aug 24 20:34:04 2014 +0100 +++ b/clix.lua Mon Sep 08 12:20:24 2014 +0200 @@ -59,8 +59,12 @@ io.stderr:write("The specified account (", opts.account or "default", ") wasn't found in the config file\n"); return nil; end - verse.set_log_handler(io.stderr, opts.quiet and {} or not opts.verbose and {"info", "error"}); + verse.set_log_handler(io.stderr, opts.quiet and {} or not opts.verbose and {"info", "warn", "error"}); local conn = verse.new(verse.new_logger("clix")); + if opts.raw then + conn:hook("incoming-raw", print, 1000); + conn:hook("outgoing-raw", print, 1000); + end for _, plugin in ipairs(plugins or {}) do conn:add_plugin(plugin); end @@ -83,7 +87,7 @@ conn:close(); end); conn:hook("disconnected", function (info) - if info.reason then + if info and info.reason and info.reason ~= "stream closed" then conn:warn("Disconnecting: %s", tostring(info.reason)); end verse.quit();