mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -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)
|
||||
|
||||
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")
|
||||
if channel.lower() in bot.memory['SpiceBot_Channels']['channels']:
|
||||
del bot.memory['SpiceBot_Channels']['channels'][channel.lower()]
|
||||
|
||||
@ -273,21 +273,23 @@ def channel_privs(bot, channel, privtype):
|
||||
def join_all_channels(bot):
|
||||
if bot.config.SpiceBot_Channels.joinall:
|
||||
for channel in bot.memory['SpiceBot_Channels']['channels'].keys():
|
||||
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']))
|
||||
if channel not in bot.channels.keys() and bot.config.SpiceBot_Channels.operadmin:
|
||||
bot.write(('SAJOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name']))
|
||||
if channel.startswith("#"):
|
||||
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']))
|
||||
if channel not in bot.channels.keys() and bot.config.SpiceBot_Channels.operadmin:
|
||||
bot.write(('SAJOIN', bot.nick, bot.memory['SpiceBot_Channels']['channels'][channel]['name']))
|
||||
|
||||
|
||||
def chanadmin_all_channels(bot):
|
||||
# Chan ADMIN +a
|
||||
for channel in bot.channels.keys():
|
||||
if channel not in bot.config.SpiceBot_Channels.chanignore:
|
||||
if bot.config.SpiceBot_Channels.operadmin:
|
||||
if not bot.channels[channel].privileges[bot.nick] < sopel.module.ADMIN:
|
||||
bot.write(('SAMODE', channel, "+a", bot.nick))
|
||||
else:
|
||||
bot.part(channel)
|
||||
if channel.startswith("#"):
|
||||
if channel not in bot.config.SpiceBot_Channels.chanignore:
|
||||
if bot.config.SpiceBot_Channels.operadmin:
|
||||
if not bot.channels[channel].privileges[bot.nick] < sopel.module.ADMIN:
|
||||
bot.write(('SAMODE', channel, "+a", bot.nick))
|
||||
else:
|
||||
bot.part(channel)
|
||||
|
||||
|
||||
def channel_list_current(bot):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user