Add /kickban
This commit adds a new command, /kickban, that is a combination of /kick and /ban: it kicks the specific user from the channel and then sets the +b mode to ban the user from the channel.
This commit is contained in:
parent
cda3bb4e7c
commit
324fb9023e
@ -583,13 +583,25 @@
|
||||
|
||||
<div class="help-item">
|
||||
<div class="subject">
|
||||
<code>/kick nick</code>
|
||||
<code>/kick nick [reason]</code>
|
||||
</div>
|
||||
<div class="description">
|
||||
<p>Kick a user from the current channel.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="help-item">
|
||||
<div class="subject">
|
||||
<code>/kickban nick [reason]</code>
|
||||
</div>
|
||||
<div class="description">
|
||||
<p>
|
||||
Kick and ban (<code>+b</code>) a user from the current channel. Unlike
|
||||
<code>/ban</code>, only nicknames (and not host masks) can be used.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="help-item">
|
||||
<div class="subject">
|
||||
<code>/list</code>
|
||||
|
@ -3,7 +3,7 @@
|
||||
const Chan = require("../../models/chan");
|
||||
const Msg = require("../../models/msg");
|
||||
|
||||
exports.commands = ["ban", "unban", "banlist"];
|
||||
exports.commands = ["ban", "unban", "banlist", "kickban"];
|
||||
|
||||
exports.input = function ({irc}, chan, cmd, args) {
|
||||
if (chan.type !== Chan.Type.CHANNEL) {
|
||||
@ -33,6 +33,9 @@ exports.input = function ({irc}, chan, cmd, args) {
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
case "kickban":
|
||||
irc.raw("KICK", chan.name, args[0], args.slice(1).join(" "));
|
||||
// fall through
|
||||
case "ban":
|
||||
irc.ban(chan.name, args[0]);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user