from configparser import RawConfigParser def shush(bot, nick, msg): bot.say("Okay "+nick+" I'll be quiet for now") bot.shush = not bot.shush bot.say("I can talk again!") shush.commands=["^!toggleShush$"] shush.privilege="owners" def shushStatus(bot, nick, msg): if bot.shush: bot.shush = False bot.say("shush mode is ON") bot.shush = True else: bot.say("shush mode is OFF") shushStatus.commands=["^!shushStatus$"] shushStatus.privilege="owners" def setStreamer(bot, nick, msg): args=msg.split(None, 1) try: parser = RawConfigParser() parser.read(bot.config_file) info = parser.get('streamers', args[1].rstrip().lstrip().capitalize()) bot.say(args[1]+" is now the current streamer") bot.streamer=(args[1], info) except Exception as e: bot.say("unrecognized streamer") setStreamer.commands=["^!setStreamer [A-Za-z0-9]+[\\s]*$"] setStreamer.privilege="owners" def terminate(bot, nick, msg): bot.terminate() terminate.commands=["^!quit$"] terminate.privilege="owners"