This may not be possible yet, but I was wondering if there was any way to have a Java process essentially 'listen' in a chatroom for a specific string, and once that string is recognized, it would call an action in the program.
For example, let's say that the program is listening for "TEST" in the irc. Once anyone in that chatroom says TEST, the program would call method a().
Hopefully that was a colorful-enough description.
Thanks for the help!
Definitely possible.
Have a look at PircBot.
The example in the link seems to do what you want:
import org.jibble.pircbot.*;
public class MyBot extends PircBot {
public MyBot() {
this.setName("MyBot");
}
public void onMessage(String channel, String sender,
String login, String hostname, String message) {
if (message.equalsIgnoreCase("time")) {
String time = new java.util.Date().toString();
sendMessage(channel, sender + ": The time is now " + time);
}
}
}