Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

Commit 4b2f6ff

Browse files
author
Eldath
committed
RELEASE: v0.0.1b
1 parent c953666 commit 4b2f6ff

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Avalon v0.0.1a [![Build Status](https://travis-ci.org/Ray-Eldath/Avalon.svg?branch=master)](https://travis-ci.org/Ray-Eldath/Avalon) [![Build status](https://ci.appveyor.com/api/projects/status/wathx1whvj24y44p?style=flat-square)](https://ci.appveyor.com/project/Ray-Eldath/avalon) [![](https://jitpack.io/v/Ray-Eldath/Avalon.svg?style=flat-square)](https://jitpack.io/#Ray-Eldath/Avalon) [![GNU General Public License, version 2](https://img.shields.io/badge/license-GNU%202.0-yellow.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-2.0.html) [![Dependency Status](https://www.versioneye.com/user/projects/58f4645d9f10f8003f885743/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/58f4645d9f10f8003f885743) [![QQ群](https://img.shields.io/badge/QQ%E7%BE%A4-ProgramLeague-blue.svg?style=flat-square)](https://jq.qq.com/?_wv=1027&k=46GveNI)
1+
# Avalon v0.0.1b [![Build Status](https://travis-ci.org/Ray-Eldath/Avalon.svg?branch=master)](https://travis-ci.org/Ray-Eldath/Avalon) [![Build status](https://ci.appveyor.com/api/projects/status/wathx1whvj24y44p?style=flat-square)](https://ci.appveyor.com/project/Ray-Eldath/avalon) [![](https://jitpack.io/v/Ray-Eldath/Avalon.svg?style=flat-square)](https://jitpack.io/#Ray-Eldath/Avalon) [![GNU General Public License, version 2](https://img.shields.io/badge/license-GNU%202.0-yellow.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-2.0.html) [![Dependency Status](https://www.versioneye.com/user/projects/58f4645d9f10f8003f885743/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/58f4645d9f10f8003f885743) [![QQ群](https://img.shields.io/badge/QQ%E7%BE%A4-ProgramLeague-blue.svg?style=flat-square)](https://jq.qq.com/?_wv=1027&k=46GveNI)
22
A QQ avalon.group robot which based on Mojo-Webqq.
33

44
一个基于[Mojo-Webqq](https://github.com/sjdy521/Mojo-Webqq)的QQ群机器人。

bin/Mojo-WebQQ.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
# $client->load("UploadQRcode");
1414
$client->load("ShowQRcode");
1515
$client->load("Openqq",data=>{
16-
listen => [ { host => $host, port => $port } ],
17-
post_api => $post_api,
18-
post_event => 0, #可选,是否上报事件,为了向后兼容性,默认值为1
19-
# post_event_list => ['login','stop','state_change','input_qrcode'],
16+
listen => [ { host => $host, port => $port } ],
17+
post_api => $post_api,
18+
post_event => 0, #可选,是否上报事件,为了向后兼容性,默认值为1
19+
post_event_list => [ 'receive_message' ],
2020
});
2121

2222
$client->run();

src/main/java/avalon/group/Version.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public String getHelpMessage() {
3737

3838
@Override
3939
public Pattern getKeyWordRegex() {
40-
return Pattern.compile("avalon version|avalon 版本");
40+
return Pattern.compile("avalon version|avalon 版本|avalon about");
4141
}
4242
}

src/main/java/avalon/main/InstallChecker.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,18 @@ static boolean check() {
3838
prefix + "Mojo-Weixin.pl\""), "from perl:Mojo-Weixin ");
3939
wechatHolder.start();
4040
Process wechat = wechatHolder.getProcess();
41+
if (wechat == null) {
42+
logger.error("Fatal error: Mojo-Weixin not run currently!");
43+
System.exit(-3);
44+
}
4145
ProcessHolder webqqHolder = new ProcessHolder(Runtime.getRuntime().exec(
4246
prefix + "Mojo-Webqq.pl\""), "from perl:Mojo-Webqq ");
4347
webqqHolder.start();
4448
Process webqq = webqqHolder.getProcess();
49+
if (webqq == null) {
50+
logger.error("Fatal error: Mojo-Webqq not run currently!");
51+
System.exit(-3);
52+
}
4553
if (!checkProcess(wechat)) {
4654
logger.error("Can't locate Mojo-Weixin! Please sure you're install Mojo-Webqq " +
4755
"with the steps in https://github.com/sjdy521/Mojo-Weixin#安装方法 !");

src/main/java/avalon/main/MainServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void run() {
6363
File[] files = new File(System.getProperty("java.io.tmpdir")).listFiles();
6464
if (files != null)
6565
Arrays.stream(files).filter(e -> e.getName().trim().matches("mojo_")).forEach(File::delete);
66-
logger.info("Mojo-Webqq files cleaned.");
66+
logger.info("Mojo-Webqq files and Mojo-Weixin files cleaned.");
6767
}
6868
}
6969

src/main/java/avalon/tool/pool/ConstantPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private Version() {
6565
webqq = "UNKNOWN";
6666
}
6767
try {
68-
wechat = "v" + ((JSONObject) new JSONTokener(
68+
wechat = ((JSONObject) new JSONTokener(
6969
new URL(Address.wechat + "/openwx/get_client_info")
7070
.openStream()).nextValue()).getString("version");
7171
} catch (IOException ignore) {

0 commit comments

Comments
 (0)