]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also force a check to see if there is even a string for info messages
authorSamual Lenks <samual@xonotic.org>
Sat, 15 Dec 2012 11:11:56 +0000 (06:11 -0500)
committerSamual Lenks <samual@xonotic.org>
Sat, 15 Dec 2012 11:11:56 +0000 (06:11 -0500)
qcsrc/common/notifications.qc

index ba9b49ab986f2e9262200b6f2125d3f0b614b1b6..fe1aadce23f5a1545d63a276d676b178ad5eb86d 100644 (file)
@@ -511,6 +511,12 @@ string normal_or_gentle(string normal, string gentle)
        #endif
 }
 
+float notif_checkstring(string input)
+{
+       if not(input == "") { return TRUE; }
+       else { return FALSE; }
+}
+
 float notif_stringcount(string s1, string s2)
 {
        float stringcount;
@@ -677,7 +683,7 @@ void Local_Notification(float net_type, float net_name, string s1, string s2, fl
                        #define MSG_INFO_NOTIF(name,strnum,flnum,args,hudargs,icon,normal,gentle) \
                                { NOTIF_MATCH(name, net_name) CHECK_AUTOCVAR(name) \
                                { \
-                                       print(sprintf(CCR(normal_or_gentle(normal, gentle)), args)); \
+                                       if(notif_checkstring(normal)) { print(sprintf(CCR(normal_or_gentle(normal, gentle)), args)); } \
                                        if(strtolower(icon) != "") { HUD_Notify_Push(icon, hudargs); } \
                                } }
                        MSG_INFO_NOTIFICATIONS