[PYTHON] Profanity Prevention System | .Fatihbab34.
Discussion on [PYTHON] Profanity Prevention System | .Fatihbab34. within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
Thanks for sharing with us. But you're using constant values.
example :
PHP Code:
def __SendChatPacket(self, text, type): # White words. Whitewords = ["www.",".com",".net",".com.tr",".de",".org"] Status = "" # End if net.IsChatInsultIn(text): chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING) else: for i in xrange(len(Whitewords)): if(text.find(Whitewords[i]) != -1): Status = FALSE else: Status = TRUE
if(Status): net.SendChatPacket(text,type) else: chat.AppendChat(chat.CHAT_TYPE_INFO,"Please don't advertising in the game.") return
Thanks for sharing with us. But you're using constant values.
example :
PHP Code:
def __SendChatPacket(self, text, type):
# White words.
Whitewords = ["www.",".com",".net",".com.tr",".de",".org"]
Status = ""
# End
if net.IsChatInsultIn(text):
chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)
else:
for i in xrange(len(Whitewords)):
if(text.find(Whitewords[i]) != -1):
Status = FALSE
else:
Status = TRUE
if(Status):
net.SendChatPacket(text,type)
else:
chat.AppendChat(chat.CHAT_TYPE_INFO,"Please don't advertising in the game.")
return
Python Run Exe Code(without os.system) 05/31/2012 - Metin2 - 2 Replies What is run exe code in python without os.system because
when os.system starting exe , os.system open cmd then run it.