Invite
This commit is contained in:
parent
43386da0c7
commit
fea6228c14
13
src/inc/clients/irc/invite.js
Normal file
13
src/inc/clients/irc/invite.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
module.exports = client => {
|
||||||
|
client._cmd.set("INVITE", function (msg) { // invite
|
||||||
|
const user = this.parsePrefix(msg.prefix);
|
||||||
|
const channel = msg.params[1];
|
||||||
|
|
||||||
|
if(!this.server.channel.includes(channel)) {
|
||||||
|
this.join(channel);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.send(`PRIVMSG ${channel} :Hi. Wurde von ${user.nick} eingeladen.`);
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
}.bind(client));
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user