@admin()
def unset(m):
    """Unset a given setting."""

    #-     !unset setting [#channel]
    #-
    #- ```irc
    #- < GorillaWarfare> !unset link
    #- < GorillaBot> "link" unset for ##GorillaBot.
    #- ```
    #-
    #- Removes the setting for a channel. This will revert to the default value. Settings can only
    #- be edited for channels the bot is joined to, or has been joined to in the past.

    if len(m.line) != 2 and not (len(m.line) == 3 and m.line[2][0] == "#"):
        m.bot.private_message(m.location,
                              'Poorly-formatted command. Use "!unset setting [#channel]".')
        return
    chan = m.location if len(m.line) == 2 else m.line[2]
    if chan not in m.bot.configuration["chans"]:
        m.bot.private_message(m.location,
                              "Cannot unset setting for {0}. Do I know about the channel?".format(
                                  chan))
        return
    try:
        del m.bot.configuration["chans"][chan]["settings"][m.line[1]]
        m.bot.update_configuration(m.bot.configuration)
    except KeyError:
        # Doesn't matter if the value wasn't set to begin with
        pass
    m.bot.private_message(m.location, '"{0}" unset for {1}.'.format(m.line[1], chan))
dataset/ETHPy150Open molly/GorillaBot/gorillabot/plugins/settings.py/unset/original