From 2ed19d22dc4d83a1a88beb223bc180169d7a6328 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 10 Apr 2018 17:31:22 +0200 Subject: [PATCH] add method to setup a non-private channel, to be used later when we handle switching channels between private and public --- src/ircbot/irc3module.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ircbot/irc3module.py b/src/ircbot/irc3module.py index e8c461a3..d8b421a0 100644 --- a/src/ircbot/irc3module.py +++ b/src/ircbot/irc3module.py @@ -218,6 +218,17 @@ class Plugin(object): membership.save() + @irc3.extend + def setup_public_channel(self, team): + """ + Configures a public team IRC channel (by unsetting SECURE and RESTRICTED modes used by private channels and setting mlock back to the default +nt-lk) + """ + # basic private channel modes + self.bot.privmsg(settings.IRCBOT_CHANSERV_MASK, "SET %s mlock +nt-lk" % team.irc_channel_name) + self.bot.privmsg(settings.IRCBOT_CHANSERV_MASK, "SET %s SECURE off" % team.irc_channel_name) + self.bot.privmsg(settings.IRCBOT_CHANSERV_MASK, "SET %s RESTRICTED off" % team.irc_channel_name) + + @irc3.extend def add_user_to_team_channel_acl(self, username, channel): """