1 18 package net.sf.drftpd.event.irc; 19 20 import net.sf.drftpd.master.ConnectionManager; 21 import net.sf.drftpd.master.command.plugins.Textoutput; 22 23 import org.drftpd.plugins.SiteBot; 24 25 import f00f.net.irc.martyr.GenericCommandAutoService; 26 import f00f.net.irc.martyr.InCommand; 27 import f00f.net.irc.martyr.commands.MessageCommand; 28 29 33 public class Affils extends GenericCommandAutoService implements IRCPluginInterface { 34 35 private ConnectionManager _cm; 36 public Affils(SiteBot ircListener) { 37 super(ircListener.getIRCConnection()); 38 _cm = ircListener.getConnectionManager(); 39 } 40 41 protected void updateCommand(InCommand command) { 42 if (command instanceof MessageCommand) { 43 MessageCommand msgc = (MessageCommand) command; 44 String msg = msgc.getMessage(); 45 if (msg.startsWith("!affils")) { 46 if (msgc.isPrivateToUs(getConnection().getClientState())) { 47 } else 52 Textoutput.sendTextToIRC( 53 getConnection(), 54 msgc.getDest(), 55 "affils"); 56 } 57 } 58 } 59 60 public String getCommands() { 61 return "!affils"; 62 } 63 64 } 65 | Popular Tags |