def onMOTDReceived(self, channel, topic, msg): self.uiChatHistoryTxtB.setHtml( '<font color="#034456"><strong>' + channel + '</strong> || <strong>' + topic + '</strong></font><br/><br/>' + nl2br(replaceURLs(msg)) + '<br/><br/>Type /help to see a list of commands<br/><br/>') self.controller.checkInstallation()
def onChatReceived(self, name, txt): prefix = self.controller.getPlayerPrefix(name, Settings.value(Settings.SHOW_COUNTRY_FLAG_IN_CHAT)) txt = cgi.escape(txt.strip()).replace(self.controller.username, "<b>{}</b>".format(self.controller.username)) urls = findURLs(txt) chat = prefix + txt if urls: #for url in urls: # chat += " <a href='" + url + "'><font color=green>link</font></a>" chat = prefix + replaceURLs(txt) self.appendChat(chat)
def onChatReceived(self, name, txt): prefix = self.controller.getPlayerPrefix(name, Settings.value(Settings.SHOW_COUNTRY_FLAG_IN_CHAT)) if (self.controller.username+" ".lower() in txt.lower() or " "+self.controller.username.lower() in txt.lower() or txt.lower()==self.controller.username.lower()): txt = cgi.escape(txt.strip()).replace(self.controller.username, "<b>{}</b>".format(self.controller.username)) ggpo.common.sound.notify() else: txt = cgi.escape(txt.strip()) urls = findURLs(txt) chat = prefix + txt if urls: chat = prefix + replaceURLs(txt) self.appendChat(replaceReplayID(chat))
def onChatReceived(self, name, txt): if name=="System" and "GAME: " in txt and Settings.value(Settings.HIDE_INGAME_CHAT): return if name=="System" and "GAME: " in txt and not Settings.value(Settings.HIDE_INGAME_CHAT): txt = re.sub(r'<System> ', r'', txt) prefix = self.controller.getPlayerPrefix(name, Settings.value(Settings.SHOW_COUNTRY_FLAG_IN_CHAT)) if (self.controller.username+" ".lower() in txt.lower() or " "+self.controller.username.lower() in txt.lower() or txt.lower()==self.controller.username.lower()): txt = cgi.escape(txt.strip()).replace(self.controller.username, "<b>{}</b>".format(self.controller.username)) ggpo.common.sound.notify() else: txt = cgi.escape(txt.strip()) urls = findURLs(txt) chat = prefix + txt if urls: chat = prefix + replaceURLs(txt) self.appendChat(replaceReplayID(chat))
def onChatReceived(self, name, txt): prefix = self.controller.getPlayerPrefix( name, Settings.value(Settings.SHOW_COUNTRY_FLAG_IN_CHAT)) if (self.controller.username + " ".lower() in txt.lower() or " " + self.controller.username.lower() in txt.lower() or txt.lower() == self.controller.username.lower()): txt = cgi.escape(txt.strip()).replace( self.controller.username, "<b>{}</b>".format(self.controller.username)) ggpo.common.sound.notify() else: txt = cgi.escape(txt.strip()) urls = findURLs(txt) chat = prefix + txt if urls: chat = prefix + replaceURLs(txt) self.appendChat(replaceReplayID(chat))
def onChatReceived(self, name, txt): if name == "System" and "GAME: " in txt and Settings.value( Settings.HIDE_INGAME_CHAT): return if name == "System" and "GAME: " in txt and not Settings.value( Settings.HIDE_INGAME_CHAT): txt = re.sub(r'<System> ', r'', txt) prefix = self.controller.getPlayerPrefix( name, Settings.value(Settings.SHOW_COUNTRY_FLAG_IN_CHAT)) if (self.controller.username + " ".lower() in txt.lower() or " " + self.controller.username.lower() in txt.lower() or txt.lower() == self.controller.username.lower()): txt = html.escape(txt.strip()).replace( self.controller.username, "<b>{}</b>".format(self.controller.username)) ggpo.common.sound.notify() else: txt = html.escape(txt.strip()) urls = findURLs(txt) chat = prefix + txt if urls: chat = prefix + replaceURLs(txt) self.appendChat(replaceReplayID(chat))
def onMOTDReceived(self, channel, topic, msg): self.uiChatHistoryTxtB.setHtml(replaceURLs(msg) + '<br/><br/>Type /help to see a list of commands<br/><br/>')
def onMOTDReceived(self, channel, topic, msg): self.uiChatHistoryTxtB.setHtml('<font color="#034456"><strong>'+channel+'</strong> || <strong>'+ topic +'</strong></font><br/><br/>' + nl2br(replaceURLs(msg)) + '<br/><br/>Type /help to see a list of commands<br/><br/>') self.controller.checkInstallation()