% is for comment, otherwise it's a topic entry

This commit is contained in:
Nicolas VINOT 2011-09-05 10:42:07 +02:00
parent 3bb095bef8
commit b1ac7caadd

View File

@ -45,10 +45,10 @@ public class Bot extends PircBot {
this.startCollectiveTopic(sender, message);
} else if (message.startsWith("#")) {
this.startIndividualTopic(sender, message);
} else if (message.startsWith("%")) {
this.addToCurrentTopic(raw);
} else if (message.startsWith("!")) {
this.handleCommand(message.replaceFirst("!", ""));
this.handleCommand(message);
} else if (!message.startsWith("%")) {
this.addToCurrentTopic(raw);
}
}
@ -58,7 +58,8 @@ public class Bot extends PircBot {
}
}
private void handleCommand(final String message) {
private void handleCommand(String message) {
message = message.replaceFirst("!", "");
if (message.startsWith("courant")) {
if (this.currentTopic != null) {
this.sendMessage(this.channel, "Topic courant : "