if("BYE".equals(type))
{
String passport = cmd.getParam(0);
if(passport != null)
{
Buddy buddy = new Buddy(protocol, passport);
conf.removeParticipant(buddy);
processor.conferenceParticipantLeft(conf, buddy);
if(conf.getParticipants().length == 1)
{
processor.conferenceClosed(conf);
try
{
protocol.quitConference(conf);
}
catch(IllegalStateException e)
{
// This will not be thrown, ever.
}
}
}
}
else if("JOI".equals(type))
{
String passport = cmd.getParam(0);
String alias = Util.urlDecode(cmd.getParam(1));
Buddy buddy = new Buddy(this.protocol, passport);
buddy.setAlias(alias);
this.conf.addParticipant(buddy);
processor.conferenceParticipantJoined(this.conf, buddy);
}
}
}