

@internationalizeDocstring
def ghost(self, irc, msg, args, nick):
    "[<nick>]\n\n        Ghosts the bot's given nick and takes it.  If no nick is given,\n        ghosts the bot's configured nick and takes it.\n        "
    if self.registryValue('NickServ'):
        if (not nick):
            nick = self._getNick(irc.network)
        if ircutils.strEqual(nick, irc.nick):
            irc.error(_('I cowardly refuse to ghost myself.'))
        else:
            self._doGhost(irc, nick=nick)
            irc.replySuccess()
    else:
        irc.error(_("You must set supybot.plugins.Services.NickServ before I'm able to ghost a nick."))

dataset/ETHPy150Open ProgVal/Limnoria/plugins/Services/plugin.py Services.ghost/original