Second Pust, Big Change

This commit is contained in:
Denny Dai
2015-05-30 00:20:55 +08:00
parent 3667e84a00
commit 9ab379e3c2
15 changed files with 346 additions and 122 deletions
+16
View File
@@ -0,0 +1,16 @@
<?php
//PluginList("trans", "翻译");
if (preg_match("/^".TAG."trans (.*)$/", $_GET['text'], $matches)) {
$matches = explode(" ", $matches[1], 2);
if (!isset($matches[1])) {
$to = "zh";
$text = $matches[0];
}else{
$to = $matches[0];
$text = $matches[1];
}
$trans = file_get_contents("http://tool.dennx.com/translate/?text=".$text."&to=".$to);
$msg = "翻译结果: ".$trans;
$BOT->exec("msg ".$from." ".escapeString($msg));
}