void addFriend(long l) { try { if (l == 0L) return; if (friendsCount >= 100 && anInt1046 != 1) { client.chatHandler.pushMessage( "Your friendlist is full. Max of 100 for free users, and 200 for members", 0, ""); return; } if (friendsCount >= 200) { client.chatHandler.pushMessage( "Your friendlist is full. Max of 100 for free users, and 200 for members", 0, ""); return; } String s = TextUtils.fixName(TextUtils.nameForLong(l)); for (int i = 0; i < friendsCount; i++) if (friendsListAsLongs[i] == l) { client.chatHandler.pushMessage(s + " is already on your friend list", 0, ""); return; } for (int j = 0; j < client.ignoreHandler.ignoreCount; j++) if (client.ignoreHandler.ignoreListAsLongs[j] == l) { client.chatHandler.pushMessage( "Please remove " + s + " from your ignore list first", 0, ""); return; } if (s.equals(client.playerHandler.myPlayer.name)) { return; } else { friendsList[friendsCount] = s; friendsListAsLongs[friendsCount] = l; friendsNodeIDs[friendsCount] = 0; friendsCount++; client.tabAreaHandler.redrawTab = true; client.ioHandler.stream.putOpcode(188); client.ioHandler.stream.putLong(l); return; } } catch (RuntimeException runtimeexception) { SignLink.reporterror("15283, " + (byte) 68 + ", " + l + ", " + runtimeexception.toString()); } throw new RuntimeException(); }
void delFriend(long l) { try { if (l == 0L) return; for (int i = 0; i < friendsCount; i++) { if (friendsListAsLongs[i] != l) continue; friendsCount--; client.tabAreaHandler.redrawTab = true; for (int j = i; j < friendsCount; j++) { friendsList[j] = friendsList[j + 1]; friendsNodeIDs[j] = friendsNodeIDs[j + 1]; friendsListAsLongs[j] = friendsListAsLongs[j + 1]; } client.ioHandler.stream.putOpcode(215); client.ioHandler.stream.putLong(l); break; } } catch (RuntimeException runtimeexception) { SignLink.reporterror("18622, " + false + ", " + l + ", " + runtimeexception.toString()); throw new RuntimeException(); } }