1. if net.IsChatInsultIn(text):
  2. chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)
  3. else:
  4. name = player.GetName()
  5. if type == chat.CHAT_TYPE_SHOUT:
  6. if name.find("[Staff]") !=-1:
  7. empire_id = ""
  8. else:
  9. empire_id = str(net.GetEmpireID())
  10. if empire_id == "1":
  11. empire_id = "[Shinsoo] "
  12. elif empire_id == "2":
  13. empire_id = "[Chunjo] "
  14. elif empire_id == "3":
  15. empire_id = "[Jinno] "
  16. text = empire_id + text
  17. name = player.GetName()
  18. 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:
  19. text = text.replace('@Yürü', '/set_w')
  20. text = text.replace('@Koş', '/set_r')
  21. text = text.replace('@1', 'Teşekkür ederim.')
  22. text = text.replace('@2', 'Aleyküm Selam')
  23. text = text.replace('@3', 'Selamın Aleyküm')
  24. text = text.replace('@4', 'Tebrikler')
  25. text = text.replace('@5', 'Bidaha yapalım.')
  26. text = text.replace('@6', 'Adamsın!')
  27. text = text.replace('@!', '(!)')
  28. text = text.replace('@?', '(?)')
  29. text = text.replace('@', '|h|r')
  30. text = text.replace('[A]', 'Arıyorum:|cFF00FF00|H|h')
  31. text = text.replace('[S]', 'Satılık:|cFFFF0000|H|h')
  32. if name.find("[VİP]")!=-1:
  33. text = text.replace('[V]', '[VİP]|cFF00FF00|H|h')
  34. if name.find("[KRAL]")!=-1:
  35. text = text.replace('[K]', '[KRAL]|cFF00FF00|H|h')
  36. net.SendChatPacket(text, type)
  37. else:
  38. 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:
  39. if text.find("")!=-1:
  40. net.SendChatPacket(text, type)
  41. else:
  42. chat.AppendChat(chat.CHAT_TYPE_INFO, "Komutları kullanma yetkiniz yok.")
  43. else:
  44. net.SendChatPacket(text, type)