// Module Demo // A simple module to help get you started. // // toby oxborrow // 20-Dec-2001 public class SimpleMod extends Mod { public void init() { ident = "Simple"; priority = 5; } public void run (MessageData m) { // if the user is talking to the bot // and the command (the first 'word' of what they say) is 'hi' if ((Util.talkToMe(m)) && (Network.command(m, "hi"))) { // say 'hi ' back Network.write(IRC.msg(m.getWhere(), "Hi " + m.getNick())); } } public void help (MessageData m) { // tell the work how to use SimpleMod // the title of the mod Network.write(IRC.notice(m.getNick(), "SimpleMod")); // the command to issue Network.write(IRC.notice(m.getNick(), "/msg " + Network.getNick() + " hi")); // what happens Network.write(IRC.notice(m.getNick(), " - " + Network.getNick() + " will say hi back.")); } }