$('#kiwi .formconnectwindow').submit(function () {
var netsel = $('#kiwi .formconnectwindow .network'),
+ netport = $('#kiwi .formconnectwindow .port'),
+ netssl = $('#kiwi .formconnectwindow .ssl'),
nick = $('#kiwi .formconnectwindow .nick'),
tmp;
kiwi.front.doLayout();
try {
- kiwi.front.run('/connect ' + netsel.val());
+ kiwi.front.run('/connect ' + netsel.val() + ' ' + netport.val() + ' ' + (netssl.attr('checked') ? 'true' : ''));
} catch (e) {}
$('#kiwi .connectwindow').slideUp('', kiwi.front.barsShow);
case '/connect':
case '/server':
if (parts[1] === undefined) {
- alert('Usage: /connect servername [port]');
+ alert('Usage: /connect servername [[port] [ssl]]');
break;
}
if (parts[2] === undefined) {
parts[2] = 6667;
}
- kiwi.front.cur_channel.addMsg(null, ' ', '=== Connecting to ' + parts[1] + '...', 'status');
- kiwi.gateway.connect(parts[1], parts[2], 0);
+
+ if ((parts[3] === undefined) || (parts[3] === 'false') || (parts[3] === 'no')) {
+ parts[3] = false;
+ } else {
+ parts[3] = true;
+ }
+
+ kiwi.front.cur_channel.addMsg(null, ' ', '=== Connecting to ' + parts[1] + ' on port ' + parts[2] + ((parts[3]) ? ' using SSL' : '') + '...', 'status');
+ kiwi.gateway.connect(parts[1], parts[2], parts[3]);
break;
case '/nick':
li
label(for="channel") Channel:
input(type="text", id="channel", name="channel", class="channel", value="#kiwiirc")
+ li
+ label(for="port") Port:
+ input(type="text", id="port", name="port", class="port", value="6667")
+ li
+ label(for="ssl") SSL:
+ input(type="checkbox", id="ssl", name="ssl", class="ssl")
a.connect(href="") Connect...