From bfe83babcec64f1a956759c745daa00d321ca4c5 Mon Sep 17 00:00:00 2001 From: yutou Date: Thu, 15 Apr 2021 13:45:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E5=81=9C=E6=AD=A2=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/nas/utils/QQBotManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/yutou/nas/utils/QQBotManager.java b/src/main/java/com/yutou/nas/utils/QQBotManager.java index ee160f6..0053c77 100644 --- a/src/main/java/com/yutou/nas/utils/QQBotManager.java +++ b/src/main/java/com/yutou/nas/utils/QQBotManager.java @@ -30,6 +30,7 @@ public class QQBotManager { private static class QQCommands { private final static String QQ_HELP = "!help"; + private final static String QQ_SYSTEM_STOP = "!stop"; private final static String QQ_UPDATE_IP = "!更新ip"; private final static String QQ_GET_IP = "!ip"; private final static String QQ_OPEN_PC = "!开机"; @@ -255,7 +256,11 @@ public class QQBotManager { case QQCommands.QQ_BT_RELOAD: BTDownloadManager.getInstance().start(); break; - + case QQCommands.QQ_SYSTEM_STOP: + getInstance().sendMessage("正在停止服务"); + System.out.println("结束进程"); + System.exit(0); + break; case QQCommands.QQ_HELP: StringBuilder builder = new StringBuilder(); for (Field field : QQCommands.class.getDeclaredFields()) {