#3 force meeting name
Opened 6 years ago by kevin. Modified 3 years ago
kevin/supybot-meetbot unicode-meeting-name  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
+6 -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)
@@ -261,6 +263,7 @@ 

              self.reply(messageline)

          if line.strip():

              self.do_meetingtopic(nick=nick, line=line, time_=time_, **kwargs)

+ 	    self.do_meetingname(nick=nick, line=line, time_=time_, **kwargs)

      def do_endmeeting(self, nick, time_, **kwargs):

          """End the meeting."""

          if not self.isChair(nick): return
@@ -408,7 +411,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):

file modified
+6
@@ -93,6 +93,12 @@ 

              if M is not None:

                  irc.error("Can't start another meeting, one is in progress.")

                  return

+         # This requires a meeting name/ topic to start the meeting.

+             name = payload[13:].strip()

+             if not name:

+                 irc.error("A meeting topic is required, e.g., '#startmeeting Infrastructure'")

+                 return

+             # This call

              # This callback is used to send data to the channel:

              def _setTopic(x):

                  irc.sendMsg(ircmsgs.topic(channel, x))

This forces a meetingname for every meeting. This helps make sure things are organized instead of random for looking for meeting output in the same place.

This seats on the top of #2 and #1, I'm +1 to the third commit here (and +1 on the second, cf #2 but I have reserves about the first one, cf #1)