Skip to content
Permalink
Browse files
Merge pull request #771 from Alexandr-logrus/alpha
Alpha
  • Loading branch information
sergejey committed Jul 8, 2020
2 parents 5b109b3 + 051ed08 commit 8b4d470e9d3f0b4f1c4f9db57a547866757de1ef
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 79 deletions.

This file was deleted.

@@ -189,8 +189,8 @@ function say($ph, $level = 0, $member_id = 0, $source = '')
}


if ($level >= (int)getGlobal('minMsgLevel') && !$ignoreVoice && !$member_id) {
if (!defined('SETTINGS_SPEAK_SIGNAL') || SETTINGS_SPEAK_SIGNAL == '1') {
if (!defined('SETTINGS_SPEAK_SIGNAL') || SETTINGS_SPEAK_SIGNAL == '1') {
if ($level >= (int)getGlobal('minMsgLevel') && !$member_id) { // && !$ignoreVoice
$passed = time() - (int)getGlobal('lastSayTime');
if ($passed > 20) {
playSound('dingdong', 1, $level);
@@ -547,44 +547,6 @@ function recognizeTime($text, &$newText)
return $result;
}


/**
* Summary of registerEvent
* @param mixed $eventName Event name
* @param mixed $details Details (default '')
* @param mixed $expire_in Expire time (default 365)
* @return mixed
*/
function registerEvent($eventName, $details = '', $expire_in = 0)
{
include_once(DIR_MODULES . 'events/events.class.php');
$events = new events();
return $events->registerEvent($eventName, $details, $expire_in);
}

/**
* Summary of registeredEventTime
* @param mixed $eventName Event name
* @return mixed
*/
function registeredEventTime($eventName)
{
$sqlQuery = "SELECT ID, UNIX_TIMESTAMP(ADDED) AS TM
FROM events
WHERE EVENT_TYPE = 'system'
AND EVENT_NAME = '" . DBSafe($eventName) . "'
ORDER BY ADDED DESC
LIMIT 1";

$rec = SQLSelectOne($sqlQuery);

if ($rec['ID']) {
return $rec['TM'];
} else {
return -1;
}
}

/**
* Summary of getRandomLine
* @param mixed $filename File name
@@ -0,0 +1,52 @@
<?php

/**
* Summary of registerEvent
* @param mixed $eventName Event name
* @param mixed $details Details (default '')
* @param mixed $expire_in Expire time (default 365)
* @return mixed
*/
function registerEvent($eventName, $details = '', $expire_in = 0)
{
include_once(DIR_MODULES . 'events/events.class.php');
$events = new events();
return $events->registerEvent($eventName, $details, $expire_in);
}

/**
* Summary of registeredEventTime
* @param mixed $eventName Event name
* @return mixed
*/
function registeredEventTime($eventName)
{
$sqlQuery = "SELECT ID, UNIX_TIMESTAMP(ADDED) AS TM
FROM events
WHERE EVENT_TYPE = 'system'
AND EVENT_NAME = '" . DBSafe($eventName) . "'
ORDER BY ADDED DESC
LIMIT 1";

$rec = SQLSelectOne($sqlQuery);

if ($rec['ID']) {
return $rec['TM'];
} else {
return -1;
}
}

/**
* Summary of registeredEventDetails
* @param mixed $eventName Event name
* @return mixed
*/
function registeredEventDetails($eventName) {
$event = SQLSelectOne("SELECT DETAILS FROM events WHERE EVENT_NAME='" . $eventName . "'");
if (is_array($event)) {
return $event['DETAILS'];
} else {
return false;
}
}
@@ -9,7 +9,7 @@
* @version 1.3
*/

if (defined('HOME_NETWORK') && HOME_NETWORK != '' && !isset($argv[0]) && (!(preg_match('/\/gps\.php/is', $_SERVER['REQUEST_URI']) || preg_match('/\/trackme\.php/is', $_SERVER['REQUEST_URI']) || preg_match('/\/btraced\.php/is', $_SERVER['REQUEST_URI'])) || $_REQUEST['op'] != '') && !preg_match('/\/rss\.php/is', $_SERVER['REQUEST_URI']) && 1) {
if (defined('HOME_NETWORK') && HOME_NETWORK != '' && !isset($argv[0]) && (!(preg_match('/\/gps\.php/is', $_SERVER['REQUEST_URI']) || preg_match('/\/trackme\.php/is', $_SERVER['REQUEST_URI']) || preg_match('/\/btraced\.php/is', $_SERVER['REQUEST_URI']) || preg_match('/\/rss\.php/is', $_SERVER['REQUEST_URI'])) || $_REQUEST['op'] != '')) {
$p = preg_quote(HOME_NETWORK);
$p = str_replace('\*', '\d+?', $p);
$p = str_replace(',', ' ', $p);

0 comments on commit 8b4d470

Please sign in to comment.