% is for comment, otherwise it's a topic entry
This commit is contained in:
parent
3bb095bef8
commit
b1ac7caadd
1 changed files with 5 additions and 4 deletions
|
@ -45,10 +45,10 @@ public class Bot extends PircBot {
|
||||||
this.startCollectiveTopic(sender, message);
|
this.startCollectiveTopic(sender, message);
|
||||||
} else if (message.startsWith("#")) {
|
} else if (message.startsWith("#")) {
|
||||||
this.startIndividualTopic(sender, message);
|
this.startIndividualTopic(sender, message);
|
||||||
} else if (message.startsWith("%")) {
|
|
||||||
this.addToCurrentTopic(raw);
|
|
||||||
} else if (message.startsWith("!")) {
|
} 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 (message.startsWith("courant")) {
|
||||||
if (this.currentTopic != null) {
|
if (this.currentTopic != null) {
|
||||||
this.sendMessage(this.channel, "Topic courant : "
|
this.sendMessage(this.channel, "Topic courant : "
|
||||||
|
|
Loading…
Reference in a new issue