# Path: bnw/core/base.py
# class BnwResponse(Exception):  # we do it idiotic way!
#     pass


import sys
import traceback
import re
import datetime
from base import CommandParserException, BaseParser, USER_RE
from bnw.core.base import BnwResponse
from twisted.internet import defer
        else:
            return fun(self, command, msg, parameters)
    return newfun


class SimplifiedParser(BaseParser):
    SHOW_RE = re.compile(ur'^#([0-9A-Za-z]+)(/[0-9A-Za-z]+)?(\+)?$')
    # this relises on the fact that USER_RE got one group inside it
    SHOW_USER_RE = re.compile(ur'^' + USER_RE + '(\+)?$')
    # TAG_SYMS=u'0-9A-Za-zА-Яа-я_-'
    SHOW_TAG_RE = re.compile(ur'^\*(\S+)(\+)?$')
    REPLY_RE = re.compile(ur'\A#([0-9A-Za-z]+)(/[0-9A-Za-z]+)? (.+)\Z',
                          re.MULTILINE | re.DOTALL)
    POST_RE = re.compile(
        ur'\A(?:([\*!]\S+)?(?: ([\*!]\S+))?(?: ([\*!]\S+))?(?: ([\*!]\S+))?(?: ([\*!]\S+))? )?(.+)\Z',
        re.MULTILINE | re.DOTALL)  # idiot
    RECO_RE = re.compile(ur'^! +#([0-9A-Za-z]+)(?: (.+))?')

    def __init__(self, commands):
        self.commands = commands

    @defer.inlineCallbacks
    def handleCommand(self, msg):
        ress = self.parse(
            msg.body)  # unicode(msg.body).encode('utf-8','ignore'))
        command = ress[0]
        parameters = ress[1:]
        try:
            # return str(parameters)
            defer.returnValue((yield self.commands['simplified', command]['handler'](command, msg, parameters)))

# Path: bnw/core/base.py
# class BnwResponse(Exception):  # we do it idiotic way!
#     pass


# Path: bnw/xmpp/parser_simplified.py
import sys
import traceback
import re
import datetime
from base import CommandParserException, BaseParser, USER_RE
from bnw.core.base import BnwResponse
from twisted.internet import defer

        else:
            return fun(self, command, msg, parameters)
    return newfun


class SimplifiedParser(BaseParser):
    SHOW_RE = re.compile(ur'^#([0-9A-Za-z]+)(/[0-9A-Za-z]+)?(\+)?$')
    # this relises on the fact that USER_RE got one group inside it
    SHOW_USER_RE = re.compile(ur'^' + USER_RE + '(\+)?$')
    # TAG_SYMS=u'0-9A-Za-zА-Яа-я_-'
    SHOW_TAG_RE = re.compile(ur'^\*(\S+)(\+)?$')
    REPLY_RE = re.compile(ur'\A#([0-9A-Za-z]+)(/[0-9A-Za-z]+)? (.+)\Z',
                          re.MULTILINE | re.DOTALL)
    POST_RE = re.compile(
        ur'\A(?:([\*!]\S+)?(?: ([\*!]\S+))?(?: ([\*!]\S+))?(?: ([\*!]\S+))?(?: ([\*!]\S+))? )?(.+)\Z',
        re.MULTILINE | re.DOTALL)  # idiot
    RECO_RE = re.compile(ur'^! +#([0-9A-Za-z]+)(?: (.+))?')

    def __init__(self, commands):
        self.commands = commands

    @defer.inlineCallbacks
    def handleCommand(self, msg):
        ress = self.parse(
            msg.body)  # unicode(msg.body).encode('utf-8','ignore'))
        command = ress[0]
        parameters = ress[1:]
        try:
            # return str(parameters)
            defer.returnValue((yield self.commands['simplified', command]['handler'](command, msg, parameters)))

        except BnwResponse, response: