File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed
src/main/java/org/sobotics/guttenberg/commands Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 22
22
23
23
<groupId >de.felixsfd.stackoverflow</groupId >
24
24
<artifactId >guttenberg</artifactId >
25
- <version >1.2.4 </version >
25
+ <version >1.2.5 </version >
26
26
27
27
<dependencies >
28
28
<dependency >
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (C) 2019 SOBotics (https://sobotics.org) and contributors in GitHub
2
+ * Copyright (C) 2019 SOBotics (https://sobotics.org) and contributors on GitHub
3
3
*
4
4
* This program is free software: you can redistribute it and/or modify
5
5
* it under the terms of the GNU General Public License as published by
@@ -86,6 +86,14 @@ public void execute(Room room, RunnerService instance) {
86
86
}
87
87
88
88
Properties prop = Guttenberg .getLoginProperties ();
89
+ Properties generalProp = Guttenberg .getGeneralProperties ();
90
+ double reportThreshold ;
91
+ try {
92
+ reportThreshold = Double .parseDouble (generalProp .getProperty ("checkuser_minimumScore" , "0.80" ));
93
+ } catch (NumberFormatException e ) {
94
+ reportThreshold = 0.8 ;
95
+ }
96
+
89
97
Post post = null ;
90
98
91
99
LOGGER .info ("Executing command on user id: " + postId );
@@ -135,7 +143,7 @@ public void execute(Room room, RunnerService instance) {
135
143
sendChatMessage (room , message );
136
144
137
145
for (PostMatch postMatch : matches ) {
138
- if (postMatch .getTotalScore () > 0.75 ) {
146
+ if (postMatch .getTotalScore () > reportThreshold ) {
139
147
outputDirectHit (room , postMatch );
140
148
}
141
149
}
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (C) 2019 SOBotics (https://sobotics.org) and contributors in GitHub
2
+ * Copyright (C) 2019 SOBotics (https://sobotics.org) and contributors on GitHub
3
3
*
4
4
* This program is free software: you can redistribute it and/or modify
5
5
* it under the terms of the GNU General Public License as published by
@@ -83,6 +83,14 @@ public void execute(Room room, RunnerService instance) {
83
83
return ;
84
84
}
85
85
Properties prop = Guttenberg .getLoginProperties ();
86
+ Properties generalProp = Guttenberg .getGeneralProperties ();
87
+ double reportThreshold ;
88
+ try {
89
+ reportThreshold = Double .parseDouble (generalProp .getProperty ("checkuser_minimumScore" , "0.80" ));
90
+ } catch (NumberFormatException e ) {
91
+ reportThreshold = 0.8 ;
92
+ }
93
+
86
94
LOGGER .info ("Executing command on user id: " + userId );
87
95
88
96
boolean log = cmd .contains ("-log" );
@@ -158,7 +166,7 @@ public void execute(Room room, RunnerService instance) {
158
166
}
159
167
160
168
for (PostMatch postMatch : matches ) {
161
- if (postMatch .getTotalScore () > 0.75 ) {
169
+ if (postMatch .getTotalScore () > reportThreshold ) {
162
170
outputDirectHit (room , postMatch );
163
171
}
164
172
}
You can’t perform that action at this time.
0 commit comments