if((memberLists & 1) != 0) // This buddy is in FL
{
for(int i = 0; i < memberGroups.length; i++)
{
String group = (String) allGroups.get(memberGroups[i]);
Buddy buddy = new Buddy(protocol, passport, group);
buddy.setAlias(alias);
allBuddies.add(buddy);
}
}
if((memberLists & 2) != 0) // This buddy is in AL
{
Buddy buddy = new Buddy(protocol, passport);
buddy.setAlias(alias);
allowList.add(buddy);
}
if((memberLists & 4) != 0) // This buddy is in BL
{
Buddy buddy = new Buddy(protocol, passport);
buddy.setAlias(alias);
blockList.add(buddy);
}
// Check if we received all LST commands
if(++lstReceivedCount == lstReplyCount)
{
// Send the buddy list to the client
Buddy[] buddies = (Buddy[]) allBuddies.toArray(new Buddy[0]);
processor.buddyListReceived(buddies);
Command blp = new Command("BLP");
blp.addParam("AL");
sendToServer(blp, "processPrivacySetting");
}
}
else if("CHL".equals(type))
{
String challenge = cmd.getParam(1);
if(challenge != null)
handleChallenge(challenge);
return;
}
else if("RNG".equals(type))
handleSBInvitation(cmd);
else if("NLN".equals(type))
{
String passport = cmd.getParam(1);
String alias = Util.urlDecode(cmd.getParam(2));
String status = Util.getVerboseStatus(cmd.getParam(0));
Buddy buddy = new Buddy(this.protocol, passport);
buddy.setAlias(alias);
buddy.setStatus(status);
processor.buddyStatusChanged(buddy);
}
else if("FLN".equals(type))
{
String passport = cmd.getParam(0);
Buddy buddy = new Buddy(this.protocol, passport);
buddy.setStatus(null);
processor.buddyStatusChanged(buddy);
}
}