def handle_broadcast(bot, ievent): """ arguments: <txt> - broadcast txt to all joined channels. """ if not ievent.rest: ievent.missing('<txt>') return ievent.reply('broadcasting') getfleet().broadcast(ievent.rest) partyline.say_broadcast(ievent.rest) ievent.reply('done')
ievent.iscommand = True ievent.showall = True ievent.nodispatch = False ievent.bind() self.put(ievent) continue elif ievent.txt[0] == "@": partyline.say_broadcast_notself(ievent.nick, "[%s] %s" % (ievent.nick, ievent.txt)) q = Queue.Queue() ievent.queues = [q] ievent.txt = ievent.txt[1:] self.doevent(ievent) result = waitforqueue(q, 3000) if result: for i in result: partyline.say_broadcast("[bot] %s" % i) continue else: partyline.say_broadcast_notself(ievent.nick, "[%s] %s" % (ievent.nick, ievent.txt)) except socket.error, ex: try: (errno, errstr) = ex except: errno = 0 errstr = str(ex) if errno == 35 or errno == 11: continue except Exception, ex: handle_exception() sockfile.close() logging.warn('closing dcc with %s (%s)' % (nick, self.cfg.name))