From b54b946c0f43b5ea9187baa5b8829d024608123c Mon Sep 17 00:00:00 2001
From: Mircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Date: Sat, 29 Oct 2011 13:48:51 +0300
Subject: [PATCH] Add a command which allows printing tag information of a
 model to the player

---
 qcsrc/server/mutators/sandbox.qc | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc
index 89c8b20fd..86e48936e 100644
--- a/qcsrc/server/mutators/sandbox.qc
+++ b/qcsrc/server/mutators/sandbox.qc
@@ -599,8 +599,15 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
 				e = sandbox_ObjectEdit_Get(FALSE);
 				if(e != world)
 				{
-					print_to(self, "^2SANDBOX - INFO: ^7Object seen");
-					return TRUE;
+					switch(argv(2))
+					{
+						case "taginfo":
+							string tags;
+							for(i = 0; gettaginfo(e, i); i++)
+								tags = strcat(tags, "^5", gettaginfo_name, "^7, ");
+							print_to(self, strcat("^2SANDBOX - INFO: ^7Tag information for ^3", e.model, "^7: ", tags));
+							return TRUE;
+					}
 				}
 				print_to(self, "^1SANDBOX - WARNING: ^7No information could not be found. Make sure you are facing an object");
 				return TRUE;
-- 
2.39.5