Adapted from Influx`s ktonolak.py
Code: Select all
Or you can download it here."""
Stops the users that talk in spanish by telling them to talk in english.
Adapted from Influx`s ktonolak.py
By: Matthew0901
v1.1
"""
import string
def apply_script(protocol, connection, config):
class nospanishConnection(connection):
global spanishdict
spanishdict = {
'hola',
'encanta',
'adecuada',
'cuando',
'suspiro'
'este',
'juego',
'hizo',
'adios',
'asi',
'quien',
'edificio',
'dolor',
'aleman',
}
def on_chat(self, value, global_message):
message = string.lower(value)
for punc in string.punctuation:
message = message.replace(punc,"")
if any(spanish in message for spanish in spanishdict):
self.send_chat('Se trata de un servidor de Ingles. Por favor, escriba en Ingles!')
return False
return connection.on_chat(self, value, global_message)
return protocol, nospanishConnection
