change seen string splitter from , to |:|

This commit is contained in:
Brian S. Stephan 2010-07-25 10:08:30 -05:00
parent 55b197432d
commit acaf5e297e

View File

@ -81,7 +81,7 @@ def sub_add_to_seen(connection, event, nick, userhost, what):
if not config.has_section('seen'):
config.add_section('seen')
config.set('seen', nick, userhost + ',' + datetime.utcnow().isoformat() + ',' + what)
config.set('seen', nick, userhost + '|:|' + datetime.utcnow().isoformat() + '|:|' + what)
#####
# sub_report_seen
@ -92,7 +92,7 @@ def sub_report_seen(connection, event, nick, userhost, replypath, what, admin_un
if what.split(' ')[0] == 'seen':
query = what.split(' ')[1]
try:
seendata = config.get('seen', query).split(',')
seendata = config.get('seen', query).split('|:|')
converted = datetime.strptime(seendata[1], "%Y-%m-%dT%H:%M:%S.%f")
connection.privmsg(replypath, 'last saw ' + query + ' at ' + converted.strftime("%Y/%m/%d %H:%M:%S") + ' saying \'' + seendata[2] + '\'')
except NoOptionError: pass