def append_message(self, msg): msg = preprocess(msg, (replace_emotes, remove_formatting)) msg = links_to_markup(escape_markup(msg)) self._append(msg) self.container.height = self._container_height() self.children[0].scroll_y = 0
def send_whisper_result(data): if data.code == 0: message = textutils.preprocess(commands.whisper_msg) m = "[-> {}] {}".format(commands.whisper_to, message) debuglog.info(m) cui.input_win.clear() cui.input_win.addstr('/w "{}" '.format(commands.whisper_to)) cui.input_win.refresh() else: debuglog.info("[error] {} is offline.".format(commands.whisper_to))
def party_chat(data): nick = mapserv.party_members.get(data.id, str(data.id)) message = textutils.preprocess(data.message) m = "[Party] {} : {}".format(nick, message) debuglog.info(m)
def got_whisper(data): nick, message = data.nick, data.message message = textutils.preprocess(message) m = "[{} ->] {}".format(nick, message) debuglog.info(m)
def player_chat(data): message = textutils.preprocess(data.message) debuglog.info(message)
def being_chat(data): id_, message = data.id, data.message nick = mapserv.beings_cache[id_].name message = textutils.preprocess(message) m = "{} : {}".format(nick, message) debuglog.info(m)