Correctly handle case when a nick comes between a -s flag and a server name on the command line
The -s flag resets after the next server on the command line, but it was also incorrectly resetting if a nickname was seen as well. This meant that a command line like this failed to use SSL: BitchX -s -p 9999 gauze irc.choopa.net Also update the help text to correctly reflect the operation of the -s flag. Reported by gauze.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
[Changes 1.2.2]
|
[Changes 1.2.2]
|
||||||
|
|
||||||
|
* Correctly handle case when a nick comes between a -s flag and a server name
|
||||||
|
on the command line (reported by gauze). (caf)
|
||||||
|
|
||||||
* Show correct count of matching commands in /HELP. (caf)
|
* Show correct count of matching commands in /HELP. (caf)
|
||||||
|
|
||||||
* Simplify rsindex() and strsearch() exported functions. (caf)
|
* Simplify rsindex() and strsearch() exported functions. (caf)
|
||||||
|
|||||||
13
source/irc.c
13
source/irc.c
@@ -240,13 +240,13 @@ static char *switch_help[] = {
|
|||||||
" -n nickname\tnickname to use\n",
|
" -n nickname\tnickname to use\n",
|
||||||
" -a\t\tadds default servers and command line servers to server list\n",
|
" -a\t\tadds default servers and command line servers to server list\n",
|
||||||
" -x\t\truns BitchX in \"debug\" mode\n",
|
" -x\t\truns BitchX in \"debug\" mode\n",
|
||||||
" -Z\t\tuse NAT address when doing dcc.\n",
|
" -Z\t\tuse NAT address when doing DCC\n",
|
||||||
" -P\t\ttoggle check pid.nickname for running program.\n",
|
" -P\t\ttoggle check pid.nickname for running program\n",
|
||||||
" -v\t\ttells you about the client's version\n",
|
" -v\t\ttells you about the client's version\n",
|
||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
" -s\t\tservers specified are SSL.\n",
|
" -s\t\tnext server specified is SSL (may be used multiple times)\n",
|
||||||
#endif
|
#endif
|
||||||
" -i\t\tignores the autojoin list entries.\n",
|
" -i\t\tignores the autojoin list entries\n",
|
||||||
#if defined(WINNT) || defined(__EMX__)
|
#if defined(WINNT) || defined(__EMX__)
|
||||||
" -l <file>\tloads <file> in place of your irc-rc\n\
|
" -l <file>\tloads <file> in place of your irc-rc\n\
|
||||||
-L <file>\tloads <file> in place of your irc-rc and expands $ expandos\n",
|
-L <file>\tloads <file> in place of your irc-rc and expands $ expandos\n",
|
||||||
@@ -948,10 +948,13 @@ static char *parse_args (char *argv[], int argc, char **envp)
|
|||||||
if (!strchr(argv[ac], '.') && !strchr(argv[ac], ',') && !*nickname)
|
if (!strchr(argv[ac], '.') && !strchr(argv[ac], ',') && !*nickname)
|
||||||
strlcpy(nickname, argv[ac], sizeof nickname);
|
strlcpy(nickname, argv[ac], sizeof nickname);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
build_server_list(argv[ac]);
|
build_server_list(argv[ac]);
|
||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
do_use_ssl = 0;
|
/* -s flag only applies to next server specified */
|
||||||
|
do_use_ssl = 0;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user