mirror of
https://github.com/sys-fs/tubes
synced 2024-11-21 19:44:16 -05:00
Fix host flag
This commit is contained in:
parent
daa25924bc
commit
aa69cf2ce6
6
tubes.c
6
tubes.c
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
static SSL_CTX *ctx;
|
static SSL_CTX *ctx;
|
||||||
static SSL *ssl;
|
static SSL *ssl;
|
||||||
static char *host = "chat.freenode.net";
|
static char host[128] = "chat.freenode.net";
|
||||||
static char port[6] = "6667";
|
static char port[6] = "6667";
|
||||||
static short use_ssl = 0;
|
static short use_ssl = 0;
|
||||||
static unsigned int last_response = time(NULL);
|
static unsigned int last_response = time(NULL);
|
||||||
@ -102,14 +102,14 @@ main(int argc, char **argv)
|
|||||||
char buf[512];
|
char buf[512];
|
||||||
int i, r, status;
|
int i, r, status;
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "Shp:")) != -1) {
|
while ((i = getopt(argc, argv, "Sh:p:")) != -1) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 'S':
|
case 'S':
|
||||||
use_ssl = 1;
|
use_ssl = 1;
|
||||||
strncpy(port, "6697", sizeof(port));
|
strncpy(port, "6697", sizeof(port));
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
host = optarg;
|
strncpy(host, optarg, sizeof(host));
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
strncpy(port, optarg, sizeof(port));
|
strncpy(port, optarg, sizeof(port));
|
||||||
|
Loading…
Reference in New Issue
Block a user