#2 show_string_on_remove
Opened 6 years ago by kevin. Modified 4 years ago
kevin/supybot-meetbot show_string_on_remove  into  master

file modified
+2
@@ -170,6 +170,8 @@ 

          repl = self.get_replacements(escapewith=writers.text)

          repl['link'] = self.logURL(M)

          return self.text_template%repl

+     def __str__(self):

+         return "%s by %s at %s : %s" % (self.itemtype, self.nick, self.time, self.line) 

  

  

  class Info(GenericItem):

file modified
+5 -3
@@ -34,6 +34,8 @@ 

  import re

  import stat

  

+ from kitchen.text.converters import to_bytes

+ 

  import writers

  import items

  reload(writers)
@@ -148,8 +150,8 @@ 

              meetingname = self.M._meetingname.replace('/', '')

          else:

              meetingname = channel

-         path = pattern%locals()

-         path = time.strftime(path, self.M.starttime)

+         path = pattern % locals()

+         path = time.strftime(to_bytes(path), self.M.starttime)

          # If we want the URL name, append URL prefix and return

          if url:

              return os.path.join(self.logUrlPrefix, path)
@@ -408,7 +410,7 @@ 

          commands = [ "#"+x[3:] for x in dir(self) if x[:3]=="do_" ]

          commands.sort()

          self.reply("Available commands: "+(" ".join(commands)))

-             

+ 

  

  

  class Meeting(MeetingCommands, object):

With this patch if you #undo you can see what you undid. Without it, #undo silently just does something and you know not what.

This seats on the top of #1, but I'm +1 to the second commit (for the first one, see my comment in #1)

Metadata