<commit_before>import threading
import socket

import ircParse as parse


connections=[]

class ServerConnectionDaemon(threading.Thread):
    """Opens connections to servers and polls for events
    on the socket object
    TODO skrive fornuftig docstring
    """

    def __init__(self):
        """
        """
        threading.Thread.__init__(self)

    def run(self):
        """
        
        Arguments:
        - `self`:
        """
        while 1:
            """goes through connections and calls ircParse's
            on them, returning an Event object, or None
              """
            events=map(lambda x:parse.process_data(x), connections)
            events=filter(lambda x:x!=None, events)
            for e in events:
                e.printC()

    def connect_to_server(nick="", connection, server_address, password=<PASSWORD>, port=6667):
        """
        Arguments:
        - nick:
        - connection :
        - server_address:
        - password:
        """
        #TODO Write messages for sending nick password and identifing information to IRC
        tmp=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        tmp.connect((server_address, port))

        #Adds the connection to the list of Sockets to pull for events
        connection.append(tmp)
    
    
        
        

<commit_msg>Fixed error with arguments to connect to server method<commit_after>import threading
import socket

import ircParse as parse


connections=[]

class ServerConnectionDaemon(threading.Thread):
    """Opens connections to servers and polls for events
    on the socket object
    TODO skrive fornuftig docstring
    """

    def __init__(self):
        """
        """
        threading.Thread.__init__(self)

    def run(self):
        """
        
        Arguments:
        - `self`:
        """
        while 1:
            """goes through connections and calls ircParse's
            on them, returning an Event object, or None
              """
            events=map(lambda x:parse.process_data(x), connections)
            events=filter(lambda x:x!=None, events)
            for e in events:
                e.printC()

    def connect_to_server(nick, connection, server_address, password=<PASSWORD>, port=6667):
        """
        Arguments:
        - nick:
        - connection :
        - server_address:
        - password:
        """
        #TODO Write messages for sending nick password and identifing information to IRC
        tmp=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        tmp.connect((server_address, port))

        #Adds the connection to the list of Sockets to pull for events
        connection.append(tmp)
    
    
        
        


{'fraction_non_alphanumeric': 0.08677991137370754, 'fraction_numerical': 0.003692762186115214, 'mean_word_length': 1.9541984732824427, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7040924', 'n_tokens_mistral': 742, 'n_tokens_neox': 708, 'n_words': 210}