mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-28 10:10:20 +02:00
d6d7df62fe
Closes #1102
20 lines
341 B
JavaScript
20 lines
341 B
JavaScript
"use strict";
|
|
|
|
exports.commands = ["away", "back"];
|
|
|
|
exports.input = function(network, chan, cmd, args) {
|
|
let reason = "";
|
|
|
|
if (cmd === "away") {
|
|
reason = args.length > 0 ? args.join(" ") : " ";
|
|
|
|
network.irc.raw("AWAY", reason);
|
|
} else { // back command
|
|
network.irc.raw("AWAY");
|
|
}
|
|
|
|
network.awayMessage = reason;
|
|
|
|
this.save();
|
|
};
|