From 05479f056dea3bd6f7f1e39b933c341f2d707267 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 29 Aug 2013 18:56:00 +0200 Subject: [PATCH] Allow refreshserverlist() to also clear the list like net_slist command Usage: refreshserverlist(TRUE); --- mvm_cmds.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mvm_cmds.c b/mvm_cmds.c index 9a236401..577cd44d 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -560,8 +560,11 @@ refreshserverlist() */ static void VM_M_refreshserverlist(prvm_prog_t *prog) { - VM_SAFEPARMCOUNT( 0, VM_M_refreshserverlist ); - ServerList_QueryList(false, true, false, false); + VM_SAFEPARMCOUNTRANGE( 0, 1, VM_M_refreshserverlist ); + qboolean do_reset = false; + if (prog->argc >= 1 && PRVM_G_FLOAT(OFS_PARM0)) + do_reset = true; + ServerList_QueryList(do_reset, true, false, false); } /* -- 2.39.2