]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/command/generic.qc
Replace usages of mod() with the operator %
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / command / generic.qc
index 1c32c86befbeefdfd74f35f48608a396fdeb1234..743793bad02db23bbfc88e5bbf211fdedc9a7b50 100644 (file)
@@ -28,7 +28,7 @@ void Curl_URI_Get_Callback(float id, float status, string data)
        do_cvar = curl_uri_get_cvar[i];
        if(status != 0)
        {
-               print(sprintf(_("error: status is %d\n"), status));
+               dprintf("error: status is %d\n", status);
                if(do_cvar)
                        strunzone(do_cvar);
                return;
@@ -153,7 +153,7 @@ void GenericCommand_qc_curl(float request, float argc)
                        {
                                curl_uri_get_exec[curl_uri_get_pos] = do_exec;
                                curl_uri_get_cvar[curl_uri_get_pos] = do_cvar;
-                               curl_uri_get_pos = mod(curl_uri_get_pos + 1, URI_GET_CURL_END - URI_GET_CURL + 1);
+                               curl_uri_get_pos = (curl_uri_get_pos + 1) % (URI_GET_CURL_END - URI_GET_CURL + 1);
                        }
                        else
                                print(_("error creating curl handle\n"));
@@ -252,12 +252,12 @@ void GenericCommand_dumpnotifs(float request)
                        if(fh >= 0)
                        {
                                Dump_Notifications(fh, alsoprint);
-                               print(sprintf("Dumping notifications... File located in ^2data/data/%s^7.\n", filename));
+                               printf("Dumping notifications... File located in ^2data/data/%s^7.\n", filename);
                                fclose(fh);
                        }
                        else
                        {
-                               print(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+                               printf("^1Error: ^7Could not open file '%s'!\n", filename);
                        }
                        #else
                        print(_("Notification dump command only works with cl_cmd and sv_cmd.\n"));
@@ -486,7 +486,7 @@ void GenericCommand_restartnotifs(float request)
                case CMD_REQUEST_COMMAND:
                {
                        #ifndef MENUQC
-                       print(sprintf(
+                       printf(
                                strcat(
                                        "Restart_Notifications(): Restarting %d notifications... ",
                                        "Counts: MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d, MSG_CHOICE = %d\n"
@@ -503,7 +503,7 @@ void GenericCommand_restartnotifs(float request)
                                NOTIF_CENTER_COUNT,
                                NOTIF_MULTI_COUNT,
                                NOTIF_CHOICE_COUNT
-                       ));
+                       );
                        Destroy_All_Notifications();
                        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
                        #else