-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from SOBotics/develop
merged release to the wrong branch again
- Loading branch information
Showing
25 changed files
with
329 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/OptedInUsersList.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,4 +87,9 @@ public String name() { | |
return "check"; | ||
} | ||
|
||
@Override | ||
public boolean availableInStandby() { | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,9 @@ public String name() { | |
return "clear"; | ||
} | ||
|
||
@Override | ||
public boolean availableInStandby() { | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package org.sobotics.guttenberg.commands; | ||
|
||
import org.sobotics.guttenberg.services.RunnerService; | ||
import org.sobotics.guttenberg.utils.CommandUtils; | ||
|
||
import fr.tunaki.stackoverflow.chat.Message; | ||
import fr.tunaki.stackoverflow.chat.Room; | ||
import fr.tunaki.stackoverflow.chat.User; | ||
|
||
public class Kill implements SpecialCommand { | ||
|
||
private final Message message; | ||
|
||
public Kill(Message message) { | ||
this.message = message; | ||
} | ||
|
||
@Override | ||
public boolean validate() { | ||
return CommandUtils.checkForCommand(message.getPlainContent(), "kill"); | ||
} | ||
|
||
@Override | ||
public void execute(Room room, RunnerService instance) { | ||
User user = message.getUser(); | ||
|
||
if (!user.isModerator() && !user.isRoomOwner()) { | ||
room.replyTo(message.getId(), "Sorry, but only room-owners and moderators can use this command"); | ||
return; | ||
} | ||
|
||
System.out.println("KILLED BY "+user.getName()); | ||
System.exit(0); | ||
} | ||
|
||
@Override | ||
public String description() { | ||
return "Kills the currently active instance"; | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return "kill"; | ||
} | ||
|
||
@Override | ||
public boolean availableInStandby() { | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,4 +82,9 @@ public String name() { | |
return "opt-in"; | ||
} | ||
|
||
@Override | ||
public boolean availableInStandby() { | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,4 +55,9 @@ public String name() { | |
return "opt-out"; | ||
} | ||
|
||
@Override | ||
public boolean availableInStandby() { | ||
return false; | ||
} | ||
|
||
} |
Oops, something went wrong.