Package shared

Examples of shared.Message


    } else {
          if(target==null || target.equals(Connection.CONSOLE_ROOM)){
            return;
          }
          message = Message.quicklinkToLink(message);
          RoomManager.enQueue(new Message(this.getConnection(), message, this.getUserBot(), getChannel(target), Message.MSG))
      super.sendMessage(target, message);
    }
  }
View Full Code Here


      doCommand(message.substring(1));
    } else {
          if(target==null || target.equals(Connection.CONSOLE_ROOM)){
            return;
          }
          RoomManager.enQueue(new Message(this, message, getNick(), target, Message.ACTION))
      super.sendAction(target, message);
    }
  }
View Full Code Here

  @Override
  public void sendNotice(String target, String notice) {
        if(target==null || target.equals(Connection.CONSOLE_ROOM)){
          return;
        }
        RoomManager.enQueue(new Message(this, "NOTICE: "+notice, getNick(), target, Message.NOTICE));
    super.sendNotice(target, notice);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.pircbotx.PircBotX#changeNick(java.lang.String)
   */
  public void changeNick(String nick){
    super.changeNick(nick);
    RoomManager.enQueue(new Message(connection, "You are now known as "+nick, systemName, ScriptVars.curChannel, Message.CONSOLE));
  }
View Full Code Here

    super.onDisconnect(event);
    //TODO: Make it so it doesn't say Disconnected. rooms.size() number of times
    LinkedList<Room> rooms = event.getBot().getConnection().getRooms();
    for(Room r : rooms)
    {
      RoomManager.enQueue(new Message(event.getBot(), "Disconnected.", KEllyBot.systemName, r.getChannelName(), Message.CONSOLE));
    }

  }
View Full Code Here

   *
   * @param event the event
   */
  public void onDisconnect(Event<KEllyBot> event){
    for(Channel c : event.getBot().getChannels()){
      manageMessage(new Message(nc, "You have been disconnected, attempting to reconnect.", c.getName(), c, Message.CONSOLE));
    }
    int tries=0;
    while(!event.getBot().isConnected() && tries++<10){
      try {
        Thread.sleep(3000);
View Full Code Here

  public void onJoin(JoinEvent<KEllyBot> event) throws Exception {
    if(botEqualsUser(event.getUser())){
      nc.createRoom(event.getChannel().getName(), Room.IO | Room.TOPIC | Room.WHO, event.getChannel());
    }
    super.onJoin(event);
    queueMessage(new Message(nc, event.getUser().getNick()+" has joined.", event.getChannel().getName(), event.getChannel().getName(), Message.CONSOLE));
    updateWho(event.getChannel());
  }
View Full Code Here

   */
  @Override
  public void onMode(ModeEvent<KEllyBot> event) throws Exception {
    super.onMode(event);
    updateWho(event.getChannel());
    queueMessage(new Message(nc, event.getMode()+" by "+event.getUser().getNick(), event.getChannel().getName(), event.getChannel().getName(), Message.CONSOLE));
  }
View Full Code Here

   */
  @Override
  public void onPart(PartEvent<KEllyBot> event) throws Exception {
    super.onPart(event);
    updateWho(event.getChannel());
    queueMessage(new Message(nc, event.getUser().getNick()+" has parted.", event.getChannel().getName(), event.getChannel().getName(), Message.CONSOLE));
  }
View Full Code Here

   */
  @Override
  public void onKick(KickEvent<KEllyBot> event) throws Exception {
    super.onKick(event);
    updateWho(event.getChannel());
    queueMessage(new Message(nc, event.getRecipient().getNick()+" was kicked by "+event.getSource().getNick()+(event.getReason() != null?" ["+event.getReason()+"]" : ""), event.getChannel().getName(), event.getChannel().getName(), Message.CONSOLE));
  }
View Full Code Here

TOP

Related Classes of shared.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.