0 then response.redirect "kickout.htm"
if instr(kicklist,"'"&Request.ServerVariables("remote_addr")&"'")>0 then response.redirect "kickout.htm"
end if
userdup=false
for i=0 to 50
if chatdata(i,0)=username then
if chatdata(i,1)request.servervariables("remote_addr") then
response.redirect "error.ASP?mess=相同的聊天昵称已存在,请你用另一个昵称进入"
else
userdup=true
userid=i
chatdata(i,4)=admlevel
exit for
end if
end if
next
if not userdup then
for i=0 to 50
if chatdata(i,0)="" then
userid=i
chatdata(i,0)=username '存用户名
chatdata(i,1)=request.servervariables("remote_addr") '存IP地址
chatdata(i,3)="" '置耳语为空
chatdata(i,4)=admlevel '置请勿打挠开关、MIDI开关
chatdata(i,5)="" '置隐藏名单为空
noplace=false
session("userid")=i
exit for
end if
next
if not noplace then
onliuser=onliuser&",'"&username&"'" '将用户加进名单列表
for i=0 to 50
chatdata(i,4)=(chatdata(i,4) mod 4)+4 '通知其它用户刷新名单
next
else
response.redirect "error.ASP?mess=聊天室已经满员!"
end if
else
if instr(onliuser,",'"&username&"'")4 then
chatdata(userid,2)=chatpoin-5
else
chatdata(userid,2)=chatpoin-5+50
end if
application.lock
application("chatdata")=chatdata
application("onliuser")=onliuser
application.unlock
session("userip")=request.servervariables("remote_addr")
%>

