From db08ef3cf8fa0f4e04a71833903b65367b7259ff Mon Sep 17 00:00:00 2001
From: Samual <samual@xonotic.org>
Date: Fri, 30 Dec 2011 19:31:11 -0500
Subject: [PATCH] More cleanup/fixes

---
 qcsrc/server/command/cmd.qc        |  2 +-
 qcsrc/server/command/getreplies.qc |  2 +
 qcsrc/server/miscfunctions.qc      | 65 ------------------------------
 3 files changed, 3 insertions(+), 66 deletions(-)

diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc
index 2f38d3e1b0..06262e109c 100644
--- a/qcsrc/server/command/cmd.qc
+++ b/qcsrc/server/command/cmd.qc
@@ -512,7 +512,7 @@ void ClientCommand_tell(float request, float argc, string command)
 				}
 				else if(strtolower(argv(1)) == "world") 
 				{ 
-					trigger_magicear_processmessage_forallears(self, -1, world, substring(command, argv_start_index(ParseCommandPlayerSlotTarget_firsttoken), argv_end_index(-1) - argv_start_index(ParseCommandPlayerSlotTarget_firsttoken)));
+					trigger_magicear_processmessage_forallears(self, -1, world, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)));
 					return;
 				}
 				else { print_to(self, strcat("tell: ", GetClientErrorString(tell_accepted, argv(1)), ".")); return; }
diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc
index 1ac23e5632..fd468f7d95 100644
--- a/qcsrc/server/command/getreplies.qc
+++ b/qcsrc/server/command/getreplies.qc
@@ -10,6 +10,8 @@
 
 // See common.qc for their proper commands
 
+// todo: Re-write this to be more user friendly... I'll probably do it after it is merged.
+
 string getrecords(float page) // 50 records per page
 {
     float rec;
diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc
index 82871d8b22..4babf32b22 100644
--- a/qcsrc/server/miscfunctions.qc
+++ b/qcsrc/server/miscfunctions.qc
@@ -2510,71 +2510,6 @@ void SoundEntity_Detach(entity pl)
         SoundEntity_StopSound(pl, i);
 }
 
-
-float ParseCommandPlayerSlotTarget_firsttoken;
-entity GetCommandPlayerSlotTargetFromTokenizedCommand(float tokens, float idx) // idx = start index
-{
-	string s;
-	entity e, head;
-	float n;
-
-	s = string_null;
-
-	ParseCommandPlayerSlotTarget_firsttoken = -1;
-
-	if (tokens > idx)
-	{
-		if (substring(argv(idx), 0, 1) == "#")
-		{
-			s = substring(argv(idx), 1, -1);
-			++idx;
-			if (s == "") if (tokens > idx)
-			{
-				s = argv(idx);
-				++idx;
-			}
-			ParseCommandPlayerSlotTarget_firsttoken = idx;
-			n = stof(s);
-			if (s == ftos(n) && n > 0 && n <= maxclients)
-			{
-				e = edict_num(n);
-				if (e.flags & FL_CLIENT)
-					return e;
-			}
-		}
-		else
-		{
-			// it must be a nick name
-			s = argv(idx);
-			++idx;
-			ParseCommandPlayerSlotTarget_firsttoken = idx;
-
-			n = 0;
-			FOR_EACH_CLIENT(head)
-				if (head.netname == s)
-				{
-					e = head;
-					++n;
-				}
-			if (n == 1)
-				return e;
-
-			s = strdecolorize(s);
-			n = 0;
-			FOR_EACH_CLIENT(head)
-				if (strdecolorize(head.netname) == s)
-				{
-					e = head;
-					++n;
-				}
-			if (n == 1)
-				return e;
-		}
-	}
-
-	return world;
-}
-
 .float scale2;
 
 float modeleffect_SendEntity(entity to, float sf)
-- 
2.39.5