From 6fae1811d99571651b2f60988da3b645b441c52b Mon Sep 17 00:00:00 2001 From: BotoX Date: Tue, 24 Jan 2017 00:14:35 +0100 Subject: [PATCH] Added client id to MultiTargetFilter forward. --- core/logic/smn_players.cpp | 1 + plugins/include/commandfilters.inc | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/logic/smn_players.cpp b/core/logic/smn_players.cpp index 574ec6da..b288f09b 100644 --- a/core/logic/smn_players.cpp +++ b/core/logic/smn_players.cpp @@ -141,6 +141,7 @@ public: //ICommandTargetProcessor smtf->fun->PushString(info->pattern); smtf->fun->PushCell(ahc.getClone()); + smtf->fun->PushCell(info->admin); cell_t result = 0; if (smtf->fun->Execute(&result) != SP_ERROR_NONE || !result) return false; diff --git a/plugins/include/commandfilters.inc b/plugins/include/commandfilters.inc index 67e1e5c7..efd49969 100644 --- a/plugins/include/commandfilters.inc +++ b/plugins/include/commandfilters.inc @@ -137,9 +137,13 @@ stock void ReplyToTargetError(int client, int reason) * * @param pattern Pattern name. * @param clients Array to fill with unique, valid client indexes. + * @param client Client that triggered this filter. * @return True if pattern was recognized, false otherwise. */ -typedef MultiTargetFilter = function bool (const char[] pattern, Handle clients); +typeset MultiTargetFilter { + function bool (const char[] pattern, Handle clients); + function bool (const char[] pattern, Handle clients, int client); +} /** * Adds a multi-target filter function for ProcessTargetString().