Closed dgw closed 8 months ago
Unless we have an established pattern, I prefer possibly-destructive things be explicit: an argument of empty quotes, a hyphen, -clear
, or similar to clear it, .tmask
without arguments shows usage including how to clear.
The thought of adding a .clearmask
or .tmclear
command did cross my mind, yes. I had forgotten about .showmask
, didn't expect .tmask
to accept an empty arg either, and was surprised.
Process note: We're likely to slot #2601 into 8.0.0 because it's a user-facing change and not a pure bugfix, so I've changed the issue's target milestone.
Description
Running
.tmask
without any argument technically sets an empty topic mask, but in a broken way.Reproduction steps
adminchannel
plugin if not enabled.tmask
(no argument).showmask
Unexpected TypeError (can only concatenate str (not "NoneType") to str) from dgw. Message was: .showmask
Expected behavior
adminchannel
should properly clear the topic mask in this case, such that doing.showmask
yields the same output as if.tmask
had never been set at all.Additionally,
.showmask
should handleNone
as if the topic mask is unset. Defense in depth!Relevant logs
No response
Notes
I've a half-assed patch for this in
adminchannel-tmask-none
branch, but it's untested and probably needs some more work before becoming a pull request.Sopel version
973a489355540d68b95db01a49e983ac7a740bcc
Installation method
pip install
Python version
3.10.7
Operating system
No response
IRCd
No response
Relevant plugins
adminchannel