From 3d010da833b16dcd6a8e2e64368fcc025117e568 Mon Sep 17 00:00:00 2001 From: Darren Date: Thu, 2 Oct 2014 17:37:31 +0100 Subject: [PATCH] IrcConnection specific quit_message --- server/irc/connection.js | 1 + server/irc/state.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/irc/connection.js b/server/irc/connection.js index 9584ffa..05340bc 100644 --- a/server/irc/connection.js +++ b/server/irc/connection.js @@ -67,6 +67,7 @@ var IrcConnection = function (hostname, port, ssl, nick, user, options, state, c this.username = this.nick.replace(/[^0-9a-zA-Z\-_.\/]/, ''); this.gecos = ''; // Users real-name. Uses default from config if empty this.password = options.password || ''; + this.quit_message = ''; // Uses default from config if empty // Set the passed encoding. or the default if none giving or it fails if (!options.encoding || !this.setEncoding(options.encoding)) { diff --git a/server/irc/state.js b/server/irc/state.js index 32e7cfc..047d0a9 100755 --- a/server/irc/state.js +++ b/server/irc/state.js @@ -18,7 +18,7 @@ var State = function (client, save_state) { if (!that.save_state) { _.each(that.irc_connections, function (irc_connection, i, cons) { if (irc_connection) { - irc_connection.end('QUIT :' + (global.config.quit_message || '')); + irc_connection.end('QUIT :' + (irc_connection.quit_message || global.config.quit_message || '')); global.servers.removeConnection(irc_connection); cons[i] = null; } -- 2.25.1