Commit cd1207a5 authored by alexm98's avatar alexm98

Modifications

parent 29354338
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
e
\ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -2,7 +2,6 @@
class Connection{
private $socket;
public $config;
private $timer;
private function __construct(){
// set_time_limit(0);
......@@ -74,7 +73,6 @@
if($currentmsg->getSender() != 'PING' && ISSET($currentmsg->message) && @$currentmsg->message[0] == '!'){
$cmd = explode(' ',substr($currentmsg->message,1));
// create class with optional param (wolfram,cleverbot) that needs user input
if(count($cmd) > 1){
$cmd[0] = ucfirst($cmd[0]);
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -45,19 +45,20 @@
@$descr = $html->find("meta[name='description']", 0,true)->content;
@$title = $html->find('title',0)->innertext;
$descr = html_entity_decode($descr,ENT_QUOTES | ENT_HTML5);
$descr = html_entity_decode($descr, ENT_QUOTES | ENT_XML1, 'UTF-8');
$title = html_entity_decode($title, ENT_QUOTES | ENT_XML1, 'UTF-8');
$header = get_headers($link);
$content_type = explode(';',substr(array_values(preg_grep('/(Content-Type:)/',$header))[0],14),2)[0];
if($content_type == 'text/html'){
if($title != '' && $descr != ''){
$conn->sendData($channel,$title.' - '.$descr);
$conn->sendData($channel,'02[ '.$title.' - '.$descr.' ]');
}
else if($descr == ''){
$conn->sendData($channel,$title);
$conn->sendData($channel,'02[ '.$title.' ]');
}
else if($title == ''){
$conn->sendData($channel,$descr);
$conn->sendData($channel,'02[ '.$descr.' ]');
}
}
......
File mode changed from 100644 to 100755
......@@ -46,8 +46,9 @@
// also removes non-printable characters with the preg_replace.
function escapeSimpleAndDoubleSlashes($msg){
$message = addslashes(rtrim($msg));
// $message = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $message);
// UTF-8
$message = preg_replace('/[\x00-\x1F\x7F]/u', '', $message);
// $message = preg_replace('/[\x00-\x1F\x7F]/u', '', $message);
return $message;
}
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment