hardlounge/src/plugins/inputs/away.js

21 lines
327 B
JavaScript
Raw Normal View History

2016-11-19 03:24:39 -05:00
"use strict";
exports.commands = ["away", "back"];
exports.input = function (network, chan, cmd, args) {
let reason = "";
2016-11-19 03:24:39 -05:00
if (cmd === "away") {
2018-06-07 12:23:51 -04:00
reason = args.join(" ") || " ";
2016-11-19 03:24:39 -05:00
network.irc.raw("AWAY", reason);
2019-07-17 05:33:59 -04:00
} else {
// back command
network.irc.raw("AWAY");
2016-11-19 03:24:39 -05:00
}
network.awayMessage = reason;
this.save();
2016-11-19 03:24:39 -05:00
};