# Path: conf.py
# CONF_FILE = os.path.join(urk.userpath,'urk.conf')
# def pprint(obj, depth=-2):
# def save(*args):


import time
import os
import windows
import chaninfo
import urk
from conf import conf
                window = windows.get(windows.ChannelWindow, e.network, e.msg[3]) or e.window
                
                f = log_file(e.network, window.id)
                
                f.write('topic on %s is: %s' % (e.msg[3], e.text))
                
            elif e.msg[1] == '333':
                window = windows.get(windows.ChannelWindow, e.network, e.msg[3]) or e.window
                
                f = log_file(e.network, window.id)
                
                f.write('topic on %s set by %s at time %s' % (e.msg[3], e.msg[4], time.ctime(int(e.msg[5]))))
            
            elif e.msg[1] == '329': #RPL_CREATIONTIME
                pass
            
            else:
                f = log_file(e.network, e.window.id)
            
                f.write('* %s' % ' '.join(e.msg[3:]))

        elif e.msg[1] == 'ERROR':
            f = log_file(e.network, e.window.id)
            
            f.write('Error: %s' % e.text)

def onDisconnect(e):
    if e.error:
        to_write = '* Disconnected (%s)' % e.error
    else:

# Path: conf.py
# CONF_FILE = os.path.join(urk.userpath,'urk.conf')
# def pprint(obj, depth=-2):
# def save(*args):


# Path: scripts/ulogging.py
import time
import os
import windows
import chaninfo
import urk
from conf import conf

                window = windows.get(windows.ChannelWindow, e.network, e.msg[3]) or e.window
                
                f = log_file(e.network, window.id)
                
                f.write('topic on %s is: %s' % (e.msg[3], e.text))
                
            elif e.msg[1] == '333':
                window = windows.get(windows.ChannelWindow, e.network, e.msg[3]) or e.window
                
                f = log_file(e.network, window.id)
                
                f.write('topic on %s set by %s at time %s' % (e.msg[3], e.msg[4], time.ctime(int(e.msg[5]))))
            
            elif e.msg[1] == '329': #RPL_CREATIONTIME
                pass
            
            else:
                f = log_file(e.network, e.window.id)
            
                f.write('* %s' % ' '.join(e.msg[3:]))

        elif e.msg[1] == 'ERROR':
            f = log_file(e.network, e.window.id)
            
            f.write('Error: %s' % e.text)

def onDisconnect(e):
    if e.error:
        to_write = '* Disconnected (%s)' % e.error
    else:

        to_write = '* Disconnected'