Beispiel #1
0
    handle_exception()
    logging.warn('%s - closing dcc with %s' % (self.name, nick))
    partyline.del_party(nick)
    return
try:
    res = self.normalize(res)
    ievent = IrcEvent()
    ievent.printto = sock
    ievent.bottype = "irc"
    ievent.nick = nick
    ievent.userhost = userhost
    ievent.auth = userhost
    ievent.channel = channel or ievent.userhost
    ievent.origtxt = res
    ievent.txt = res
    ievent.cmnd = 'DCC'
    ievent.cbtype = 'DCC'
    ievent.bot = self
    ievent.sock = sock
    ievent.speed = 1
    ievent.isdcc = True
    ievent.msg = True
    ievent.bind(self)
    logging.debug("%s - dcc - constructed event" % self.name)
    if ievent.txt[0] == "!":
        self.doevent(ievent)
        continue
    elif ievent.txt[0] == "@":
        partyline.say_broadcast_notself(ievent.nick, "[%s] %s" % (ievent.nick, ievent.txt))
        q = Queue.Queue()
        ievent.queues = [q]
Beispiel #2
0
Datei: bot.py Projekt: code2u/jsb
    handle_exception()
    logging.warn("%s - closing dcc with %s" % (self.cfg.name, nick))
    partyline.del_party(nick)
    return
try:
    res = self.normalize(res)
    ievent = IrcEvent()
    ievent.printto = sock
    ievent.bottype = "irc"
    ievent.nick = nick
    ievent.userhost = userhost
    ievent.auth = userhost
    ievent.channel = channel or ievent.userhost
    ievent.origtxt = res
    ievent.txt = res
    ievent.cmnd = "DCC"
    ievent.cbtype = "DCC"
    ievent.bot = self
    ievent.sock = sock
    ievent.speed = 1
    ievent.isdcc = True
    ievent.msg = True
    ievent.bind(self)
    logging.debug("%s - dcc - constructed event" % self.cfg.name)
    if ievent.txt[0] == "!":
        self.doevent(ievent)
        continue
    elif ievent.txt[0] == "@":
        partyline.say_broadcast_notself(ievent.nick, "[%s] %s" % (ievent.nick, ievent.txt))
        q = Queue.Queue()
        ievent.queues = [q]