add method to setup a non-private channel, to be used later when we handle switching channels between private and public

This commit is contained in:
Thomas Steen Rasmussen 2018-04-10 17:31:22 +02:00
parent 9f4df30b50
commit 2ed19d22dc

View file

@ -218,6 +218,17 @@ class Plugin(object):
membership.save() 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 @irc3.extend
def add_user_to_team_channel_acl(self, username, channel): def add_user_to_team_channel_acl(self, username, channel):
""" """