From 75fbffb82cf4d1707977becee54cb1cb15679824 Mon Sep 17 00:00:00 2001
From: Samual Lenks <samual@xonotic.org>
Date: Mon, 28 Jan 2013 20:48:33 -0500
Subject: [PATCH] Make the varargs system work, create legacy wrapper, more
 cleanup

---
 qcsrc/common/notifications.qc               | 82 +++++++++++++--------
 qcsrc/server/g_damage.qc                    | 28 +++----
 qcsrc/server/mutators/gamemode_ctf.qc       | 54 +++++++-------
 qcsrc/server/mutators/gamemode_freezetag.qc | 22 +++---
 qcsrc/server/mutators/gamemode_keepaway.qc  | 10 +--
 qcsrc/server/race.qc                        | 12 +--
 6 files changed, 116 insertions(+), 92 deletions(-)

diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc
index 564a1a5ff1..b225c8205f 100644
--- a/qcsrc/common/notifications.qc
+++ b/qcsrc/common/notifications.qc
@@ -587,9 +587,10 @@ string Get_Field_Value(float field, float net_type, float net_name)
 	string output = "";
 	
 	#define GET_FIELD_VALUE_OUTPUT(field,name,strnum,flnum) \
-		if(field == F_NAME) { output = VAR_TO_TEXT(name); } \
-		else if(field == F_STRNUM) { output = ftos(strnum); } \
-		else if(field == F_FLNUM) { output = ftos(flnum); }
+		switch(field) { \
+			case F_NAME: { output = VAR_TO_TEXT(name); break; } \
+			case F_STRNUM: { output = ftos(strnum); break; } \
+			case F_FLNUM: { output = ftos(flnum); break; } }
 	
 	switch(net_type)
 	{
@@ -748,18 +749,17 @@ void backtrace(string msg)
 void Local_Notification(float net_type, float net_name, ...count);
 void Local_Notification_Without_VarArgs(float net_type, float net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4)
 {
-	#define VARITEM(stringc,floatc,args) if((stringcount == stringc) && (floatcount == floatc)) { Local_Notification(net_type, net_name, args); }
+	#define VARITEM(stringc,floatc,args) if((stringcount == stringc) && (floatcount == floatc)) { Local_Notification(net_type, net_name, args); return; }
 	EIGHT_VARS_TO_VARARGS_VARLIST
 	#undef VARITEM
+
+	Local_Notification(net_type, net_name); // some notifications don't have any arguments at all
 }
 void Local_Notification(float net_type, float net_name, ...count)
 {
 	float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name));
 	float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name));
 
