Initial commit

This commit is contained in:
Flummi
2018-09-02 12:07:40 +02:00
commit 47ccf527ee
30 changed files with 1768 additions and 0 deletions

14
src/clients/irc/motd.mjs Normal file
View File

@@ -0,0 +1,14 @@
export default client => {
client._cmd.set("372", function (msg) { // motd_entry
this.server.motd += `${msg.params[1]}\n`;
}.bind(client));
client._cmd.set("375", function (msg) { // motd_start
this.server.motd = `${msg.params[1]}\n`;
}.bind(client));
client._cmd.set("376", function (msg) { // motd_end
this.server.motd += `${msg.params[1]}\n`;
this.emit("data", ["motd", this.server.motd]);
}.bind(client));
};