private void updateBuddies(int characterId, int channel, int[] buddies, boolean offline) {
	final PlayerStorage playerStorage = server.getPlayerStorage();
	for (int buddy : buddies) {
	    final MapleCharacter chr = playerStorage.getCharacterById(buddy);
	    if (chr != null) {
		final BuddylistEntry ble = chr.getBuddylist().get(characterId);
		if (ble != null && ble.isVisible()) {
		    int mcChannel;
		    if (offline) {
			ble.setChannel(-1);
			mcChannel = -1;
		    } else {
			ble.setChannel(channel);
			mcChannel = channel - 1;
		    }
		    chr.getBuddylist().put(ble);
		    chr.getClient().getSession().write(MaplePacketCreator.updateBuddyChannel(ble.getCharacterId(), mcChannel));
		}
	    }
	}
    }