parent
a99ea14dc0
commit
bed6053cec
@ -785,6 +785,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="help-item">
|
||||||
|
<div class="subject">
|
||||||
|
<code>/rejoin</code>
|
||||||
|
</div>
|
||||||
|
<div class="description">
|
||||||
|
<p>
|
||||||
|
Leave and immediately rejoin the current channel. Useful to
|
||||||
|
quickly get op from ChanServ in an empty channel, for example.
|
||||||
|
</p>
|
||||||
|
<p>Alias: <code>/cycle</code></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="help-item">
|
<div class="help-item">
|
||||||
<div class="subject">
|
<div class="subject">
|
||||||
<code>/query nick</code>
|
<code>/query nick</code>
|
||||||
|
@ -28,6 +28,7 @@ const commands = [
|
|||||||
"/collapse",
|
"/collapse",
|
||||||
"/connect",
|
"/connect",
|
||||||
"/ctcp",
|
"/ctcp",
|
||||||
|
"/cycle",
|
||||||
"/deop",
|
"/deop",
|
||||||
"/devoice",
|
"/devoice",
|
||||||
"/disconnect",
|
"/disconnect",
|
||||||
@ -46,6 +47,7 @@ const commands = [
|
|||||||
"/query",
|
"/query",
|
||||||
"/quit",
|
"/quit",
|
||||||
"/raw",
|
"/raw",
|
||||||
|
"/rejoin",
|
||||||
"/say",
|
"/say",
|
||||||
"/send",
|
"/send",
|
||||||
"/server",
|
"/server",
|
||||||
|
@ -41,6 +41,7 @@ var inputs = [
|
|||||||
"ctcp",
|
"ctcp",
|
||||||
"msg",
|
"msg",
|
||||||
"part",
|
"part",
|
||||||
|
"rejoin",
|
||||||
"action",
|
"action",
|
||||||
"away",
|
"away",
|
||||||
"connect",
|
"connect",
|
||||||
|
21
src/plugins/inputs/rejoin.js
Normal file
21
src/plugins/inputs/rejoin.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
var Msg = require("../../models/msg");
|
||||||
|
var Chan = require("../../models/chan");
|
||||||
|
|
||||||
|
exports.commands = ["cycle", "rejoin"];
|
||||||
|
|
||||||
|
exports.input = function(network, chan) {
|
||||||
|
if (chan.type !== Chan.Type.CHANNEL) {
|
||||||
|
chan.pushMessage(this, new Msg({
|
||||||
|
type: Msg.Type.ERROR,
|
||||||
|
text: "You can only rejoin channels."
|
||||||
|
}));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
network.irc.part(chan.name, "Rejoining");
|
||||||
|
network.irc.join(chan.name);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user