mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-11 06:36:24 +02:00
Made Special Greetings for 3 Users
This commit is contained in:
@@ -9,6 +9,10 @@ class Greeter(JoinObserverPrototype):
|
|||||||
A Class only reacting to pings
|
A Class only reacting to pings
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
greetings_dict = defaultdict(str)
|
||||||
|
greetings_dict['Luci'] = "Hewuu"
|
||||||
|
greetings_dict['pome'] = "Hewuu"
|
||||||
|
greetings_dict['Skadi'] = "Awoo"
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def cmd():
|
def cmd():
|
||||||
return None
|
return None
|
||||||
@@ -31,5 +35,9 @@ class Greeter(JoinObserverPrototype):
|
|||||||
return
|
return
|
||||||
if data['channel'] == connection.details.get_channel():
|
if data['channel'] == connection.details.get_channel():
|
||||||
if int(time.time()) - self.names[data['nick']] > 28800:
|
if int(time.time()) - self.names[data['nick']] > 28800:
|
||||||
|
if Greeter.greetings_dict[data['nick']] != "":
|
||||||
|
connection.send_back(Greeter.greetings_dict[data['nick']]+" " + data['nick'], data)
|
||||||
|
else:
|
||||||
connection.send_back(self.greeting+" " + data['nick'], data)
|
connection.send_back(self.greeting+" " + data['nick'], data)
|
||||||
|
|
||||||
self.names[data['nick']] = int(time.time())
|
self.names[data['nick']] = int(time.time())
|
||||||
Reference in New Issue
Block a user