Skip to content

Commit

Permalink
the seen database now stores nick changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ask-compu committed Mar 15, 2016
1 parent 7e8da49 commit ba30117
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/seen.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def seen(phenny, input):
phenny.say(nick + " was last seen leaving " + channel + ' with message "' + message + '" on ' + seentime)
elif event == "QUIT":
phenny.say(nick + ' was last seen quitting with message "' + message + '" on ' + seentime)
elif event == "NICK":
phenny.say(nick + ' was last seen switching to the nick ' + channel + ' on ' + seentime)
if gotresults == True:
c.close()
seen.commands = ['seen']
Expand All @@ -110,7 +112,7 @@ def seenstore(phenny, input, event):
channel = "None"
else:
channel = input.sender
if event == "JOIN":
if event == "JOIN" or event == "NICK":
message = "None"
else:
message = input.group()
Expand All @@ -137,6 +139,13 @@ def seenmsg(phenny, input):
#seenjoin.rule = r'(.*)'
#seenjoin.priority = 'low'

def seennick(phenny, input):
event = "NICK"
seenstore(phenny, input, event)
seennick.event = "NICK"
seennick.rule = r'(.*)'
seennick.priority = 'low'

def seenquit(phenny, input):
event = "QUIT"
seenstore(phenny, input, event)
Expand Down

0 comments on commit ba30117

Please sign in to comment.