Add /umode support

This commit is contained in:
JeDaYoshi 2021-07-03 02:28:21 +00:00
parent 22801a629e
commit 426841e6b7
No known key found for this signature in database
GPG Key ID: 8060B288C274219D

View File

@ -3,10 +3,14 @@
const Chan = require("../../models/chan");
const Msg = require("../../models/msg");
exports.commands = ["mode", "op", "deop", "hop", "dehop", "voice", "devoice"];
exports.commands = ["mode", "umode", "op", "deop", "hop", "dehop", "voice", "devoice"];
exports.input = function ({irc, nick}, chan, cmd, args) {
if (cmd !== "mode") {
if (cmd === "umode") {
irc.raw("MODE", nick, ...args);
return;
} else if (cmd !== "mode") {
if (chan.type !== Chan.Type.CHANNEL) {
chan.pushMessage(
this,