Page 1 of 1

noespanol.py

Posted: Sat Jan 04, 2014 6:50 pm
by matthew0901
So this is another script that basically tells the player to speak English and if they speak Spanish it wont show up In the chat.

Adapted from Influx`s ktonolak.py
Code: Select all
"""
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
Or you can download it here.

Re: noespanol.py

Posted: Sun Jan 05, 2014 4:23 pm
by learn_more
what is the user wants to talk about a queue, says busted, or really any word with 'es' in it?


if you use this on your server you are a moron.

Re: noespanol.py

Posted: Sun Jan 05, 2014 11:57 pm
by matthew0901
sorry bout that, fixed and updated to 1.1

Re: noespanol.py

Posted: Mon Jan 06, 2014 12:21 am
by ReubenMcHawk
Or an Asian woman named Dolores?

Re: noespanol.py

Posted: Mon Jan 06, 2014 5:42 am
by Kuma
Or interested