# Path: tools/formatter.py
# IRC_COLOUR_DICT = {
#     "white": "00",
#     "black": "01",
#     "dblue": "02",
#     "dark_blue": "02",
#     "dark_green": "03",
#     "dgreen": "03",
#     "red": "04",
#     "dark_red": "05",
#     "dred": "05",
#     "brown": "05",  # Note: This appears to show up as brown for some clients, dark red for others.
#     "purple": "06",
#     "orange": "07",
#     "yellow": "08",
#     "green": "09",
#     "lime": "09",
#     "cyan": "10",
#     "teal": "11",
#     "blue": "12",
#     "pink": "13",
#     "dgrey": "14",
#     "dark_grey": "14",
#     "dgray": "14",
#     "dark_gray": "14",
#     "grey": "15",
#     "gray": "15",
#     "random": ""  # Special keyword, generate a random number.
# }
# IRC_FORMATTING_DICT = {
#     "colour": "\x03",
#     "color": "\x03",
# 
#     "bold": "\x02",
#     "b": "\x02",
# 
#     "underlined": "\x1F",
#     "underline": "\x1F",
#     "ul": "\x1F",
# 
#     "italics": "\x1D",
#     "italic": "\x1D",
#     "i": "\x1D",
# 
#     "reverse": "\x16",
# 
#     "reset": "\x0F",
#     "clear": "\x0F"
# }
# class IrcFormatter:
#     def __init__(self):
#     def getColour(self, colour, return_formatted=True):
#     def getFormat(self, formatting):
#     def getAvailableFormats(self):
#     def getAvailableColours(self):
#     def parse(self, string):
#     def strip(self, string):
#     def _convert(self, string):


from tools import formatter
import threading
import time
            else:
                time.sleep(.25)

            if itters % 3 == 0 and burstlimit != 0:
                # Resets the burst limit every 6 seconds.
                itters = 0
                burstlimit = 0

    def stop(self):
        if not self.running:
            self.logger.notice("Cannot stop ratelimiter thread: Not running.")
            return False

        self._conn.logger.log("Stopping ratelimiter thread.")
        self.running = False

    def getQueues(self):
        self.queue_privmsg = self._conn._getPrivmsgQueue()
        self.queue_notice = self._conn._getNoticeQueue()

    def say(self, target, message, format):
        """
        Sends a message to target
        With formatting enabled, we will attempt to parse the contents through the IrcFormatter class.
        """

        if not format:
            self.logger.log("Sending PRIVMSG '{}' to {}.".format(message, target))
            self._conn.send_raw("PRIVMSG {} :{}".format(target, message))
        else:

# Path: tools/formatter.py
# IRC_COLOUR_DICT = {
#     "white": "00",
#     "black": "01",
#     "dblue": "02",
#     "dark_blue": "02",
#     "dark_green": "03",
#     "dgreen": "03",
#     "red": "04",
#     "dark_red": "05",
#     "dred": "05",
#     "brown": "05",  # Note: This appears to show up as brown for some clients, dark red for others.
#     "purple": "06",
#     "orange": "07",
#     "yellow": "08",
#     "green": "09",
#     "lime": "09",
#     "cyan": "10",
#     "teal": "11",
#     "blue": "12",
#     "pink": "13",
#     "dgrey": "14",
#     "dark_grey": "14",
#     "dgray": "14",
#     "dark_gray": "14",
#     "grey": "15",
#     "gray": "15",
#     "random": ""  # Special keyword, generate a random number.
# }
# IRC_FORMATTING_DICT = {
#     "colour": "\x03",
#     "color": "\x03",
# 
#     "bold": "\x02",
#     "b": "\x02",
# 
#     "underlined": "\x1F",
#     "underline": "\x1F",
#     "ul": "\x1F",
# 
#     "italics": "\x1D",
#     "italic": "\x1D",
#     "i": "\x1D",
# 
#     "reverse": "\x16",
# 
#     "reset": "\x0F",
#     "clear": "\x0F"
# }
# class IrcFormatter:
#     def __init__(self):
#     def getColour(self, colour, return_formatted=True):
#     def getFormat(self, formatting):
#     def getAvailableFormats(self):
#     def getAvailableColours(self):
#     def parse(self, string):
#     def strip(self, string):
#     def _convert(self, string):


# Path: core/ratelimit.py
from tools import formatter
import threading
import time

            else:
                time.sleep(.25)

            if itters % 3 == 0 and burstlimit != 0:
                # Resets the burst limit every 6 seconds.
                itters = 0
                burstlimit = 0

    def stop(self):
        if not self.running:
            self.logger.notice("Cannot stop ratelimiter thread: Not running.")
            return False

        self._conn.logger.log("Stopping ratelimiter thread.")
        self.running = False

    def getQueues(self):
        self.queue_privmsg = self._conn._getPrivmsgQueue()
        self.queue_notice = self._conn._getNoticeQueue()

    def say(self, target, message, format):
        """
        Sends a message to target
        With formatting enabled, we will attempt to parse the contents through the IrcFormatter class.
        """

        if not format:
            self.logger.log("Sending PRIVMSG '{}' to {}.".format(message, target))
            self._conn.send_raw("PRIVMSG {} :{}".format(target, message))
        else:

            parser = formatter.IrcFormatter()