noespanol.py

Intended for use on live public servers.
5 posts Page 1 of 1 First unread post
matthew0901
Deuced Up
Posts: 105
Joined: Wed Nov 21, 2012 12:23 pm


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.
Last edited by matthew0901 on Mon Jan 06, 2014 12:02 am, edited 2 times in total.
learn_more
Coder
Coder
Posts: 891
Joined: Sun Mar 24, 2013 9:59 pm


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.
matthew0901
Deuced Up
Posts: 105
Joined: Wed Nov 21, 2012 12:23 pm


sorry bout that, fixed and updated to 1.1
ReubenMcHawk
Organizer
Organizer
Posts: 853
Joined: Sat Nov 03, 2012 4:36 am


Or an Asian woman named Dolores?
Kuma
Scripter
Scripter
Posts: 758
Joined: Fri Mar 22, 2013 10:05 am


Or interested
5 posts Page 1 of 1 First unread post
Return to “Completed Releases”

Who is online

Users browsing this forum: No registered users and 4 guests