예제 #1
0
  @Override
  public void parse(Message m) {
    String target = m.param();
    if (!m.param().startsWith("#")) target = m.sender();

    if (m.botCommand().equals("pastatopic")) {
      if (Info.hasUserInfo(m.sender())) {
        if (Info.getChannelInfo("#pasta").has(m.sender())) {
          if (Info.getChannelInfo("#pasta").getModes(m.sender()).contains("~")
              || Info.getChannelInfo("#pasta").getModes(m.sender()).contains("&")) {
            topicmain = m.botParams();
            write();
          } else Server.say(target, "You need to be at least AOP to use this command");
        }
      }
    }
    if (m.command().equals("TOPIC")) {
      if (m.param().equals("#pasta")) {
        if (!m.trailing().startsWith(topicmain)) {
          Server.send("TOPIC #pasta :" + topicmain + " " + m.trailing());
        }
      }
    }
  }