this.populateDefaultServerSettings = function (new_connection_dialog) {\r
var parts;\r
var defaults = {\r
- nick: getQueryVariable('nick') || '',\r
+ nick: '',\r
server: '',\r
port: 6667,\r
ssl: false,\r
- channel: window.location.hash || '#chat',\r
+ channel: '#chat',\r
channel_key: ''\r
};\r
var uricheck;\r
\r
/**\r
* Get any settings set by the server\r
- * These settings may be changed in the server selection dialog\r
+ * These settings may be changed in the server selection dialog or via URL parameters\r
*/\r
if (this.server_settings.client) {\r
if (this.server_settings.client.nick)\r
* These settings may be changed in the server selection dialog\r
*/\r
\r
+ // Any query parameters first\r
+ if (getQueryVariable('nick'))\r
+ defaults.nick = getQueryVariable('nick');\r
+\r
+ if (window.location.hash)\r
+ defaults.channel = window.location.hash;\r
+\r
+\r
// Process the URL part by part, extracting as we go\r
parts = window.location.pathname.toString().replace(this.get('base_path'), '').split('/');\r
\r