# Path: grazyna/irc/exc.py
# class NoSuchNickError(Exception):
#     nick = None
#     
#     def __init__(self, nick):
#         self.nick = nick
# 
#     def __repr__(self):
#         return 'NoSuchNickError(%s)' % self.nick
# 
#     def __str__(self):
#         return repr(self)
# 
#     def __eq__(self, other):
#         return self.nick == other.nick
# 
# Path: grazyna/irc/models.py
# class User(object):
#     """User class - has nick, realname, and host"""
#     nick = ""
#     host = ""
#     realname = ""
# 
#     def __init__(self, prefix):
#         try:
#             self.nick, _, name_host = prefix.partition('!')
#             self.realname, _, self.host = name_host.partition('@')
#         except:
#             pass
# 
#     @property
#     def prefix(self):
#         return "%s@%s" % (self.realname, self.host)
# 
#     def __repr__(self):
#         return "User('%s!%s')" % (self.nick, self.prefix)
# 
#     def __eq__(self, other):
#         if not isinstance(other, type(self)):
#             return False
# 
#         return (
#             self.nick == other.nick
#             and self.realname == other.realname
#             and self.host == other.host
#         )


from functools import wraps
from datetime import datetime
from asyncio import async
from grazyna.irc.exc import NoSuchNickError
from grazyna.irc.models import User
import os.path
import asyncio
        if future:
            return func(self, future.data)

    return inner


class MessageController(object):

    NUMERIC_COMMANDS = {
        '005': 'start',  # http://www.irc.org/tech_docs/005.html
        '330': 'whois_account',  # I don't have idea where is in RFC
        '311': 'whois_user',
        '312': 'whois_server',
        '313': 'whois_operator',
        '317': 'whois_idle',
        '319': 'whois_channels',
        '318': 'whois_end',
        '401': 'no_such_nick',
    }
    log_files = {}

    def __init__(self, protocol, data):
        self.protocol = protocol
        if not data:
            self.data = []
            return
        prefix_or_not = data[0]

        if prefix_or_not[0] == ':':
            self.prefix = prefix_or_not[1:]  # without ':'

# Path: grazyna/irc/exc.py
# class NoSuchNickError(Exception):
#     nick = None
#     
#     def __init__(self, nick):
#         self.nick = nick
# 
#     def __repr__(self):
#         return 'NoSuchNickError(%s)' % self.nick
# 
#     def __str__(self):
#         return repr(self)
# 
#     def __eq__(self, other):
#         return self.nick == other.nick
# 
# Path: grazyna/irc/models.py
# class User(object):
#     """User class - has nick, realname, and host"""
#     nick = ""
#     host = ""
#     realname = ""
# 
#     def __init__(self, prefix):
#         try:
#             self.nick, _, name_host = prefix.partition('!')
#             self.realname, _, self.host = name_host.partition('@')
#         except:
#             pass
# 
#     @property
#     def prefix(self):
#         return "%s@%s" % (self.realname, self.host)
# 
#     def __repr__(self):
#         return "User('%s!%s')" % (self.nick, self.prefix)
# 
#     def __eq__(self, other):
#         if not isinstance(other, type(self)):
#             return False
# 
#         return (
#             self.nick == other.nick
#             and self.realname == other.realname
#             and self.host == other.host
#         )


# Path: grazyna/irc/message_controller.py
from functools import wraps
from datetime import datetime
from asyncio import async
from grazyna.irc.exc import NoSuchNickError
from grazyna.irc.models import User
import os.path
import asyncio

        if future:
            return func(self, future.data)

    return inner


class MessageController(object):

    NUMERIC_COMMANDS = {
        '005': 'start',  # http://www.irc.org/tech_docs/005.html
        '330': 'whois_account',  # I don't have idea where is in RFC
        '311': 'whois_user',
        '312': 'whois_server',
        '313': 'whois_operator',
        '317': 'whois_idle',
        '319': 'whois_channels',
        '318': 'whois_end',
        '401': 'no_such_nick',
    }
    log_files = {}

    def __init__(self, protocol, data):
        self.protocol = protocol
        if not data:
            self.data = []
            return
        prefix_or_not = data[0]

        if prefix_or_not[0] == ':':
            self.prefix = prefix_or_not[1:]  # without ':'

            self.user = User(self.prefix)