Quote should be saved with saver and timestamp (quotes.py)

This commit is contained in:
jesopo 2019-01-26 16:03:40 +00:00
parent eb5c685128
commit f217c5d192

View file

@ -99,10 +99,12 @@ class Module(ModuleManager.BaseModule):
line = event["target"].buffer.find_from(event["args_split"][0]) line = event["target"].buffer.find_from(event["args_split"][0])
if line: if line:
quotes = self._get_quotes(event["server"], line.sender) quotes = self._get_quotes(event["server"], line.sender)
text = None
if line.action: if line.action:
quotes.append("* %s %s" % (line.sender, line.message)) text = "* %s %s" % (line.sender, line.message)
else: else:
quotes.append("<%s> %s" % (line.sender, line.message)) text = "<%s> %s" % (line.sender, line.message)
quotes.append([event["user"].name, int(time.time()), text])
self._set_quotes(event["server"], line.sender, quotes) self._set_quotes(event["server"], line.sender, quotes)
event["stdout"].write("Quote added") event["stdout"].write("Quote added")
else: else: