Search code examples
javaircbots

Java IRC bot commands


So I'm trying to make an IRC bot in java, I am currently using the pircbot api. what i want is to be able to do a command like: !dl.exec (url of file) or !update (url of file) which would be the same as the first, but kills itself after execution.

when i try

if (message.equalsIgnoreCase("!dl.exec" +paramString1)){
}

it tells me "cannot find symbol variable paramString1"


Solution

  • I found out you can also do:

    if (message.toLowerCase().startsWith("!dl.exec.jar")){
        String[] args = message.split(" ");
    }