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