| 399 | } |
| 400 | |
| 401 | static cell_t sm_SetEventString(IPluginContext *pContext, const cell_t *params) |
| 402 | { |
| 403 | Handle_t hndl = static_cast<Handle_t>(params[1]); |
| 404 | HandleError err; |
| 405 | EventInfo *pInfo; |
| 406 | HandleSecurity sec(pContext->GetIdentity(), g_pCoreIdent); |
| 407 | |
| 408 | if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), &sec, (void **)&pInfo)) |
| 409 | != HandleError_None) |
| 410 | { |
| 411 | return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err); |
| 412 | } |
| 413 | |
| 414 | char *key, *value; |
| 415 | pContext->LocalToString(params[2], &key); |
| 416 | pContext->LocalToString(params[3], &value); |
| 417 | |
| 418 | pInfo->pEvent->SetString(key, value); |
| 419 | |
| 420 | return 1; |
| 421 | } |
| 422 | |
| 423 | static cell_t sm_SetEventBroadcast(IPluginContext *pContext, const cell_t *params) |
| 424 | { |
nothing calls this directly
no test coverage detected