Skip to content

Commit

Permalink
Merge pull request #1 from NimaQu/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Sep 22, 2018
2 parents 058ad8f + 3316130 commit 228b7a8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Wiki已经启用,欢迎为此面板维护wiki

- 面板**原作者**

#####[hkserversolution](https://www.hkserversolution.com/cart.php)
##### [hkserversolution](https://www.hkserversolution.com/cart.php)
- Demo 演示站服务器赞助

##### [dumplin](https://github.com/dumplin233)
Expand Down Expand Up @@ -67,12 +67,11 @@ Wiki已经启用,欢迎为此面板维护wiki

- 添加 Telegram OAuth

[**SoDa**](https://github.com/SoDa-GitHub)
[**CGDF**](https://github.com/CGDF-GitHub)

- 一键国旗
- 财务报表
- xcat一键update
- 被墙检测
- 适配SSD

##### 还有所有被引用过代码的同学,以及所有提交过issue的同学。
Expand Down
12 changes: 11 additions & 1 deletion app/Utils/TelegramProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ private static function needbind_method($bot, $message, $command, $user, $reply_
$user->save();
$bot->sendMessage($message->getChat()->getId(), "签到成功!获得了 ".$traffic." MB 流量!", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
break;
case 'prpr':
$prpr = array('⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄', '(≧ ﹏ ≦)', '(*/ω\*)', 'ヽ(*。>Д<)o゜', '(つ ﹏ ⊂)', '( > < )');
$bot->sendMessage($message->getChat()->getId(), $prpr[mt_rand(0,5)], $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
break;
default:
$bot->sendMessage($message->getChat()->getId(), "???", $parseMode = null, $disablePreview = false, $replyToMessageId = $reply_to);
}
Expand Down Expand Up @@ -61,6 +65,9 @@ public static function telegram_process($bot, $message, $command)
case 'checkin':
TelegramProcess::needbind_method($bot, $message, $command, $user, $message->getMessageId());
break;
case 'prpr':
TelegramProcess::needbind_method($bot, $message, $command, $user, $message->getMessageId());
break;
case 'help':
$help_list = "命令列表:
/ping 获取群组ID
Expand Down Expand Up @@ -188,6 +195,9 @@ public static function telegram_process($bot, $message, $command)
case 'checkin':
TelegramProcess::needbind_method($bot, $message, $command, $user, $message->getMessageId());
break;
case 'prpr':
TelegramProcess::needbind_method($bot, $message, $command, $user, $message->getMessageId());
break;
case 'help':
$help_list_group = "命令列表:
/ping 获取群组ID
Expand Down Expand Up @@ -223,7 +233,7 @@ public static function process()
// or initialize with botan.io tracker api key
// $bot = new \TelegramBot\Api\Client('YOUR_BOT_API_TOKEN', 'YOUR_BOTAN_TRACKER_API_KEY');

$command_list = array("ping", "chat" ,"traffic", "help", "checkin");
$command_list = array("ping", "chat" ,"traffic", "help", "prpr", "checkin");
foreach ($command_list as $command) {
$bot->command($command, function ($message) use ($bot, $command) {
TelegramProcess::telegram_process($bot, $message, $command);
Expand Down
18 changes: 9 additions & 9 deletions config/.config.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,16 @@ $System_Config['zfbjk_key']='';
$System_Config['zfbjk_qrcodeurl']='';


//财务报告设置
//财务报告设置-------------------------------------------------------------------------------------------
$System_Config['finance_public']='false'; //财务报告是否向Telegram群公开


//国旗图标显示
//国旗图标显示--------------------------------------------------------------------------------------------
$System_Config['enable_flag']='false'; //启用该项之前务必先仔细阅读教程
$System_Config['flag_regex']='/.*?(?=\s)/'; //从站点全名中匹配国家/地区的正则表达式(php版)


//节点检测
//节点检测-----------------------------------------------------------------------------------------------
#GFW检测
$System_Config['enable_detect_gfw']='false';
$System_Config['detect_gfw_interval']='3600'; //检测间隔,单位:秒,低于推荐值会爆炸
Expand All @@ -239,8 +239,13 @@ $System_Config['detect_gfw_count']='3'; //尝试次数
#离线检测
$System_Config['enable_detect_offline']='true';

//V2Ray相关设置------------------------------------------------------------------------------------------
$System_Config['v2ray_port']='443'; //V2Ray端口
$System_Config['v2ray_protocol']='HTTP/2 + TLS'; //V2Ray协议
$System_Config['v2ray_alter_id']='32';
$System_Config['v2ray_level']='0';

//以下所有均为高级设置(一般不用改,反正估计也看不懂-------------------------------------------------------------
//以下所有均为高级设置(一般用不上,不用改---------------------------------------------------------------------
#杂项
$System_Config['enable_login_bind_ip']='false'; //是否将登陆线程和IP绑定
$System_Config['authDriver'] = 'cookie'; //不能更改此项
Expand Down Expand Up @@ -313,11 +318,6 @@ $System_Config['relay_insecure_mode']='false'; //强烈推荐不开启
#是否夹带统计代码,自己在 resources/views/{主题名} 下创建一个 analytics.tpl ,如果有必要就用 literal 界定符
$System_Config['enable_analytics_code']='false';

$System_Config['v2ray_port']='443';
$System_Config['v2ray_protocol']='HTTP/2 + TLS';
$System_Config['v2ray_alter_id']='32';
$System_Config['v2ray_level']='0';

#在套了CDN之后获取用户真实ip,如果您不知道这是什么,请不要乱动

if ( isset($_SERVER["HTTP_X_FORWARDED_FOR"]) ) {
Expand Down
Binary file modified storage/qqwry.dat
Binary file not shown.

0 comments on commit 228b7a8

Please sign in to comment.