Permalink
Browse files

cleanup debugging statements

  • Loading branch information...
1 parent fb2220f commit 0a9bbd91641331dd1b5767a8011f82fcbcfcc952 @Steve-V committed Dec 31, 2011
Showing with 1 addition and 13 deletions.
  1. +1 −13 modules/seen.py
View
14 modules/seen.py
@@ -38,44 +38,32 @@ def f_seen(phenny, input):
lnick = nick.lower()
if lnick in storage:
- #print("lnick {} is in storage".format(lnick)) #debug
storage['nick:'+lnick] = storage[lnick]
del storage[lnick]
- #else:
- #print("lnick {} not in storage".format(lnick)) #debug
#when you make a string into a set, it gets broken into individual characters, so let's do it in two steps
nicks = set()
nicks.add('nick:'+lnick)
- #print("Nicks (Line 47): {}".format(nicks)) #debug
-
if hasattr(phenny, 'nicktracker'):
nicks.add('account:'+phenny.nicktracker.canonize(nick).lower())
alts, maybes = phenny.nicktracker.getalts(nick)
- #print("Alts: {} Maybes: {}".format(alts,maybes) ) #debug
# |= is a nicks.update() operation
nicks |= set('nick:'+n.lower() for n in alts+maybes)
seennicks = {}
- #print("Beginning nick check") #debug
- #print("Nicks (Line 58): {}".format(nicks) ) #debug
+
for nick in nicks:
try:
- #print("Checking: {}".format(nick)) #debug
data = storage[nick]
if len(data) == 2:
data = storage[nick] = [nick, data[0], data[1]]
seennicks[data[0].lower()] = data
except KeyError:
- #print("Keyerror on: {}".format(nick)) #debug
pass
- #print("Ending nick check") #debug
seennicks = sorted(seennicks.values(), key=lambda i: -i[2])
- #print("Seen Nicks: {}".format(seennicks)) #debug
-
if seennicks:
showtime = True
for nick, channel, storedTime in seennicks[:SEEN_LIMIT]:

0 comments on commit 0a9bbd9

Please sign in to comment.