Remove unnecessary repeated lines in parse_command()

There was no need for the same lines both in the WANT_TCL and !WANT_TCL branches.
This commit is contained in:
Kevin Easton
2017-06-30 23:05:05 +10:00
parent 19639ed608
commit 356eb699d0

View File

@@ -4632,10 +4632,7 @@ int BX_parse_command(char *line, int hist_flag, char *sub_args)
else if (!my_stricmp(com, get_server_nickname(from_server))) else if (!my_stricmp(com, get_server_nickname(from_server)))
me(NULL, rest, empty_string, NULL); me(NULL, rest, empty_string, NULL);
#ifdef WANT_TCL #ifdef WANT_TCL
else else if (tcl_interp)
{
if (tcl_interp)
{ {
int err; int err;
err = Tcl_Invoke(tcl_interp, cline, rest); err = Tcl_Invoke(tcl_interp, cline, rest);
@@ -4659,21 +4656,14 @@ int BX_parse_command(char *line, int hist_flag, char *sub_args)
bitchsay("%s %s", unknown, cline); bitchsay("%s %s", unknown, cline);
} }
} else if (get_int_var(DISPATCH_UNKNOWN_COMMANDS_VAR))
send_to_server("%s %s", cline, rest);
else if (alias_cnt + cmd_cnt > 1)
bitchsay("Ambiguous command: %s", cline);
else
bitchsay("%s %s", unknown, cline);
} }
#else #endif
else if (get_int_var(DISPATCH_UNKNOWN_COMMANDS_VAR)) else if (get_int_var(DISPATCH_UNKNOWN_COMMANDS_VAR))
send_to_server("%s %s", cline, rest); send_to_server("%s %s", cline, rest);
else if (alias_cnt + cmd_cnt > 1) else if (alias_cnt + cmd_cnt > 1)
bitchsay("Ambiguous command: %s", cline); bitchsay("Ambiguous command: %s", cline);
else else
bitchsay("%s %s", unknown, cline); bitchsay("%s %s", unknown, cline);
#endif
} }
if (alias) if (alias)
new_free(&alias_name); new_free(&alias_name);