Skip to content

Instantly share code, notes, and snippets.

View toxi22's full-sized avatar

Roman toxi22

View GitHub Profile
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
while
(
(
((Now >= T['11:50:00']) and (Now <= T['11:52:00'])) and
((DayOfWeek(NOW) = Monday) or (DayOfWeek(NOW) = Tuesday) or (DayOfWeek(NOW) = Wednesday) or (DayOfWeek(NOW) = Thursday) or (DayOfWeek(NOW) = Friday)) and (Flag = 1)
) or
(
((Now >= T['12:20:00']) and (Now <= T['12:22:00'])) and
((DayOfWeek(NOW) = Monday) or (DayOfWeek(NOW) = Tuesday) or (DayOfWeek(NOW) = Wednesday) or (DayOfWeek(NOW) = Thursday) or (DayOfWeek(NOW) = Friday) and (Flag = 1))
while ((Now >= T['12:00:00']) and (Now <= T['12:35:00']) and (Flag = 32)) do
begin
// Ab hier alles im While
Liner := CAT['bett_temperaturen'].ChooseSong(smRandom, NoRules);
Aux2.Volume := 40;
Aux2.Queuesong(Liner)
PAL.WaitForTime(StartTime1230);
Queue.Clear;
Cat['Popmusik_Poprock'].QueueTop(smRandom, NoRules);
Cat['Programmpromos'].QueueTop(smRandom, NoRules);
@toxi22
toxi22 / sync_uablacklist
Created May 26, 2018 23:37 — forked from anonymous/sync_uablacklist
Mikrotik script to sync address list with uablacklist.net
:local apiPath "https://uablacklist.net/subnets_mikrotik.txt"
:local tempFile "uablacklist.txt"
:local listName "uablacklist"
/log info "fetching UA blacklist registry ($apiPath)..."
:put "fetching UA blacklist registry ($apiPath)..."
/tool fetch url=$apiPath dst-path=$tempFile
/log info "removing existing $listName..."
:put "removing existing $listName..."