| 907 | } |
| 908 | |
| 909 | static cell_t sm_LogToGame(IPluginContext *pContext, const cell_t *params) |
| 910 | { |
| 911 | g_pSM->SetGlobalTarget(SOURCEMOD_SERVER_LANGUAGE); |
| 912 | |
| 913 | size_t len; |
| 914 | char buffer[1024]; |
| 915 | { |
| 916 | DetectExceptions eh(pContext); |
| 917 | len = g_pSM->FormatString(buffer, sizeof(buffer), pContext, params, 1); |
| 918 | if (eh.HasException()) |
| 919 | return 0; |
| 920 | } |
| 921 | |
| 922 | if (len >= sizeof(buffer)-2) |
| 923 | { |
| 924 | buffer[1022] = '\n'; |
| 925 | buffer[1023] = '\0'; |
| 926 | } else { |
| 927 | buffer[len++] = '\n'; |
| 928 | buffer[len] = '\0'; |
| 929 | } |
| 930 | |
| 931 | bridge->LogToGame(buffer); |
| 932 | |
| 933 | return 1; |
| 934 | } |
| 935 | |
| 936 | static cell_t sm_LogMessage(IPluginContext *pContext, const cell_t *params) |
| 937 | { |
nothing calls this directly
no test coverage detected