Currently you can warn a user either for a post or give a warning straight from MCP, hence the two events.
-
Identifier: core.mcp_warn_post_after
Location: phpBB/includes/mcp/mcp_warn.php, after L277
Parameters: user_id, username, user_warnings, post_id, forum_id notify
Explantion: -
Identifier: core.mcp_warn_user_after
Location: phpBB/includes/mcp/mcp_warn.php, after L389
Parameters: user_id, username, user_warnings, notify
Explantion:
Notes: The parameter user_warnings is not consistent with an event named *_after because it is updated by the function than inserts the warning in the db . I included it just to avoid an extra query in users table, but maybe it should be omitted?
The above events could have their companions named *_before. The main reason for the *_before events would be to change the message that you send when you warn a user. In that case the parameter user_warnings will be consistent. Those events could be used by a mod that creates pre defined warning reasons like this one for example .
-
Identifier: core.mcp_warn_post_before
Location: phpBB/includes/mcp/mcp_warn.php, before [url=hhttps://github.com/phpbb/phpbb/blob/develop-ascraeus/phpBB/includes/mcp/mcp_warn.php#L276]L276[/url]
Parameters: user_id, username, user_warnings, warning, post_id, forum_id, notify
Explantion: -
Identifier: core.mcp_warn_user_before
Location: phpBB/includes/mcp/mcp_warn.php, before L388
Parameters: user_id, username, user_warnings, warning, notify
Explantion: