code: def cmd(send, msg, args):
      if not args['config']['feature'].getboolean('hooks'):
          send("Hooks are disabled, and this command depends on hooks. Please contact the bot admin(s).")
          return
      if args['type'] == 'privmsg':
          send("Note-passing should be done in public.")
          return
      try:
          nick, note = msg.split(maxsplit=1)
          nicks = set(x for x in nick.split(',') if x)
      except ValueError:
          send("Not enough arguments.")
          return
      nickregex = args['config']['core']['nickregex'] + '+$'
      successful_nicks = []
      failed_nicks = []
      for nick in nicks:
          if re.match(nickregex, nick):
              row = Notes(note=note, submitter=args['nick'], nick=nick, time=datetime.now())
              args['db'].add(row)
              successful_nicks.append(nick)
          else:
              failed_nicks.append(nick)
      if successful_nicks:
          send("Note left for %s." % ", ".join(successful_nicks))
      if failed_nicks:
          send("Invalid nick(s): %s." % ", ".join(failed_nicks))