def get_note(self, cardinal, user, channel, msg):
        if not self.conn:
            cardinal.sendMsg(channel, "Unable to access notes database.")
            return

        message = msg.split(' ', 1)
        # Check if they are using ! syntax.
        if message[0][0] == '!':
            title = ' '.join(message)[1:]
        else:
            if len(message) != 2:
                cardinal.sendMsg(channel, "Syntax: .note <title>")
                return

            # Grab title for .note syntax.
            title = message[1]

        content = self._get_note_from_db(title)
        if not content:
            cardinal.sendMsg(channel, "No note found under '%s'." % title)
            return

        cardinal.sendMsg(channel, "%s: %s" % (title, content))
dataset/ETHPy150Open JohnMaguire/Cardinal/plugins/notes/plugin.py/NotesPlugin.get_note/original