diff --git a/FaustBot/Communication/PrivmsgObservable.py b/FaustBot/Communication/PrivmsgObservable.py index b1d1c80..7eb624c 100644 --- a/FaustBot/Communication/PrivmsgObservable.py +++ b/FaustBot/Communication/PrivmsgObservable.py @@ -1,5 +1,5 @@ import _thread - +import copy from FaustBot.Communication.Observable import Observable from FaustBot import Modules from FaustBot.Model.BlockedUsers import BlockProvider @@ -16,6 +16,8 @@ class PrivmsgObservable(Observable): 'raw_nick': raw_data.split(' PRIVMSG')[0][1:]} # 12 = : PRIVMSG : data['message'] = raw_data[data['raw_nick'].__len__() + data['channel'].__len__() + 12:] + data['messageCaseSensitive'] = copy.copy(data['message']) + data['message'] = data['message'].lower() data['command'] = 'irgendwas, das mit . oder .. anfängt oder so... oder das sollen module checken?' if self.user_list is None: return diff --git a/FaustBot/Modules/CustomUserModules/GlossaryModule.py b/FaustBot/Modules/CustomUserModules/GlossaryModule.py index aabdc96..2b01fd0 100644 --- a/FaustBot/Modules/CustomUserModules/GlossaryModule.py +++ b/FaustBot/Modules/CustomUserModules/GlossaryModule.py @@ -24,7 +24,7 @@ class GlossaryModule(PrivMsgObserverPrototype): self._config = config def update_on_priv_msg(self, data, connection: Connection): - msg = data['message'] + msg = data['messageCaseSensitive'] if msg.startswith(GlossaryModule._REMOVE_EXPLANATION): self._remove_query(data, connection) elif msg.startswith(GlossaryModule._ADD_EXPLANATION): @@ -84,7 +84,7 @@ class GlossaryModule(PrivMsgObserverPrototype): connection.send_back("Dir fehlen leider die Rechte zum Hinzufügen von Einträgen, " + data['nick'] + ".", data) return - msg = data['message'].split(GlossaryModule._ADD_EXPLANATION)[1].strip() + msg = data['messageCaseSensitive'].split(GlossaryModule._ADD_EXPLANATION)[1].strip() split = msg.split(' ', 1) glossary_provider = GlossaryProvider() glossary_provider.save_or_replace(split[0], split[1]) diff --git a/FaustBot/Modules/IntroductionObserver.py b/FaustBot/Modules/IntroductionObserver.py index 60cd15b..c08bde3 100644 --- a/FaustBot/Modules/IntroductionObserver.py +++ b/FaustBot/Modules/IntroductionObserver.py @@ -18,7 +18,7 @@ class IntroductionObserver(PrivMsgObserverPrototype): return ".me - kann von registrierten Nutzern verwendet werden um eine Vorstellung zu speichern" def update_on_priv_msg(self, data, connection: Connection): - msg = data["message"] + msg = data['messageCaseSensitive'] nick = data["nick"] if not msg.startswith(".me") and not msg.startswith(".me-"): return diff --git a/FaustBot/Modules/TellObserver.py b/FaustBot/Modules/TellObserver.py index 39c53be..3581312 100644 --- a/FaustBot/Modules/TellObserver.py +++ b/FaustBot/Modules/TellObserver.py @@ -15,6 +15,6 @@ class TellObserver(PrivMsgObserverPrototype): def update_on_priv_msg(self, data, connection: Connection): if data['message'].find('.tell') != -1 and self._is_idented_mod(data, connection): - connection.send_channel(data['message'][6:]) + connection.send_channel(data['messageCaseSensitive'][6:]) def _is_idented_mod(self, data: dict, connection: Connection): return data['nick'] in self._config.mods and connection.is_idented(data['nick']) \ No newline at end of file diff --git a/FaustBot/Modules/TitleObserver.py b/FaustBot/Modules/TitleObserver.py index e551a4e..5f8b447 100644 --- a/FaustBot/Modules/TitleObserver.py +++ b/FaustBot/Modules/TitleObserver.py @@ -18,7 +18,7 @@ class TitleObserver(PrivMsgObserverPrototype): def update_on_priv_msg(self, data, connection: Connection): regex = "(?Phttps?://[^\s]+)" - url = re.search(regex, data['message']) + url = re.search(regex, data['messageCaseSensitive']) if url is not None: url = url.group() print(url) diff --git a/HangmanLog b/HangmanLog index 738114d..f3d63a4 100644 --- a/HangmanLog +++ b/HangmanLog @@ -33,3 +33,8 @@ baerbel ; GITTERPOMMES baerbel ; NASE TommyRainbow ; TEST TommyRainbow ; LALALALALALA +Elira ; TEST +Elira ; SUPERTOLLESWORT +Elira ; SUPERTOLL +Elira ; FRAGIL +Elira ; LITHIUM