forked from keinBot/cuffeo
irgendwas mit overhaul
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
export default client => {
|
||||
client._cmd.set("CAP", function (msg) { // capkram
|
||||
export default bot => {
|
||||
bot._cmd.set("CAP", msg => { // capkram
|
||||
switch (msg.params[1]) {
|
||||
case "LS": // list
|
||||
this.send(`CAP REQ :${msg.params[2]}`);
|
||||
bot.send(`CAP REQ :${msg.params[2]}`);
|
||||
break;
|
||||
case "ACK": // success
|
||||
this.send("AUTHENTICATE PLAIN");
|
||||
bot.send("AUTHENTICATE PLAIN");
|
||||
break;
|
||||
}
|
||||
}.bind(client));
|
||||
});
|
||||
|
||||
client._cmd.set("AUTHENTICATE", function (msg) { // auth
|
||||
bot._cmd.set("AUTHENTICATE", msg => { // auth
|
||||
if (msg.params[0].match(/\+/))
|
||||
this.send(`AUTHENTICATE ${new Buffer(this.username + "\u0000" + this.username + "\u0000" + this.options.password).toString("base64")}`);
|
||||
}.bind(client));
|
||||
bot.send(`AUTHENTICATE ${new Buffer(bot.username + "\u0000" + bot.username + "\u0000" + bot.options.password).toString("base64")}`);
|
||||
});
|
||||
|
||||
client._cmd.set("900", function (msg) { // cap end
|
||||
this.send("CAP END");
|
||||
}.bind(client));
|
||||
bot._cmd.set("900", msg => { // cap end
|
||||
bot.send("CAP END");
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user