-	if((stringcount + floatcount) > count) { backtrace(strcat("Not enough arguments for Local_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " > count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
-	else if((stringcount + floatcount) < count) { backtrace(strcat("Too many arguments for Local_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " < count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
-
 	string s1 = ((0 < stringcount) ? ...(0, string) : NO_STR_ARG);
 	string s2 = ((1 < stringcount) ? ...(1, string) : NO_STR_ARG);
 	string s3 = ((2 < stringcount) ? ...(2, string) : NO_STR_ARG);
@@ -769,7 +769,11 @@ void Local_Notification(float net_type, float net_name, ...count)
 	float f3 = (((stringcount + 2) < count) ? ...((stringcount + 2), float) : NO_FL_ARG);
 	float f4 = (((stringcount + 3) < count) ? ...((stringcount + 3), float) : NO_FL_ARG);
 	
-	print("Local_Notification(", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", s1, ", ", s2, ", ", s3, ", ", s4, ", "), strcat(ftos(f1), strcat(", ", ftos(f2), ", ", ftos(f3), ", ", ftos(f4), ");\n")));
+	dprint("Local_Notification(", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", s1, ", ", s2, ", ", s3, ", ", s4, ", "), strcat(ftos(f1), strcat(", ", ftos(f2), ", ", ftos(f3), ", ", ftos(f4), ");\n")));
+	dprint("  ^--: stringcount: ", ftos(stringcount), ", floatcount: ", ftos(floatcount), ".\n");
+
+	if((stringcount + floatcount) > count) { backtrace(strcat("Not enough arguments for Local_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), ")"), " > count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
+	else if((stringcount + floatcount) < count) { backtrace(strcat("Too many arguments for Local_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), ")"), " < count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
 
 	switch(net_type)
 	{
@@ -806,11 +810,17 @@ void Local_Notification(float net_type, float net_name, ...count)
 				{ NOTIF_MATCH(name, net_name) CHECK_AUTOCVAR(name) \
 				{ \
 					#if infoname != NO_MSG \
-						Local_Notification_Without_VarArgs(MSG_INFO, infoname, stringcount, floatcount, s1, s2, s3, s4, f1, f2, f3, f4); \
+						Local_Notification_Without_VarArgs(MSG_INFO, infoname, \
+							stof(Get_Field_Value(F_STRNUM, MSG_INFO, infoname)), \
+							stof(Get_Field_Value(F_FLNUM, MSG_INFO, infoname)), \
+							s1, s2, s3, s4, f1, f2, f3, f4); \
 					#endif \
 					#ifdef CSQC \
 						#if centername != NO_MSG \
-							Local_Notification_Without_VarArgs(MSG_CENTER, centername, stringcount, floatcount, s1, s2, s3, s4, f1, f2, f3, f4); \
+							Local_Notification_Without_VarArgs(MSG_CENTER, centername, \
+								stof(Get_Field_Value(F_STRNUM, MSG_CENTER, centername)), \
+								stof(Get_Field_Value(F_FLNUM, MSG_CENTER, centername)), \
+								s1, s2, s3, s4, f1, f2, f3, f4); \
 						#endif \
 					#endif \
 				} }
@@ -824,11 +834,17 @@ void Local_Notification(float net_type, float net_name, ...count)
 				{ NOTIF_MATCH(name, net_name) CHECK_AUTOCVAR(name) \
 				{ \
 					#if infoname != NO_MSG \
-						Local_Notification_Without_VarArgs(MSG_INFO, infoname, stringcount, floatcount, s1, s2, s3, s4, f1, f2, f3, f4); \
+						Local_Notification_Without_VarArgs(MSG_INFO, infoname, \
+							stof(Get_Field_Value(F_STRNUM, MSG_INFO, infoname)), \
+							stof(Get_Field_Value(F_FLNUM, MSG_INFO, infoname)), \
+							s1, s2, s3, s4, f1, f2, f3, f4); \
 					#endif \
 					#ifdef CSQC \
 						#if centername != NO_MSG \
-							Local_Notification_Without_VarArgs(MSG_CENTER, centername, stringcount, floatcount, s1, s2, s3, s4, f1, f2, f3, f4); \
+							Local_Notification_Without_VarArgs(MSG_CENTER, centername, \
+								stof(Get_Field_Value(F_STRNUM, MSG_CENTER, centername)), \
+								stof(Get_Field_Value(F_FLNUM, MSG_CENTER, centername)), \
+								s1, s2, s3, s4, f1, f2, f3, f4); \
 						#endif \
 					#endif \
 				} }
@@ -851,15 +867,17 @@ void Read_Notification(void)
 
 	float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name));
 	float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name));
-
-	//print("stringcount = ", ftos(stringcount), ", floatcount = ", ftos(floatcount), ".\n");
 	
-	Local_Notification(net_type, net_name,
-		((stringcount >= 1) ? ReadString() : ""),
-		((stringcount == 2) ? ReadString() : ""),
-		((floatcount >= 1) ? ReadLong() : 0),
-		((floatcount >= 2) ? ReadLong() : 0),
-		((floatcount == 3) ? ReadLong() : 0));
+	Local_Notification_Without_VarArgs(net_type, net_name,
+		stringcount, floatcount,
+		((stringcount >= 1) ? ReadString() : NO_STR_ARG),
+		((stringcount >= 2) ? ReadString() : NO_STR_ARG),
+		((stringcount >= 3) ? ReadString() : NO_STR_ARG),
+		((stringcount == 4) ? ReadString() : NO_STR_ARG),
+		((floatcount >= 1) ? ReadLong() : NO_FL_ARG),
+		((floatcount >= 2) ? ReadLong() : NO_FL_ARG),
+		((floatcount >= 3) ? ReadLong() : NO_FL_ARG),
+		((floatcount == 4) ? ReadLong() : NO_FL_ARG));
 }
 #endif
 
@@ -868,18 +886,15 @@ void Send_Notification(entity client, float broadcast, float net_type, float net
 {
 	if((broadcast == MSG_BROADCAST || broadcast == MSG_ONE) && net_type && net_name)
 	{
-		dprint("Send_Notification(", ftos(broadcast), ", ", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", ftos(count), ");\n"));
-		
 		float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name));
 		float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name));
 		float i, tmp_f;
 		string tmp_s;
 
-		print("stringcount: ", ftos(stringcount), ", floatcount: ", ftos(floatcount), ".\n");
+		dprint("Send_Notification(", ftos(broadcast), ", ", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", ftos(count), ");\n"));
+		dprint("  ^--: stringcount: ", ftos(stringcount), ", floatcount: ", ftos(floatcount), ".\n");
 
-		/*if(stringcount != f_stringcount) { backtrace(strcat("Incorrect string arguments for notification! stringcount: ", ftos(stringcount), ", f_stringcount: ", ftos(f_stringcount), ".\nCheck the notification definition and the function call for accuracy...?\n")); return; }
-		else if(floatcount != f_floatcount) { backtrace(strcat("Incorrect float arguments for notification! floatcount: ", ftos(floatcount), ", f_floatcount: ", ftos(f_floatcount), ".\nCheck the notification definition and the function call for accuracy...?\n")); return; }
-		else*/ if((stringcount + floatcount) > count) { backtrace(strcat("Not enough arguments for Send_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " > count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
+		if((stringcount + floatcount) > count) { backtrace(strcat("Not enough arguments for Send_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " > count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
 		else if((stringcount + floatcount) < count) { backtrace(strcat("Too many arguments for Send_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " < count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
 
 		//if(Count_Proper_Strings(NO_STR_ARG, s1, s2) > stringcount) { backtrace("Too many string arguments for notification!\n"); return; }
@@ -891,9 +906,9 @@ void Send_Notification(entity client, float broadcast, float net_type, float net
 			WriteByte(msg, net_type); \
 			WriteShort(msg, net_name); \
 			for(i = 0; i < stringcount; ++i) \
-				{ tmp_s = ...(i, string); WriteString(msg, tmp_s); print("WriteString(...(", ftos(i), ", string)); - ", tmp_s); } \
+				{ tmp_s = ...(i, string); WriteString(msg, tmp_s); dprint("WriteString(...(", ftos(i), ", string)); - ", tmp_s, "\n"); } \
 			for(i = 0; i < floatcount; ++i) \
-				{ tmp_f = ...((stringcount + i), float); WriteLong(msg, tmp_f); print("WriteLong(...(", ftos(i), ", float)); - ", ftos(tmp_f)); }
+				{ tmp_f = ...((stringcount + i), float); WriteLong(msg, tmp_f); dprint("WriteLong(...(", ftos((stringcount + i)), ", float)); - ", ftos(tmp_f), "\n"); }
 
 			
 		switch(broadcast)
@@ -930,9 +945,18 @@ void Send_Notification(entity client, float broadcast, float net_type, float net
 
 void Send_Notification_Without_VarArgs(entity client, float broadcast, float net_type, float net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4)
 {		
-	#define VARITEM(stringc,floatc,args) if((stringcount == stringc) && (floatcount == floatc)) { Send_Notification(client, broadcast, net_type, net_name, args); }
+	#define VARITEM(stringc,floatc,args) if((stringcount == stringc) && (floatcount == floatc)) { Send_Notification(client, broadcast, net_type, net_name, args); return; }
 	EIGHT_VARS_TO_VARARGS_VARLIST
 	#undef VARITEM
+
+	Send_Notification(client, broadcast, net_type, net_name); // some notifications don't have any arguments at all
+}
+
+void Send_Notification_Legacy_Wrapper(entity client, float broadcast, float net_type, float net_name, string s1, string s2, float f1, float f2, float f3)
+{
+	float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name));
+	float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name));
+	Send_Notification_Without_VarArgs(client, broadcast, net_type, net_name, stringcount, floatcount, s1, s2, NO_STR_ARG, NO_STR_ARG, f1, f2, f3, NO_FL_ARG);
 }
 
 void Send_Notification_ToTeam(float targetteam, entity except, float net_type, float net_name, ...count)
diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc
index addb324962..01d0bf8ced 100644
--- a/qcsrc/server/g_damage.qc
+++ b/qcsrc/server/g_damage.qc
@@ -321,7 +321,7 @@ void Obituary_SpecialDeath(entity notif_target, float murder, float deathtype, s
 				#if msg_death != NO_MSG \
 					if not(murder) \
 					{ \
-						Send_Notification(notif_target, MSG_ONE, MSG_DEATH, msg_death, s1, s2, f1, f2, f3); \
+						Send_Notification_Legacy_Wrapper(notif_target, MSG_ONE, MSG_DEATH, msg_death, s1, s2, f1, f2, f3); \
 						Send_Notification_ToAll(notif_target, TRUE, MSG_INFO, INFO_##msg_death, s1, s2, f1, f2, f3); \
 						++handled; \
 					} \
@@ -329,7 +329,7 @@ void Obituary_SpecialDeath(entity notif_target, float murder, float deathtype, s
 				#if msg_death_by != NO_MSG \
 					if(murder) \
 					{ \
-						Send_Notification(notif_target, MSG_ONE, MSG_DEATH, msg_death_by, s1, s2, f1, f2, f3); \
+						Send_Notification_Legacy_Wrapper(notif_target, MSG_ONE, MSG_DEATH, msg_death_by, s1, s2, f1, f2, f3); \
 						Send_Notification_ToAll(notif_target, TRUE, MSG_INFO, INFO_##msg_death_by, s1, s2, f1, f2, f3); \
 						++handled; \
 					} \
@@ -363,7 +363,7 @@ float Obituary_WeaponDeath(float murder, float deathtype, string s1, string s2)
 		float death_message = weapon_action(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE));
 		w_deathtype = FALSE;
 
-		if(death_message) { Send_Notification(world, MSG_BROADCAST, MSG_WEAPON, death_message, s1, s2, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
+		if(death_message) { Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_WEAPON, death_message, s1, s2, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
 		else { dprint(sprintf("Obituary_WeaponDeath(): ^1Deathtype ^7(%s-%d)^1 has no notification for weapon %d!\n", Deathtype_Name(deathtype), deathtype, death_weapon)); }
 
 		return TRUE;
@@ -447,9 +447,9 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
 
 			attacker.killcount = 0;
 			
-			Send_Notification(attacker, MSG_ONE, MSG_DEATH, DEATH_TEAMKILL_FRAG, s2, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-			Send_Notification(targ, MSG_ONE, MSG_DEATH, DEATH_TEAMKILL_FRAGGED, s1, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-			Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_NUM_4(targ.team, INFO_DEATH_TEAMKILL_), s2, s1, targ.killcount, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, DEATH_TEAMKILL_FRAG, s2, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, DEATH_TEAMKILL_FRAGGED, s1, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_NUM_4(targ.team, INFO_DEATH_TEAMKILL_), s2, s1, targ.killcount, NO_FL_ARG, NO_FL_ARG);
 
 			// In this case, the death message will ALWAYS be "foo was betrayed by bar"
 			// No need for specific death/weapon messages...
@@ -494,18 +494,18 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
 			{
 				if(targ.istypefrag)
 				{
-					Send_Notification(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAG_FIRST_VERBOSE : DEATH_MURDER_TYPEFRAG_FIRST),
+					Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAG_FIRST_VERBOSE : DEATH_MURDER_TYPEFRAG_FIRST),
 						s2, s1, (attacker.FRAG_VERBOSE ? ((clienttype(targ) == CLIENTTYPE_BOT) ? BOT_PING : targ.ping) : NO_FL_ARG), NO_FL_ARG, NO_FL_ARG);
 						
-					Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAGGED_FIRST_VERBOSE : DEATH_MURDER_TYPEFRAGGED_FIRST),
+					Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAGGED_FIRST_VERBOSE : DEATH_MURDER_TYPEFRAGGED_FIRST),
 						s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
 				}
 				else
 				{
-					Send_Notification(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_FRAG_FIRST_VERBOSE : DEATH_MURDER_FRAG_FIRST),
+					Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_FRAG_FIRST_VERBOSE : DEATH_MURDER_FRAG_FIRST),
 						s2, s1, (attacker.FRAG_VERBOSE ? ((clienttype(targ) == CLIENTTYPE_BOT) ? BOT_PING : targ.ping) : NO_FL_ARG), NO_FL_ARG, NO_FL_ARG);
 						
-					Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_FIRST_VERBOSE : DEATH_MURDER_FRAGGED_FIRST),
+					Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_FIRST_VERBOSE : DEATH_MURDER_FRAGGED_FIRST),
 						s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
 				}
 			}
@@ -513,18 +513,18 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
 			{
 				if(targ.istypefrag)
 				{
-					Send_Notification(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAG_VERBOSE : DEATH_MURDER_TYPEFRAG),
+					Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAG_VERBOSE : DEATH_MURDER_TYPEFRAG),
 						s2, NO_STR_ARG, attacker.killcount, (attacker.FRAG_VERBOSE ? ((clienttype(targ) == CLIENTTYPE_BOT) ? BOT_PING : targ.ping) : NO_FL_ARG), NO_FL_ARG);
 						
-					Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAGGED_VERBOSE : DEATH_MURDER_TYPEFRAGGED),
+					Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAGGED_VERBOSE : DEATH_MURDER_TYPEFRAGGED),
 						s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
 				}
 				else
 				{
-					Send_Notification(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_FRAG_VERBOSE : DEATH_MURDER_FRAG),
+					Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_FRAG_VERBOSE : DEATH_MURDER_FRAG),
 						s2, NO_STR_ARG, attacker.killcount, (attacker.FRAG_VERBOSE ? ((clienttype(targ) == CLIENTTYPE_BOT) ? BOT_PING : targ.ping) : NO_FL_ARG), NO_FL_ARG);
 						
-					Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_VERBOSE : DEATH_MURDER_FRAGGED),
+					Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_VERBOSE : DEATH_MURDER_FRAGGED),
 						s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
 				}
 			}
diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc
index e8fa4639b8..f5a4d069ab 100644
--- a/qcsrc/server/mutators/gamemode_ctf.qc
+++ b/qcsrc/server/mutators/gamemode_ctf.qc
@@ -42,7 +42,7 @@ void ctf_CaptureRecord(entity flag, entity player)
 	FOR_EACH_REALCLIENT(tmp_entity)
 	{
 		if not(tmp_entity.CAPTURE_VERBOSE) { notification = APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_); s2 = NO_STR_ARG; f1 = f2 = NO_FL_ARG; }
-		Send_Notification(tmp_entity, MSG_ONE, MSG_INFO, notification, s1, s2, f1, f2, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(tmp_entity, MSG_ONE, MSG_INFO, notification, s1, s2, f1, f2, NO_FL_ARG);
 	}
 
 	// write that shit in the database
@@ -169,9 +169,9 @@ void ctf_CaptureShield_Update(entity player, float wanted_status)
 	if((wanted_status == player.ctf_captureshielded) && (updated_status != wanted_status)) // 0: shield only, 1: unshield only
 	{
 		if(updated_status) // TODO csqc notifier for this // Samual: How?
-			Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		else
-			Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_FREE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_FREE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 			
 		player.ctf_captureshielded = updated_status;
 	}
@@ -194,7 +194,7 @@ void ctf_CaptureShield_Touch()
 	vector othermid = (other.absmin + other.absmax) * 0.5;
 
 	Damage(other, self, self, 0, DEATH_HURTTRIGGER, mymid, normalize(othermid - mymid) * ctf_captureshield_force);
-	Send_Notification(other, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(other, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 }
 
 void ctf_CaptureShield_Spawn(entity flag)
@@ -237,7 +237,7 @@ void ctf_Handle_Drop(entity flag, entity player, float droptype)
 	flag.ctf_status = FLAG_DROPPED;
 	
 	// messages and sounds
-	Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_LOST_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_LOST_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	sound(flag, CH_TRIGGER, flag.snd_flag_dropped, VOL_BASE, ATTN_NONE);
 	ctf_EventLog("dropped", player.team, player);
 
@@ -290,11 +290,11 @@ void ctf_Handle_Retrieve(entity flag, entity player)
 	FOR_EACH_REALPLAYER(tmp_player)
 	{
 		if(tmp_player == sender)
-			Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_SENT_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_SENT_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		else if(tmp_player == player)
-			Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_RECEIVED_), sender.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_RECEIVED_), sender.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		else if(!IsDifferentTeam(tmp_player, sender))
-			Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_OTHER_), sender.netname, player.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_OTHER_), sender.netname, player.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	}
 	
 	// create new waypoint
