1
0
mirror of https://github.com/sys-fs/tubes synced 2024-11-14 00:46:24 -05:00

Using -S now sets default port to 6697

This commit is contained in:
Thomas Mannay 2016-09-19 00:08:34 +01:00
parent e4a2cb9b34
commit eb2a0124ce
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
.TH TUBES 1 tubes-1.0.0
.TH TUBES 1 tubes-1.1.0
.SH NAME
tubes \- irc pipes
.SH SYNOPSIS
@ -19,7 +19,7 @@ chat.freenode.net.out for incoming and outgoing messages respectively.
.SH OPTIONS
.TP
.B \-S
Use SSL
Use SSL (changes default port to 6697)
.TP
.BI \-s " server"
Use a host other than the default (chat.freenode.net)

View File

@ -19,10 +19,10 @@
#include <unistd.h>
#define PING_TIMEOUT 240
#define VERSION "1.0.0"
#define VERSION "1.1.0"
static char *server = "chat.freenode.net";
static char *port = "6667";
static char port[6] = "6667";
static FILE *log;
static SSL_CTX *ctx;
static SSL *ssl;
@ -54,6 +54,7 @@ int main(int argc, char **argv)
switch (c) {
case 'S':
use_ssl = 1;
snprintf(port, 6, "6697");
break;
case 's':
if (++i < argc)
@ -61,7 +62,7 @@ int main(int argc, char **argv)
break;
case 'p':
if (++i < argc)
port = argv[i];
snprintf(port, 6, "%s", argv[i]);
break;
case 'v':
fprintf(stderr, "tubes-%s © 2016 Thomas Mannay\n", VERSION);