mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
make sv_new a little friendlier
This commit is contained in:
parent
ac96f94658
commit
6c6f78158e
1 changed files with 4 additions and 3 deletions
|
@ -786,15 +786,16 @@ sv_new_f (void)
|
|||
server_t *sv;
|
||||
netadr_t adr;
|
||||
|
||||
if (Cmd_Argc () != 3) {
|
||||
if (Cmd_Argc () < 2 || Cmd_Argc () > 3) {
|
||||
qtv_printf ("Usage: sv_new <name> <address>\n");
|
||||
return;
|
||||
}
|
||||
name = Cmd_Argv (1);
|
||||
address = name = Cmd_Argv (1);
|
||||
if (Hash_Find (server_hash, name)) {
|
||||
qtv_printf ("sv_new: %s already exists\n", name);
|
||||
return;
|
||||
}
|
||||
if (Cmd_Argc () == 3)
|
||||
address = Cmd_Argv (2);
|
||||
if (!NET_StringToAdr (address, &adr)) {
|
||||
qtv_printf ("Bad server address\n");
|
||||
|
|
Loading…
Reference in a new issue