diff --git a/scripts/weechatrn.py b/scripts/weechatrn.py index b7fc261..f0106a5 100644 --- a/scripts/weechatrn.py +++ b/scripts/weechatrn.py @@ -41,9 +41,10 @@ def weechatrn_cb(data: str, buffer: str, args: str) -> int: Command to allow managing push tokens without the need to allow /set access to relay clients. """ + token = args.strip() tokens = script_options.push_tokens - if args not in tokens: - tokens.append(args) + if token and token not in tokens: + tokens.append(token) script_options.push_tokens = tokens return weechat.WEECHAT_RC_OK