Package shared

Examples of shared.Message


  public void onTopic(TopicEvent<KEllyBot> event) throws Exception {
    super.onTopic(event);
    nc.updateTopic(event.getChannel().getName());
    if(event.getDate() < System.currentTimeMillis()){
      //topic was set already
      queueMessage(new Message(nc, event.getTopic(), event.getChannel().getName(), event.getChannel().getName(), Message.CONSOLE));
      queueMessage(new Message(nc, "Topic set by: "+event.getUser().getNick(), event.getChannel().getName(), event.getChannel().getName(), Message.CONSOLE));
    } else {
      //topic was changed
      queueMessage(new Message(nc, event.getUser().getNick()+" changed the topic.", event.getChannel().getName(), event.getChannel().getName(), Message.CONSOLE));
    }
  }
View Full Code Here


    case 353:
    case 333:
      break
     
    default:
      RoomManager.enQueue(new Message(nc, event.getResponse(), "["+event.getCode()+"] Server Response", Connection.CONSOLE_ROOM, Message.CONSOLE));   
    }
    super.onServerResponse(event);
  }
View Full Code Here

    Collection<Channel> channels = event.getBot().getChannels();
    super.onNickChange(event);
    for(Channel c : channels){
      if(c.getUsers().contains(event.getUser())){
        updateWho(c);
        manageMessage(new Message(nc, event.getOldNick()+" is now known as "+event.getNewNick()+".", c.getName(), c, Message.CONSOLE));
      }
    }
  }
View Full Code Here

  @Override
  public void onQuit(QuitEvent<KEllyBot> event) throws Exception {
    for(Channel c : event.getUser().getChannels()){
      if(c.getUsers().contains(event.getBot().getUserBot())){
        updateWho(c);
        manageMessage(new Message(nc, event.getUser().getNick()+" has quit IRC. "+(event.getReason()!="" ? "("+event.getReason()+")"  : ""), c.getName(), c, Message.CONSOLE));
      }
    }
    super.onQuit(event);
  }
View Full Code Here

   * @see org.pircbotx.hooks.ListenerAdapter#onMessage(org.pircbotx.hooks.events.MessageEvent)
   */
  @Override
  public void onMessage(MessageEvent<KEllyBot> event) throws Exception {
    super.onMessage(event);
    manageMessage(new Message(nc, event.getMessage(), event.getUser(), event.getChannel(), Message.MSG));
  }
View Full Code Here

   * @see org.pircbotx.hooks.ListenerAdapter#onAction(org.pircbotx.hooks.events.ActionEvent)
   */
  @Override
  public void onAction(ActionEvent<KEllyBot> event) throws Exception {
    super.onAction(event);
    manageMessage(new Message(nc, event.getAction(), event.getUser(), event.getChannel(), Message.ACTION))
  }
View Full Code Here

   * @see org.pircbotx.hooks.ListenerAdapter#onNotice(org.pircbotx.hooks.events.NoticeEvent)
   */
  @Override
  public void onNotice(NoticeEvent<KEllyBot> event) throws Exception
    super.onNotice(event);
    manageMessage(new Message(nc, "NOTICE: "+event.getNotice(), event.getUser(), null, Message.NOTICE));
  }
View Full Code Here

   */
  @Override
  public void onPrivateMessage(PrivateMessageEvent<KEllyBot> event)
      throws Exception
    super.onPrivateMessage(event);
    manageMessage(new Message(nc, event.getMessage(), event.getUser().getNick(), event.getUser().getNick(), Message.PM
        ));
  }
View Full Code Here

   *
   * @param sender the sender
   * @param err the err
   */
  public final void error(String sender, String err) {
    RoomManager.enQueue(new Message(ScriptVars.curConnection, err, sender,
        ScriptVars.curChannel.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.