示例#1
0
 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()
示例#2
0
 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)
示例#3
0
 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))
示例#4
0
 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))
示例#5
0
 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))
示例#6
0
 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))
示例#7
0
 def onMOTDReceived(self, channel, topic, msg):
     self.uiChatHistoryTxtB.setHtml(replaceURLs(msg) + '<br/><br/>Type /help to see a list of commands<br/><br/>')
示例#8
0
 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()