Пример #1
0
 public void copyFields(RelayedMessage msg) {
   if (msg == null) {
     return;
   }
   for (final String key : msg.setFields()) {
     this.setField(key, msg.getField(key));
   }
 }
Пример #2
0
  public void messageIn(RelayedMessage msg) {
    String s;
    String m;
    String d;

    s = msg.getField("sender");
    m = msg.getField("message");

    for (Party p : parties) {
      /* ChatAPI does not check party name validity */
      if (PartyManager.getParty(p.name) == null) continue;

      if (p.prefix != null) d = p.prefix + s;
      else d = s;

      if (p.suffix != null) d += p.suffix;

      ChatAPI.sendPartyChat(mirc, s, d, p.name, m);
    }
  }