lib/functions: sanitized ack() and added domod()