mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
channels
This commit is contained in:
parent
cc0bc2676b
commit
79e9b39961
@ -133,7 +133,7 @@ def bot_part_empty(bot):
|
|||||||
ignorepartlist.append(bot.config.core.logging_channel)
|
ignorepartlist.append(bot.config.core.logging_channel)
|
||||||
|
|
||||||
for channel in bot.channels.keys():
|
for channel in bot.channels.keys():
|
||||||
if len(bot.channels[channel].privileges.keys()) == 1 and channel not in ignorepartlist:
|
if len(bot.channels[channel].privileges.keys()) == 1 and channel not in ignorepartlist and channel.startswith("#"):
|
||||||
bot.part(channel, "Leaving Empty Channel")
|
bot.part(channel, "Leaving Empty Channel")
|
||||||
if channel.lower() in bot.memory['SpiceBot_Channels']['channels']:
|
if channel.lower() in bot.memory['SpiceBot_Channels']['channels']:
|
||||||
del bot.memory['SpiceBot_Channels']['channels'][channel.lower()]
|
del bot.memory['SpiceBot_Channels']['channels'][channel.lower()]
|
||||||
|
|||||||
@ -273,6 +273,7 @@ def channel_privs(bot, channel, privtype):
|
|||||||
def join_all_channels(bot):
|
def join_all_channels(bot):
|
||||||
if bot.config.SpiceBot_Channels.joinall:
|
if bot.config.SpiceBot_Channels.joinall:
|
||||||
for channel in bot.memory['SpiceBot_Channels']['channels'].keys():
|
for channel in bot.memory['SpiceBot_Channels']['channels'].keys():
|
||||||
|
if channel.startswith("#"):
|
||||||
if channel not in bot.channels.keys() and channel not in bot.config.SpiceBot_Channels.chanignore:
|
if channel not in bot.channels.keys() and channel not in bot.config.SpiceBot_Channels.chanignore:
|
||||||
bot.write(('JOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name']))
|
bot.write(('JOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name']))
|
||||||
if channel not in bot.channels.keys() and bot.config.SpiceBot_Channels.operadmin:
|
if channel not in bot.channels.keys() and bot.config.SpiceBot_Channels.operadmin:
|
||||||
@ -282,6 +283,7 @@ def join_all_channels(bot):
|
|||||||
def chanadmin_all_channels(bot):
|
def chanadmin_all_channels(bot):
|
||||||
# Chan ADMIN +a
|
# Chan ADMIN +a
|
||||||
for channel in bot.channels.keys():
|
for channel in bot.channels.keys():
|
||||||
|
if channel.startswith("#"):
|
||||||
if channel not in bot.config.SpiceBot_Channels.chanignore:
|
if channel not in bot.config.SpiceBot_Channels.chanignore:
|
||||||
if bot.config.SpiceBot_Channels.operadmin:
|
if bot.config.SpiceBot_Channels.operadmin:
|
||||||
if not bot.channels[channel].privileges[bot.nick] < sopel.module.ADMIN:
|
if not bot.channels[channel].privileges[bot.nick] < sopel.module.ADMIN:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user