Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Stops the users that talk in german by telling them to talk in english.
- By: Matthew0901
- """
- import string
- def apply_script(protocol, connection, config):
- class nogermanConnection(connection):
- global germandict
- germandict = {
- 'hallo',
- 'alter',
- 'welches',
- 'ihr',
- 'angebracht',
- 'beim',
- 'seufzer',
- 'null',
- 'ich',
- 'ein',
- 'auf',
- 'Wiedersehen',
- 'dadurch',
- 'konnen',
- }
- def on_chat(self, value, global_message):
- message = string.lower(value)
- for punc in string.punctuation:
- message = message.replace(punc,"")
- if any(german in message for german in germandict):
- self.send_chat('Dies ist ein English Speaking Server Bitte sprechen Englisch.')
- return False
- return connection.on_chat(self, value, global_message)
- return protocol, nogermanConnection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement