def cmd_list(self, argument):
        """List commands"""
        arg = argument.lower()
        index = self.bot.help_index
        public = "public commands  -- %s" % " ".join(index['public'])
        private = "private commands -- %s" % " ".join(index['private'])
        if 'all' in arg or 'both' in arg:
            output = "\n".join((public, private))
        elif 'pub' in arg or self.target.startswith('#'):
            output = public
        elif 'priv' in arg or not self.target.startswith('#'):
            output = private
        else:
            # we shouldn't be here
            self.logger.error("cmd_list")
            return
        self.send(self.target, output)