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


import socket
import ssl
import sys
import events
import urk
import ui
import windows
            import getpass
from conf import conf
            
            if source.enabled:
                self.source = ui.fork(self.on_read, self.socket.recv, 8192)
        
    #called when we read data or failed to read data
    def on_read(self, result, error):
        if error:
            self.disconnect(error=error[1])
        elif not result:
            self.disconnect(error="Connection closed by remote host")
        else:
            self.source = source = ui.Source()
            
            self.buffer = (self.buffer + result).split("\r\n")
            
            for line in self.buffer[:-1]:
                self.got_msg(line)
            
            if self.buffer:
                self.buffer = self.buffer[-1]
            else:
                self.buffer = ''
            
            if source.enabled:
                self.source = ui.fork(self.on_read, self.socket.recv, 8192)    
    
    def raw(self, msg):
        events.trigger("OwnRaw", network=self, raw=msg)
        
        if self.status >= INITIALIZING:

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


# Path: irc.py
import socket
import ssl
import sys
import events
import urk
import ui
import windows
            import getpass
from conf import conf

            
            if source.enabled:
                self.source = ui.fork(self.on_read, self.socket.recv, 8192)
        
    #called when we read data or failed to read data
    def on_read(self, result, error):
        if error:
            self.disconnect(error=error[1])
        elif not result:
            self.disconnect(error="Connection closed by remote host")
        else:
            self.source = source = ui.Source()
            
            self.buffer = (self.buffer + result).split("\r\n")
            
            for line in self.buffer[:-1]:
                self.got_msg(line)
            
            if self.buffer:
                self.buffer = self.buffer[-1]
            else:
                self.buffer = ''
            
            if source.enabled:
                self.source = ui.fork(self.on_read, self.socket.recv, 8192)    
    
    def raw(self, msg):
        events.trigger("OwnRaw", network=self, raw=msg)
        
        if self.status >= INITIALIZING:

            self.socket.send(msg + "\r\n")