This is a small step beyond just validating nicks against the character set allowed. sopel-rep's karma commands use ++ and -- appended to a nickname. + is not valid in nicks. The issue is deciding whether to bomb nick-- or nick, probably by checking if nick-- is present and falling back to nick if not. (Which means .bomb nick--- would also work to downrep and bomb nick- at once.)
I've proved the idea of simply importing the sopel-rep module's verification function in tests using sopel-duel, so that's probably the way to go. (I might want to rewrite the rep module using proper encapsulation before doing this, though.)
This is a small step beyond just validating nicks against the character set allowed.
sopel-rep
's karma commands use++
and--
appended to a nickname.+
is not valid in nicks. The issue is deciding whether to bombnick--
ornick
, probably by checking ifnick--
is present and falling back tonick
if not. (Which means.bomb nick---
would also work to downrep and bombnick-
at once.)I've proved the idea of simply importing the
sopel-rep
module's verification function in tests usingsopel-duel
, so that's probably the way to go. (I might want to rewrite the rep module using proper encapsulation before doing this, though.)