From: Darren Date: Thu, 2 Oct 2014 16:37:31 +0000 (+0100) Subject: IrcConnection specific quit_message X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3d010da833b16dcd6a8e2e64368fcc025117e568;p=KiwiIRC.git IrcConnection specific quit_message --- 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; }