Go to the documentation of this file.00001
00009 package script;
00010
00011 import java.net.InetAddress;
00012 import java.net.UnknownHostException;
00013
00014 import com.rosalfred.core.ia.rivescript.BotReply;
00015 import com.rosalfred.core.ia.rivescript.RiveScript;
00016 import com.rosalfred.core.ia.rivescript.lang.java.RunRiver;
00017
00023 public class get_ip implements RunRiver {
00024
00025 @Override
00026 public BotReply invoke(RiveScript rs, String user, String[] args) {
00027 try {
00028 return new BotReply(InetAddress.getLocalHost().getHostAddress());
00029 } catch (UnknownHostException e) {
00030 e.printStackTrace();
00031 }
00032
00033 return new BotReply("not found");
00034 }
00035
00036 }