made commands valid with ">" prefix rather than nickname
This commit is contained in:
parent
51f32a5e7a
commit
104896b42d
|
@ -49,8 +49,14 @@ public class IrcClient implements IIrcClient, jerklib.events.listeners.IRCEventL
|
|||
String message = cme.getMessage();
|
||||
final String nick = ircsession.getNick();
|
||||
|
||||
if(message.contains(nick)) {
|
||||
if(message.startsWith(nick) || message.startsWith(">")) {
|
||||
if(message.startsWith(nick)) {
|
||||
message = message.substring(Math.max(nick.length(), message.indexOf(":")+1));
|
||||
}
|
||||
else {
|
||||
message = message.substring(1);
|
||||
}
|
||||
|
||||
message = message.trim();
|
||||
|
||||
for(IRCEventListener listenerIRC : listenerListIRC) {
|
||||
|
|
Loading…
Reference in New Issue