\r
### Installation\r
\r
+*Note: This requires Node.js to run. Make sure you have installed Node.js first! http://nodejs.org/download/*\r
+\r
1. Download the Kiwi source or clone the git repository:\r
\r
`$ git clone git@github.com:prawnsalad/KiwiIRC.git && cd KiwiIRC`\r
* Control box
*/
#kiwi #controlbox .input {
- height:1.7em;
+ height:1.7em; position:relative;
}
/* The nick label */
#kiwi #controlbox .nickchange input { }
#kiwi #controlbox .nickchange button { }
+/* Plugin tools */
+#kiwi #controlbox .input_tools { float:right; }
+#kiwi #controlbox .input_tools .tool { margin:0 1em; display:inline; }
+
/**
<div class="input">\r
<span class="nick"> </span>\r
<div class="input_wrap"><textarea class="inp"></textarea></div>\r
+ <div class="input_tools"></div>\r
</div>\r
</div>\r
</div>\r
// And move the handle just out of sight to the right\r
el_resize_handle.css('left', el_panels.outerWidth(true));\r
}\r
+\r
+ var input_wrap_width = parseInt($('#kiwi #controlbox .input_tools').outerWidth());\r
+ el_controlbox.find('.input_wrap').css('right', input_wrap_width + 7);\r
},\r
\r
\r
// Some IRCDs require the clients IP via the username/ident
conf.ip_as_username = [
- "irc.network.com",
- "127.0.0.1"
+ //"irc.network.com",
+ //"127.0.0.1"
];
// Whether to verify IRC servers' SSL certificates against built-in well-known certificate authorities
/*
* Do not ammend the below lines unless you understand the changes!
*/
-module.exports.production = conf;
\ No newline at end of file
+module.exports.production = conf;
if (command.hostname && command.port && command.nick) {
var con;
- if (global.config.restrict_server) {
- this.state.connect(
- global.config.restrict_server,
- global.config.restrict_server_port,
- global.config.restrict_server_ssl,
- command.nick,
- {hostname: this.websocket.handshake.revdns, address: this.websocket.handshake.real_address},
- global.config.restrict_server_password,
- callback);
-
- } else {
- this.state.connect(
- command.hostname,
- command.port,
- command.ssl,
- command.nick,
- {hostname: this.websocket.handshake.revdns, address: this.websocket.handshake.real_address},
- command.password,
- callback);
- }
+ this.state.connect(
+ (global.config.restrict_server || command.hostname),
+ (global.config.restrict_server_port || command.port),
+ (global.config.restrict_server_ssl || command.ssl),
+ command.nick,
+ {hostname: this.websocket.handshake.revdns, address: this.websocket.handshake.real_address},
+ (global.config.restrict_server_password || command.password),
+ callback);
} else {
return callback('Hostname, port and nickname must be specified');
}
// TODO: Should this close all the websocket connections too?
function websocketError() {
this.dispose();
-}
\ No newline at end of file
+}
State.prototype.connect = function (hostname, port, ssl, nick, user, pass, callback) {
var that = this;
var con, con_num;
- if (global.config.restrict_server) {
- con = new IrcConnection(
- global.config.restrict_server,
- global.config.restrict_server_port,
- global.config.restrict_server_ssl,
- nick,
- user,
- global.config.restrict_server_password,
- this);
-
- } else {
- if ((global.config.max_server_conns > 0) && (!(global.config.webirc_pass && global.config.webirc_passs[hostname]))) {
- if (global.servers.numOnHost(hostname) >= global.config.max_server_conns) {
- return callback('Too many connections to host', {host: hostname, limit: global.config.max_server_conns});
- }
- }
- con = new IrcConnection(
- hostname,
- port,
- ssl,
- nick,
- user,
- pass,
- this);
+
+ // Check the per-server limit on the number of connections
+ if ((global.config.max_server_conns > 0) &&
+ (!global.config.restrict_server) &&
+ (!(global.config.webirc_pass && global.config.webirc_pass[hostname])) &&
+ (global.servers.numOnHost(hostname) >= global.config.max_server_conns))
+ {
+ return callback('Too many connections to host', {host: hostname, limit: global.config.max_server_conns});
}
+
+ con = new IrcConnection(
+ hostname,
+ port,
+ ssl,
+ nick,
+ user,
+ pass,
+ this);
con_num = this.next_connection++;
this.irc_connections[con_num] = con;