This is so complicated...

master
sfan5 2014-07-20 21:28:04 +02:00
parent 7dcde82133
commit 74ba5b1d77
1 changed files with 2 additions and 1 deletions

3
log.py
View File

@ -5,6 +5,7 @@ Copyright 2014, sfan5
"""
import time
import sys
loglevels = {
'TEXT': 'TXT', # TEXT: purely informal message that appears in masses e.g. a command being executed
@ -23,7 +24,7 @@ def log(level, text, phenny):
f.close()
if level == 'ACTION':
phenny.write(['PRIVMSG', actionchannel], actionhighlight + ": " + text)
print(level + " " + text)
sys.stdout.write(bytes(level + " " + text, 'utf-8', 'ignore'))
def fmt_user(input):
return "%s(%s)" % (input.nick, input.hostmask)