D-Bot/classes/Telegram/init.php

20 lines
379 B
PHP
Raw Normal View History

2015-05-29 11:20:55 -05:00
<?php
2015-07-08 03:13:12 -05:00
$BOT = new Base('unix:///tmp/tg.sck');
2015-06-04 03:15:34 -05:00
if($_GET['from'] != escapePeer(BOT_NAME)){
//is group?
if ($_GET['to'] == escapePeer(BOT_NAME)) {
$isgroup = false;
}else{
$isgroup = true;
}
//reply to...
if ($isgroup) {
$from = $_GET['to'];
}else{
$from = $_GET['from'];
$BOT->exec("msg ".escapePeer(OWNER_NAME)." ".json_encode($_GET));
}
2015-05-29 11:20:55 -05:00
2015-06-26 01:14:14 -05:00
$text = $_GET['text'];
2015-05-29 11:20:55 -05:00
}