- if net.IsChatInsultIn(text):
- chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)
- else:
- name = player.GetName()
- if type == chat.CHAT_TYPE_SHOUT:
- if name.find("[Staff]") !=-1:
- empire_id = ""
- else:
- empire_id = str(net.GetEmpireID())
- if empire_id == "1":
- empire_id = "[Shinsoo] "
- elif empire_id == "2":
- empire_id = "[Chunjo] "
- elif empire_id == "3":
- empire_id = "[Jinno] "
- text = empire_id + text
- name = player.GetName()
- if text.find("[red]")!=-1 or text.find("@Yürü")!=-1 or text.find("@Koş")!=-1 or text.find("@1")!=-1 or text.find("@2")!=-1 or text.find("@3")!=-1 or text.find("@4")!=-1 or text.find("@5")!=-1 or text.find("@6")!=-1 or text.find("@!")!=-1 or text.find("@?")!=-1 or text.find("@")!=-1 or text.find("[A]")!=-1 or text.find("[S]")!=-1 or text.find("[V]")!=-1:
- text = text.replace('@Yürü', '/set_w')
- text = text.replace('@Koş', '/set_r')
- text = text.replace('@1', 'Teşekkür ederim.')
- text = text.replace('@2', 'Aleyküm Selam')
- text = text.replace('@3', 'Selamın Aleyküm')
- text = text.replace('@4', 'Tebrikler')
- text = text.replace('@5', 'Bidaha yapalım.')
- text = text.replace('@6', 'Adamsın!')
- text = text.replace('@!', '(!)')
- text = text.replace('@?', '(?)')
- text = text.replace('@', '|h|r')
- text = text.replace('[A]', 'Arıyorum:|cFF00FF00|H|h')
- text = text.replace('[S]', 'Satılık:|cFFFF0000|H|h')
- if name.find("[VİP]")!=-1:
- text = text.replace('[V]', '[VİP]|cFF00FF00|H|h')
- if name.find("[KRAL]")!=-1:
- text = text.replace('[K]', '[KRAL]|cFF00FF00|H|h')
- net.SendChatPacket(text, type)
- else:
- if text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1 or text.find("")!=-1:
- if text.find("")!=-1:
- net.SendChatPacket(text, type)
- else:
- chat.AppendChat(chat.CHAT_TYPE_INFO, "Komutları kullanma yetkiniz yok.")
- else:
- net.SendChatPacket(text, type)