diff --git a/FaustBot/Modules/Greeter.py b/FaustBot/Modules/Greeter.py index d5d2655..7731ecc 100644 --- a/FaustBot/Modules/Greeter.py +++ b/FaustBot/Modules/Greeter.py @@ -1,5 +1,6 @@ from FaustBot.Communication.Connection import Connection from FaustBot.Modules.JoinObserverPrototype import JoinObserverPrototype +from FaustBot.Model.UserProvider import UserProvider import time from collections import defaultdict @@ -22,11 +23,13 @@ class Greeter(JoinObserverPrototype): self.greeting = greeting def update_on_join(self, data, connection: Connection): + if data['channel'] == connection.details.get_channel(): + if data['nick'].find("Guest") != -1: + return + UProvider= UserProvider() + if(UProvider.get_characters(data['nick'])) < 100: + return if data['channel'] == connection.details.get_channel(): if int(time.time()) - self.names[data['nick']] > 28800: - if data['nick'].find("Neuling") != -1: - connection.send_back("Herzlich Willkommen bei uns "+data['nick'],data) - self.names[data['nick']] = int(time.time()) - return connection.send_back(self.greeting+" " + data['nick'], data) self.names[data['nick']] = int(time.time()) \ No newline at end of file