Skip to content

Commit

Permalink
Adding mod
Browse files Browse the repository at this point in the history
  • Loading branch information
domhauton committed May 23, 2016
1 parent 70c9c17 commit 207d659
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/java/BotController.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private String setVariables(String command){
*/
private String bLWord(final String word){
final String lowerCaseWord = word.toLowerCase();
if(lowerCaseWord.length()<3) return "Word not long enough.";
if(lowerCaseWord.length()<1) return "Word not long enough.";
if(blockedWords.contains(lowerCaseWord))
return lowerCaseWord + " already on blacklist.";
blockedWords.add(lowerCaseWord);
Expand Down Expand Up @@ -521,7 +521,7 @@ private void loadSettings() {
Stream.of( "slick_pc", "linustech", "luke_lafr")
.map(TwitchUser::new)
.forEach(user -> channelManager.setPermission(user, UserPermission.ChannelOwner));
Stream.of( "nicklmg", "lttghost", "antvenom" )
Stream.of( "nicklmg", "lttghost", "antvenom", "caltane" )
.map(TwitchUser::new)
.forEach(user -> channelManager.setPermission(user, UserPermission.BotAdmin));
Stream.of( "airdeano", "alpenwasser", "blade_of_grass", "colonel_mortis", "daveholla", "dezeltheintern", "dvoulcaris", "ecs_community", "ericlee30", "foxhound590", "glenwing", "ixi_your_face", "linusbottips", "looneyschnitzel", "ltt_bot", "mg2r", "prolemur", "rizenfrmtheashes", "str_mape", "wh1skers", "whaler_99", "windspeed36", "woodenmarker", "wrefur" )
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/MessageRepeater.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void start() {

private void sendRandomMessage() {
if(on){
final ImmutableList<String> messageCopy = ImmutableList.copyOf(messages);
ImmutableList<String> messageCopy = ImmutableList.copyOf(messages);
Integer indexOfMessage = randomNumberGenerator.nextInt(messageCopy.size());
String messageToSend = messageCopy.get(indexOfMessage);
log.info("Sending repeated message: {}", messageToSend);
Expand All @@ -63,11 +63,7 @@ public void setFrequency(int freq) {
}

public void toggleState() {
if (on) {
on = false;
} else {
on = true;
}
on = !on;
}

public void clearAll() {
Expand Down

0 comments on commit 207d659

Please sign in to comment.