Permalink
Browse files

Add TLS ifdefs to ssl var initialization

  • Loading branch information...
vanosg committed Nov 5, 2017
1 parent adebebe commit 2190b8c5d1b2f1a621ff08f474fd691bee8351af
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/cmds.c
  2. +2 −0 src/tcluser.c
View
@@ -872,7 +872,6 @@ static void cmd_pls_bot(struct userrec *u, int idx, char *par)
userlist = adduser(userlist, handle, "none", "-", USER_BOT);
u1 = get_user_by_handle(userlist, handle);
bi = user_malloc(sizeof(struct bot_addr));
bi->ssl = 0;
bi->address = user_malloc(strlen(addr) + 1);
strcpy(bi->address, addr);
@@ -881,6 +880,7 @@ static void cmd_pls_bot(struct userrec *u, int idx, char *par)
bi->relay_port = 3333;
} else {
#ifdef TLS
bi->ssl = 0;
if (*port == '+')
bi->ssl |= TLS_BOT;
#endif
View
@@ -309,7 +309,9 @@ static int tcl_addbot STDVAR
else {
userlist = adduser(userlist, argv[1], "none", "-", USER_BOT);
bi = user_malloc(sizeof(struct bot_addr));
#ifdef TLS
bi->ssl = 0;
#endif
#ifdef IPV6
if ((q = strchr(argv[2], '/'))) {
if (!q[1]) {

0 comments on commit 2190b8c

Please sign in to comment.