if froomuserlist.count>50 then //最多允许一个房间有50个人
begin
result:=3;
exit;
end;
for i:=0 to froomuserlist.count-1 do
//遍历由tchatroom维护的人员列表以判断是否有重名用户
begin
if froomuserlist[i]=username then
result:=2;
break;
end;
end;
再来看看,上次没有实现的多话题房间维护:
//请对比上篇文章的同名实现
constructor tchatroommanager.create;
var
i:integer;
begin