mirror of
https://github.com/thelounge/thelounge.git
synced 2026-03-14 14:35:50 +01:00
Merge 3d8e96491b into b2e3112806
This commit is contained in:
commit
622acf8b5e
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue