Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolled back that function to 7c8db98, which was the working version. #153

Merged
merged 6 commits into from
Feb 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In [this file](feedback.md), we collected information on how we react to Guttenb

## Accuracy

We are aleady collecting data with [CopyPastor](https://github.com/SOBotics/CopyPastor) to provide statisctics, but since there are not that many posts to report, it will take a while until we have enough data.
We are already collecting data with [CopyPastor](https://github.com/SOBotics/CopyPastor) to provide statisctics, but since there are not that many posts to report, it will take a while until we have enough data.


[1]: http://chat.stackoverflow.com/rooms/111347/sobotics
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>de.felixsfd.stackoverflow</groupId>
<artifactId>guttenberg</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,22 @@ public void mention(Room room, PingMessageEvent event, boolean isReply, RunnerSe
for (SpecialCommand command : commands) {
if (command.validate()) {
boolean standbyMode = PingService.standby.get();
if (command instanceof CheckUser){
User user = event.getUser().get();
if (!user.isModerator() && !user.isRoomOwner()){
room.replyTo(message.getId(), "This command can only be executed by RO or moderator");
return;

if (standbyMode == true) {
if (command.availableInStandby() == true) {
command.execute(room, instance);
}
}
if (standbyMode && command.availableInStandby()) {
command.execute(room, instance);
} else {
if (command instanceof CheckUser){
User user = event.getUser().get();
if (!user.isModerator() && !user.isRoomOwner()){
room.replyTo(message.getId(), "This command can only be executed by RO or moderator");
return;
}
}
// Ideally this should be implemented in the validate method of the checkuser command.
command.execute(room, instance);
}
//maybe return?, is the idea that multiple commands can match?
}
}
}
Expand Down