@@ -448,8 +448,8 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
 void ctf_Handle_Return(entity flag, entity player)
 {
 	// messages and sounds
-	Send_Notification(player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_RETURN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-	Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_RETURN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	sound(player, CH_TRIGGER, flag.snd_flag_returned, VOL_BASE, ATTN_NONE);
 	ctf_EventLog("return", flag.team, player);
 
@@ -497,20 +497,20 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
 	}
 
 	// messages and sounds
-	Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTN_NONE);
 
 	FOR_EACH_REALPLAYER(tmp_player)
 	{
 		if(tmp_player == player)
 		{
-			Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-			if(ctf_stalemate) { Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
+			Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			if(ctf_stalemate) { Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
 		}
 		else if(!IsDifferentTeam(tmp_player, player) && tmp_player != player)
-			Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, (tmp_player.PICKUP_TEAM_VERBOSE ? CENTER_CTF_PICKUP_TEAM_VERBOSE : CENTER_CTF_PICKUP_TEAM), Team_ColorCode(player.team), (tmp_player.PICKUP_TEAM_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, (tmp_player.PICKUP_TEAM_VERBOSE ? CENTER_CTF_PICKUP_TEAM_VERBOSE : CENTER_CTF_PICKUP_TEAM), Team_ColorCode(player.team), (tmp_player.PICKUP_TEAM_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		else if(IsDifferentTeam(tmp_player, player))
-			Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, (tmp_player.PICKUP_ENEMY_VERBOSE ? CENTER_CTF_PICKUP_ENEMY_VERBOSE : CENTER_CTF_PICKUP_ENEMY), Team_ColorCode(player.team), (tmp_player.PICKUP_ENEMY_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, (tmp_player.PICKUP_ENEMY_VERBOSE ? CENTER_CTF_PICKUP_ENEMY_VERBOSE : CENTER_CTF_PICKUP_ENEMY), Team_ColorCode(player.team), (tmp_player.PICKUP_ENEMY_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	}
 	
 	// scoring
@@ -569,14 +569,14 @@ void ctf_CheckFlagReturn(entity flag, float returntype)
 		{
 			switch(returntype)
 			{
-				case RETURN_DROPPED: Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DROPPED_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
-				case RETURN_DAMAGE: Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DAMAGED_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
-				case RETURN_SPEEDRUN: Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_), NO_STR_ARG, NO_STR_ARG, ctf_captimerecord, NO_FL_ARG, NO_FL_ARG); break;
-				case RETURN_NEEDKILL: Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_NEEDKILL_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
+				case RETURN_DROPPED: Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DROPPED_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
+				case RETURN_DAMAGE: Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DAMAGED_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
+				case RETURN_SPEEDRUN: Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_), NO_STR_ARG, NO_STR_ARG, ctf_captimerecord, NO_FL_ARG, NO_FL_ARG); break;
+				case RETURN_NEEDKILL: Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_NEEDKILL_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
 				
 				default:
 				case RETURN_TIMEOUT:
-					{ Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_TIMEOUT_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break; }
+					{ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_TIMEOUT_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break; }
 			}
 			sound(flag, CH_TRIGGER, flag.snd_flag_respawn, VOL_BASE, ATTN_NONE);
 			ctf_EventLog("returned", flag.team, world);
@@ -631,9 +631,9 @@ void ctf_CheckStalemate(void)
 		{
 			FOR_EACH_REALPLAYER(tmp_entity)
 				if(tmp_entity.flagcarried)
-					Send_Notification(tmp_entity, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+					Send_Notification_Legacy_Wrapper(tmp_entity, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 				else
-					Send_Notification(tmp_entity, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_OTHER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+					Send_Notification_Legacy_Wrapper(tmp_entity, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_OTHER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 			
 			wpforenemy_announced = TRUE;
 		}
@@ -1843,13 +1843,13 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
 						{ 
 							if(clienttype(head) == CLIENTTYPE_BOT)
 							{
-								Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+								Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 								ctf_Handle_Throw(head, player, DROP_PASS);
 							}
 							else
 							{
-								Send_Notification(head, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-								Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+								Send_Notification_Legacy_Wrapper(head, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+								Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 							}
 							player.throw_antispam = time + autocvar_g_ctf_pass_wait; 
 							return TRUE; 
@@ -1886,7 +1886,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
 				}
 				else
 				{
-					Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_FLAG_THROW_PUNISH, NO_STR_ARG, NO_STR_ARG, rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time), NO_FL_ARG, NO_FL_ARG);
+					Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_FLAG_THROW_PUNISH, NO_STR_ARG, NO_STR_ARG, rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time), NO_FL_ARG, NO_FL_ARG);
 					return FALSE;
 				}
 			}
@@ -1961,7 +1961,7 @@ MUTATOR_HOOKFUNCTION(ctf_AbortSpeedrun)
 {
 	if(self.flagcarried)
 	{
-		Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(self.flagcarried, INFO_CTF_FLAGRETURN_ABORTRUN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(self.flagcarried, INFO_CTF_FLAGRETURN_ABORTRUN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		ctf_RespawnFlag(self.flagcarried);
 		return TRUE;
 	}
diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc
index 6ffdc77af8..ca1cecc322 100644
--- a/qcsrc/server/mutators/gamemode_freezetag.qc
+++ b/qcsrc/server/mutators/gamemode_freezetag.qc
@@ -35,8 +35,8 @@ void freezetag_CheckWinner()
 
 	if(winner != world) // just in case a winner wasn't found
 	{
-		Send_Notification(world, MSG_BROADCAST, MSG_CENTER, APP_TEAM_NUM_4(winner.team, CENTER_FREEZETAG_ROUND_WIN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-		Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_NUM_4(winner.team, INFO_FREEZETAG_ROUND_WIN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_CENTER, APP_TEAM_NUM_4(winner.team, CENTER_FREEZETAG_ROUND_WIN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_NUM_4(winner.team, INFO_FREEZETAG_ROUND_WIN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
 	}
 
@@ -270,16 +270,16 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
 	if(frag_attacker == frag_target || frag_attacker == world)
 	{
 		if(frag_target.classname == STR_PLAYER)
-			Send_Notification(frag_target, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_SELF, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-		Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_SELF, frag_target.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(frag_target, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_SELF, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_SELF, frag_target.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	}
 	else
 	{
 		if(frag_target.classname == STR_PLAYER)
-			Send_Notification(frag_target, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_FROZEN, frag_attacker.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(frag_target, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_FROZEN, frag_attacker.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		if(frag_attacker.classname == STR_PLAYER)
-			Send_Notification(frag_attacker, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_FREEZE, frag_target.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-		Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_FREEZE, frag_target.netname, frag_attacker.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(frag_attacker, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_FREEZE, frag_target.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_FREEZE, frag_target.netname, frag_attacker.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	}
 
 	frag_target.health = 1; // "respawn" the player :P
@@ -301,7 +301,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
 	}
 	if(warmup && time > warmup) // spawn too late, freeze player
 	{
-		Send_Notification(self, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_SPAWN_LATE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(self, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_SPAWN_LATE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		freezetag_Freeze(world);
 	}
 
@@ -365,9 +365,9 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink)
 				}
 			}
 
-			Send_Notification(self, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_REVIVED, o.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-			Send_Notification(o, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_REVIVE, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-			Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_REVIVE, self.netname, o.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(self, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_REVIVED, o.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(o, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_REVIVE, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_REVIVE, self.netname, o.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		}
 
 		// now find EVERY teammate within reviving radius, set their revive_progress values correct
diff --git a/qcsrc/server/mutators/gamemode_keepaway.qc b/qcsrc/server/mutators/gamemode_keepaway.qc
index ef447281c1..54bdd05e44 100644
--- a/qcsrc/server/mutators/gamemode_keepaway.qc
+++ b/qcsrc/server/mutators/gamemode_keepaway.qc
@@ -101,8 +101,8 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
 	
 	// messages and sounds
 	ka_EventLog("pickup", other);
-	Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_KEEPAWAY_PICKUP, other.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-	Send_Notification(world, MSG_BROADCAST, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_KEEPAWAY_PICKUP, other.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
 	
 	// scoring
@@ -143,8 +143,8 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
 
 	// messages and sounds
 	ka_EventLog("dropped", plyr);
-	Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_KEEPAWAY_DROPPED, plyr.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
-	Send_Notification(world, MSG_BROADCAST, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, plyr.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_KEEPAWAY_DROPPED, plyr.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+	Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, plyr.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	sound(other, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);	// ATTN_NONE (it's a sound intended to be heard anywhere) 
 	
 	// scoring
@@ -252,7 +252,7 @@ MUTATOR_HOOKFUNCTION(ka_Scoring)
 		}
 		else if(!frag_attacker.ballcarried)
 			if(autocvar_g_keepaway_noncarrier_warn)
-				Send_Notification(frag_attacker, MSG_ONE, MSG_CENTER, CENTER_KEEPAWAY_WARN, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+				Send_Notification_Legacy_Wrapper(frag_attacker, MSG_ONE, MSG_CENTER, CENTER_KEEPAWAY_WARN, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 
 		if(frag_attacker.ballcarried) // add to amount of kills while ballcarrier
 			PlayerScore_Add(frag_attacker, SP_SCORE, autocvar_g_keepaway_score_killac);
diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc
index df1d744b28..e666525fd1 100644
--- a/qcsrc/server/race.qc
+++ b/qcsrc/server/race.qc
@@ -156,13 +156,13 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e)
 		recorddifference = strcat(" ^1[+", TIME_ENCODED_TOSTRING(t - oldrec), "]");
 		bprint(mynetname, "^7 couldn't break their ", race_placeName(player_prevpos), " place record of ", TIME_ENCODED_TOSTRING(oldrec), recorddifference, "\n");
 		race_SendStatus(0, e); // "fail"
-		Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_FAIL, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_FAIL, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		return;
 	} else if (!newpos) { // no ranking, time worse than the worst ranked
 		recorddifference = strcat(" ^1[+", TIME_ENCODED_TOSTRING(t - race_readTime(GetMapname(), RANKINGS_CNT)), "]");
 		bprint(mynetname, "^7 couldn't break the ", race_placeName(RANKINGS_CNT), " place record of ", TIME_ENCODED_TOSTRING(race_readTime(GetMapname(), RANKINGS_CNT)), recorddifference, "\n");
 		race_SendStatus(0, e); // "fail"
-		Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_FAIL, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_FAIL, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		return;
 	}
 
@@ -201,22 +201,22 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e)
 			bprint(mynetname, "^1 broke ", oldrec_holder, "^1's 1st place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n"));
 		}
 		race_SendStatus(3, e); // "new server record"
-		Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RECORD, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+		Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RECORD, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 	} else {
 		if(newpos == player_prevpos) {
 			recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
 			bprint(mynetname, "^5 improved their ", race_placeName(newpos), " ^5place record with ", TIME_ENCODED_TOSTRING(t), recorddifference, "\n");
 			race_SendStatus(1, e); // "new time"
-			Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_TIME, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_TIME, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		} else if (oldrec == 0) {
 			bprint(mynetname, "^2 set the ", race_placeName(newpos), " ^2place record with ", TIME_ENCODED_TOSTRING(t), "\n");
 			race_SendStatus(2, e); // "new rank"
-			Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		} else {
 			recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
 			bprint(mynetname, "^2 broke ", oldrec_holder, "^2's ", race_placeName(newpos), " ^2place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n"));
 			race_SendStatus(2, e); // "new rank"
-			Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+			Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
 		}
 	}
 }
-- 
2.39.5