Added /op, /deop, /voice and /devoice
This commit is contained in:
parent
8bedfba27f
commit
6fa95e08dd
|
@ -185,6 +185,41 @@ function handleInput(input) {
|
|||
}
|
||||
break;
|
||||
|
||||
case "OP":
|
||||
case "DEOP":
|
||||
case "VOICE":
|
||||
case "DEVOICE":
|
||||
case "MODE":
|
||||
var irc = network.irc;
|
||||
if (!argv[1] && typeof irc === "undefined") {
|
||||
break;
|
||||
}
|
||||
|
||||
var mode;
|
||||
var user;
|
||||
if (cmd != "MODE") {
|
||||
user = argv[1];
|
||||
mode = {
|
||||
"OP": "+o",
|
||||
"DEOP": "-o",
|
||||
"VOICE": "+v",
|
||||
"DEVOICE": "-v"
|
||||
}[cmd];
|
||||
} else if (!argv[2]) {
|
||||
break;
|
||||
} else {
|
||||
mode = argv[1];
|
||||
user = argv[2];
|
||||
}
|
||||
|
||||
irc.send(
|
||||
"MODE",
|
||||
target.channel.get("name"),
|
||||
mode,
|
||||
user
|
||||
);
|
||||
break;
|
||||
|
||||
// This command is used for debugging purposes.
|
||||
// Send raw commands.
|
||||
case "SEND":
|
||||
|
@ -271,11 +306,6 @@ function handleEvent(argv) {
|
|||
name: argv.nick
|
||||
})
|
||||
);
|
||||
} else {
|
||||
var irc = network.irc;
|
||||
if (typeof irc !== "undefined") {
|
||||
irc.send("TOPIC", argv.args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
messages.add(
|
||||
|
|
Loading…
Reference in New Issue