Commit 1336918 1 parent 7af4949 commit 1336918 Copy full SHA for 1336918
File tree 1 file changed +10
-17
lines changed
plumbot-bukkit/src/main/java/me/regadpole/plumbot/event/qq
1 file changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -238,23 +238,6 @@ public void onGroupMessageReceive(GroupMessage e){
238
238
}
239
239
return ;
240
240
}
241
-
242
- pattern = Pattern .compile (Prefix +".*" );
243
- matcher = pattern .matcher (msg );
244
- if (matcher .find ()){
245
- if (!Config .SDC ()){
246
- return ;
247
- }
248
- String scmd = matcher .group ().replace (Prefix +"" , "" );
249
- String gcmd = Config .getCommandsYaml ().getString ("Admin." +scmd );
250
- if (gcmd !=null ) {
251
- PlumBot .getScheduler ().runTaskAsynchronously (()->{
252
- String sendCqMsg = ServerManager .sendCmd (gcmd , true );
253
- bot .sendCQMsg (true , sendCqMsg , groupID );
254
- });
255
- return ;
256
- }
257
- }
258
241
}
259
242
260
243
if (msg .equals (Prefix +"帮助" )) {
@@ -406,6 +389,16 @@ public void onGroupMessageReceive(GroupMessage e){
406
389
return ;
407
390
}
408
391
String scmd = matcher .group ().replace (Prefix +"" , "" );
392
+ if (Config .getAdmins ().contains (senderID )) {
393
+ String gcmd = Config .getCommandsYaml ().getString ("Admin." + scmd );
394
+ if (gcmd != null ) {
395
+ PlumBot .getScheduler ().runTaskAsynchronously (() -> {
396
+ String sendCqMsg = ServerManager .sendCmd (gcmd , true );
397
+ bot .sendCQMsg (true , sendCqMsg , groupID );
398
+ });
399
+ return ;
400
+ }
401
+ }
409
402
String gcmd = Config .getCommandsYaml ().getString ("User." +scmd );
410
403
if (gcmd !=null ) {
411
404
PlumBot .getScheduler ().runTaskAsynchronously (()->{
You can’t perform that action at this time.
0 commit comments