summaryrefslogtreecommitdiff
path: root/nsa
diff options
context:
space:
mode:
Diffstat (limited to 'nsa')
-rwxr-xr-xnsa11
1 files changed, 8 insertions, 3 deletions
diff --git a/nsa b/nsa
index 95839db..99789bc 100755
--- a/nsa
+++ b/nsa
@@ -26,6 +26,11 @@ require 'openssl'
require 'yaml'
require 'monitor'
+if RUBY_VERSION =~ /1.9/
+ Encoding.default_external = Encoding::UTF_8
+ Encoding.default_internal = Encoding::UTF_8
+end
+
default_irc = {
'server' => 'irc.oftc.net',
'port' => 6667,
@@ -45,13 +50,13 @@ class << Log
def init
@ignore_list = []
@ignore_list << "dispatch thread"
- @ignore_list << "connection"
+ #@ignore_list << "connection"
@ignore_list << "waituntilonline - waiter"
@ignore_list << "waituntilonline - runthread"
end
def log section, message
- puts message unless @ignore_list.include?(section)
+ puts "[#{Time.now}] #{message}" unless @ignore_list.include?(section)
end
end
@@ -126,8 +131,8 @@ class Connection
@outQueue.synchronize do
@outEmpty.wait_while { @outQueue.empty? }
line = @outQueue.shift
- @sock.puts line
Log.log "connection", "[connection] >>> " + line
+ @sock.puts line
end
end
rescue => e