2015-05-30 00:20:55 +08:00
|
|
|
<?php
|
2015-07-08 16:13:12 +08:00
|
|
|
$BOT = new Base('unix:///tmp/tg.sck');
|
2015-06-04 16:15:34 +08: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-30 00:20:55 +08:00
|
|
|
|
2015-06-26 14:14:14 +08:00
|
|
|
$text = $_GET['text'];
|
2015-05-30 00:20:55 +08:00
|
|
|
}
|