You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running .tmask without any argument technically sets an empty topic mask, but in a broken way.
Reproduction steps
Enable adminchannel plugin if not enabled
As chanop, do just .tmask (no argument)
Do .showmask
Sopel responds with an exception: 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 handle None 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.
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
973a489
Installation method
pip install
Python version
3.10.7
Operating system
No response
IRCd
No response
Relevant plugins
adminchannel
The text was updated successfully, but these errors were encountered: