Framework

This commit is contained in:
2018-12-19 21:29:53 +00:00
parent 0976e17030
commit 27944ac132
5 changed files with 54 additions and 6 deletions

View File

@@ -10,7 +10,24 @@ define("INTER_ROOM", 111213);
// randomorg($start,$end);
function reply_user($room_id, $msgid, $message) : string
require 'Handlers.php';
$handlers = array(
new TestHandler()
);
function reply_user($room_id, $msgid, $message)
{
return $msgid;
// Placeholder Globals
global $userid;
global $room_lang;
global $is_admin;
global $handlers;
foreach ($handlers as $handler) {
if($handler->CanHandle($room_id, $msgid, $message)) {
return $handler->Handle($room_id, $msgid, $message);
}
}
return ;
}