code: def recompile(self, nick=None, new_nick=None, **kw):
          
          if self.bot.nick == nick.nick:
              self.bot.config['nick'] = new_nick
              self.bot.recompile()
docs: recompile regexp on new nick