Note that there are some explanatory texts on larger screens.

plurals
  1. POPircBot API Java String Splitting Issue
    primarykey
    data
    text
    <p>I need some help with arrays for admins and stuff. I'm using this API to make a server bot. You can find all the classes, constructors, and methods there.</p> <p>Here's my current code:</p> <pre><code>import org.jibble.pircbot.*; public class MyBot extends PircBot { public MyBot() { this.setName("DevilBot"); } String owner = "Evan"; 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); } if (message.equalsIgnoreCase("!owner")) { if(sender.equals(owner)) { sendMessage(channel, Colors.NORMAL + "You're my owner silly!"); } if (!sender.equals(owner)) { sendMessage(channel, Colors.NORMAL + sender + ": " + owner + " is my owner!"); } } if (message.equalsIgnoreCase("!ban")) { if(sender.equals(owner)) { ban(channel, message); sendMessage(channel, "Banned " + message); } else { kick(channel, sender); sendMessage(channel, "You aren't my mother!"); } } if (message.equalsIgnoreCase("!version")) { sendMessage(channel, "Version 0.1"); sendMessage(channel, "PircBot API v1.5.0"); } if (message.equalsIgnoreCase("!aelux")) { sendMessage(channel, "ALL HAIL AELUX!"); } if (message.equalsIgnoreCase("!hates")){ sendMessage(channel, message + ", " + sender + " hates you!"); } if (message.equalsIgnoreCase("!op")){ if(sender.equals(owner)) { sendMessage(channel, "Opping " + message); } else { ban(channel, sender); kick(channel, sender); sendMessage(channel, "GTFO! Banned."); } } } } </code></pre> <p>It compiles and runs fine. And it's still in Alpha Stages, but for some reason it won't read my command. Like: !kick user Yields no response.</p> <p>The API is quick and easy to understand. If you CAN help me, that would be awesome!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload