From 311134130441cafe8b69c94868dc317f2bdd45ff Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Dec 01 2017 01:47:19 +0000 Subject: [PATCH 1/3] handle meeting names with unicode in the name --- diff --git a/meeting.py b/meeting.py index 68e964b..f06c8fb 100644 --- a/meeting.py +++ b/meeting.py @@ -34,6 +34,8 @@ import os import re import stat +from kitchen.text.converters import to_bytes + import writers import items reload(writers) @@ -148,8 +150,8 @@ class Config(object): 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 @@ class MeetingCommands(object): commands = [ "#"+x[3:] for x in dir(self) if x[:3]=="do_" ] commands.sort() self.reply("Available commands: "+(" ".join(commands))) - + class Meeting(MeetingCommands, object): From 852193b9ffc295590f45a2d4031a6d3098204140 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Dec 01 2017 18:27:37 +0000 Subject: [PATCH 2/3] show what undo undid --- diff --git a/items.py b/items.py index 7bc1869..4d06d64 100644 --- a/items.py +++ b/items.py @@ -170,6 +170,8 @@ class GenericItem(_BaseItem): 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): From 53628d4fdbe2be79bf2a159f20f83b7cd3ca2ec6 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Dec 01 2017 18:31:41 +0000 Subject: [PATCH 3/3] force a meeting name for every meeting --- diff --git a/meeting.py b/meeting.py index f06c8fb..4d55062 100644 --- a/meeting.py +++ b/meeting.py @@ -263,6 +263,7 @@ class MeetingCommands(object): 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 diff --git a/plugin.py b/plugin.py index c1b3518..add1d43 100644 --- a/plugin.py +++ b/plugin.py @@ -93,6 +93,12 @@ class MeetBot(callbacks.Plugin): 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))