def outmonitor(self, origin, channel, txt, event=None, plugorigin=None): """ create an OUTPUT event with provided txt and send it to callbacks. """ if event and event.outmonitored: logging.info("event is already outmonitored") ; return if event: e = cpy(event) else: e = EventBase() if e.status == "done": logging.debug("%s - outmonitor - event is done .. ignoring" % self.cfg.name) return e.bot = self e.outmonitored = True e.origin = origin e.userhost = str(self.cfg.name) +'@' + str(self.cfg.uuid) e.auth = e.userhost e.channel = channel e.txt = txt e.cbtype = 'OUTPUT' e.nodispatch = True e.ttl = 1 e.nick = self.cfg.nick or self.cfg.name e.bonded = True e.isoutput = True e.dontbind = True e.plugorigin = plugorigin or (event and event.plugorigin) logging.info("plug origin is %s" % e.plugorigin) #first_callbacks.check(self, e) self.doevent(e)
def outmonitor(self, origin, channel, txt, event=None, plugorigin=None): """ create an OUTPUT event with provided txt and send it to callbacks. """ if event and event.outmonitored: logging.info("event is already outmonitored") return if event: e = cpy(event) else: e = EventBase() if e.status == "done": logging.debug("%s - outmonitor - event is done .. ignoring" % self.cfg.name) return e.bot = self e.outmonitored = True e.origin = origin e.userhost = str(self.cfg.name) + '@' + str(self.cfg.uuid) e.auth = e.userhost e.channel = channel e.txt = txt e.cbtype = 'OUTPUT' e.nodispatch = True e.ttl = 1 e.nick = self.cfg.nick or self.cfg.name e.bonded = True e.isoutput = True e.dontbind = True e.plugorigin = plugorigin or (event and event.plugorigin) logging.info("plug origin is %s" % e.plugorigin) #first_callbacks.check(self, e) self.doevent(e)
def outmonitor(self, origin, channel, txt, event=None): """ create an OUTPUT event with provided txt and send it to callbacks. """ if event: e = cpy(event) else: e = EventBase() if e.status == "done": logging.debug("%s - outmonitor - event is done .. ignoring" % self.name) return e.bot = self e.origin = origin e.ruserhost = self.botname +'@' + self.uuid e.userhost = e.ruserhost e.auth = e.userhost e.channel = channel e.origtxt = txt e.txt = txt e.cbtype = 'OUTPUT' e.botoutput = True e.nodispatch = True e.ttl = 1 e.nick = self.nick or self.botname e.bind(self) first_callbacks.check(self, e)
def outmonitor(self, origin, channel, txt, event=None): """ create an OUTPUT event with provided txt and send it to callbacks. """ if event: e = cpy(event) else: e = EventBase() if e.status == "done": logging.debug("%s - outmonitor - event is done .. ignoring" % self.name) return e.bot = self e.origin = origin e.ruserhost = self.botname + '@' + self.uuid e.userhost = e.ruserhost e.auth = e.userhost e.channel = channel e.origtxt = txt e.txt = txt e.cbtype = 'OUTPUT' e.botoutput = True e.nodispatch = True e.ttl = 1 e.nick = self.nick or self.botname e.bind(self) first_callbacks.check(self, e)