$channel,
'username' => $username,
'icon_emoji' => $icon,
'text' => $message,
)
);
$ch = curl_init('https://'.$RocketChatServer.'/hooks/'.$RocketChatHook);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
curl_close($ch);
return $result;
} else {
echo ''.$message.'
';
return true;
}
}
function shardLockAccess() {
global $ShardId;
@queryShard('su', 'rsm.setWSState '. $ShardId .' RESTRICTED ""');
}