Exemplo n.º 1
0
Arquivo: main.py Projeto: ArildF/rogie
    config = Config.getConfig()
    
    protocol = config.getString("login", "protocol")
    
    #init the protocol we are going to use
    Protocol.initProtocol( protocol )
    
    protocol = Protocol.getProtocol()   
    
    
    #first get the cookie and id's     
    nick = config.getString( "login", "username" )
    passwd = config.getString( "login", "password" )

    events = Events.getEvents()
    events.addListener( Display.getDisplay() )
    events.addListener( SpamFilter.getInstance() )

    #create the socket
    sock = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
    sock.settimeout( 120.0 )
    chatserver = config.getString( "login", "chatserver" )
    chatport = config.getInt( "login", "chatport" ) 


    #recreate the acl?
    if sys.argv.count( "-newacl" ):
        os.unlink( Acl.ACLFILE )

    chatRoom = config.getString( "login", "chatroom" )
Exemplo n.º 2
0
 def send( self, sock ):
     """override send to display the pm"""
     Packet.send( self, sock )
     Display.getDisplay().pmTo( self.destination, self.statement )
Exemplo n.º 3
0
Arquivo: Ack.py Projeto: ArildF/rogie
 def __init__( self, aSocket, theRoom, theLength ):
     self.sock = aSocket
     self.length = theLength        
     self.display = Display.getDisplay()        
     self.room = theRoom