@Override public List<InputRow> parseBatch(Pair<DateTime, ChannelPrivMsg> msg) { return ImmutableList.of(decoder.decodeMessage(msg.lhs, msg.rhs.getChannelName(), msg.rhs.getText())); }
log.debug("ignoring invalid message in channel [%s]", nextMsg.rhs.getChannelName());
public String asString() { return pong.toString(); }
@Override public void onMessage(IMessage aMessage) { if (aMessage instanceof TopicMessage) { TopicMessage _topicMsg = (TopicMessage) aMessage; callback.onSuccess(_topicMsg.getTopic().getValue()); } else if (aMessage instanceof ServerNumericMessage) { if (((ServerNumericMessage) aMessage).getNumericCode().equals(IRCServerNumerics.NOT_CHANNEL_OP)) { callback.onFailure(new IRCException(((ServerNumericMessage) aMessage).getText())); } } } }
public ServerPing build(String aMessage) { String _cmpnt[] = aMessage.split(":"); ServerPing _pMsg = new ServerPing(); _pMsg.setText(_cmpnt[1]); return _pMsg; } }
@Override public void onServerPing(ServerPing aMsg) { execute(new SendServerPingReplyCmd(new ServerPongMessage(aMsg.getText()))); }
public void onChannelKick(ChannelKick aChanKick) { if (callbacks.containsKey(aChanKick)) { callbacks.get(aChanKick).onSuccess(""); delChanUser(aChanKick.getChannelName(), aChanKick.getKickedNickname()); } }
@Override public void onChannelPart(ChanPartMessage aMsg) { if (!isForMe(aMsg)) { WritableIRCChannel _chan = getIRCStateImpl().getWritableChannelByName(aMsg.getChannelName()); savedOldState(_chan); _chan.removeUser(aMsg.getSource()); } }
@Override public void onChannelJoin(ChanJoinMessage aMsg) { if (!isForMe(aMsg)) { WritableIRCUser _user = aMsg.getSource(); WritableIRCChannel _chan = getIRCStateImpl().getWritableChannelByName(aMsg.getChannelName()); savedOldState(_chan); _chan.addUser(_user); } }
public void onNickChange(NickMessage aMsg) { Callback<String> _callback = callbacks.get(aMsg.getNewNick()); if (_callback != null) { _callback.onSuccess(aMsg.getNewNick()); } else { changeNick(aMsg.getNewNick()); } }
@Override public ErrorMessage build(String aMessage) { return new ErrorMessage(aMessage.substring(7)); } }
public QuitMessage build(String aMsg) { return new QuitMessage(ParseUtils.getUser(aMsg.split(" ")[0]), aMsg.substring(aMsg.indexOf(':', 1) + 1)); } }
@Override public ChannelKick build(String aMessage) { String[] _cmpnts = aMessage.split(" "); return new ChannelKick(ParseUtils.getUser(aMessage), aMessage.substring(aMessage.indexOf(':', 1) + 1), _cmpnts[2], _cmpnts[3]); } }
@Override public NickMessage build(String aMessage) { return new NickMessage(ParseUtils.getUser(aMessage.split(" ")[0]), aMessage.substring(aMessage.indexOf(':', 1) + 1)); }
public ChanJoinMessage build(String aMessage) { String[] _cmpnts = aMessage.split(" "); String _chanName = _cmpnts[2]; if (_chanName.startsWith(":")) { _chanName = _chanName.substring(1); } return new ChanJoinMessage(ParseUtils.getUser(_cmpnts[0]), _chanName.toLowerCase()); } }
public void onChanJoinMessage(ChanJoinMessage aMsg) { saveChannel(channel = new WritableIRCChannel(aMsg.getChannelName())); }
public void onError(ErrorMessage aMsg) { callback.onFailure(new IRCException(aMsg.getText())); }
@Override public List<InputRow> parseBatch(Pair<DateTime, ChannelPrivMsg> msg) { return ImmutableList.of(decoder.decodeMessage(msg.lhs, msg.rhs.getChannelName(), msg.rhs.getText())); }
@Override public void onNickChange(NickMessage aMsg) { if (isForMe(aMsg)) { nickChangeListener.onNickChange(aMsg); updateNick(aMsg.getNewNick()); } }