Improve port handling
This commit is contained in:
parent
2bffef825d
commit
13a3d96b44
7 changed files with 48 additions and 43 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue