Browse Source

fix: ea déclanchement

Martin Passard 7 years ago
parent
commit
62c0389862
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/comportement/Cafe.java

+ 2 - 2
src/comportement/Cafe.java

@@ -21,7 +21,7 @@ public class Cafe extends Comportement {
 	@Override
 	public boolean hastoreact(String mesg) {
 		String m=mesg.toLowerCase();
-		return (m.contains(getBotNick()+" fait moi un café")||m.contains(getBotNick()+" fait moi un thé"));
+		return m.contains(getBotNick())&&(m.contains("fais") || m.contains("fait")) && (m.contains("un café")||m.contains("un thé"));
 	}
 
 	@Override
@@ -60,7 +60,7 @@ public class Cafe extends Comportement {
 	}
 	//true = thé, false = café
 	private boolean istheorcafe(String msg) {
-		return msg.contains(getBotNick()+" fait moi un thé");	
+		return msg.contains("thé");
 	}
 	
 	public final static Cafe getInstance(Bot b) {