I might be way off, but I'd go for:

on @!*:mode:#:{ mode $chan $replacex($1, +, -, -, +) $2- }