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 Chan = require("../../models/chan");
const Msg = require("../../models/msg"); 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) { 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) { if (chan.type !== Chan.Type.CHANNEL) {
chan.pushMessage( chan.pushMessage(
this, this,