Adapted from Influx`s ktonolak.py
Code: Select all
Or you can download it here."""
"""
Stops the users that talk in german by telling them to talk in english.
Adapted from Influx`s ktonolak.py
By: Matthew0901
v1.2
"""
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',
'wer',
'kann',
'von',
'euch',
'deutsch',
'ist',
}
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 Englischer Server. Bitte schreibe in Englisch!')
return False
return connection.on_chat(self, value, global_message)
return protocol, nogermanConnection