Merge pull request #4274 from hellomouse/add-umode

Add /umode support
This commit is contained in:
Max Leiter 2021-07-03 11:48:38 -07:00 committed by GitHub
commit 5e0a12b124
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,