Improve port handling

This commit is contained in:
Ken-Håvard Lieng 2016-01-14 05:56:53 +01:00
parent 2bffef825d
commit 13a3d96b44
7 changed files with 48 additions and 43 deletions

View file

@ -2,9 +2,15 @@ import * as actions from '../actions';
import { updateSelection } from './tab';
export function connect(server, nick, options) {
let host = server;
const i = server.indexOf(':');
if (i > 0) {
host = server.slice(0, i);
}
return {
type: actions.CONNECT,
server,
host,
nick,
options,
socket: {