This commit is contained in:
Reto 2026-02-09 08:09:50 +01:00 committed by GitHub
commit 622acf8b5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,14 @@ const input: PluginInputHandler = function ({irc}, chan, cmd, args) {
return;
}
const cleanArgs = args.map((s) => s.trim()).filter((s) => s !== "");
if (cleanArgs.length === 0) {
irc.raw("TOPIC", chan.name);
return;
}
// we use the non trimmed args here, the user may have added white space on purpose
irc.setTopic(chan.name, args.join(" "));
return true;
};