📄 chat-chkusers.pl
字号:
#检测是否已被踢出
sub check_users
{
$name=$username;
open (CHECKPROFILE, "$memberspath/$name.txt");
@profile = <CHECKPROFILE>;
close (CHECKPROFILE);
@profilestats = split (/|/, $profile[0]);
if ( $profilestats[3] ne 1 ) {
require "$chathead/chat-writeonline.pl";
require "$chathead/chat-writemsg.pl";
require "$chathead/chat-logout.pl";
#删除密码帐号COOKIE
&delcookie;
#删除所有单间的本人在线信息
@addroom =&readtxtfile($addroomfile);
foreach (@addroom) {
($temp1,$roomname,$temp2)=split(/"/,$_);
&write_outline("$roomname");
}
&write_allroom("logout");
&return_kickout;
exit;
}
}
#检测是否有踢人权利
sub check_kickright
{
require "$chathead/chat-usercount.pl";
require "$chathead/chat-error.pl";
if ($userlevel<$level_high) { &error("kickright") if ((&check_kick eq 0)||(&usercount($username)<$kickfu));}
}
sub check_kick
{
$name=$username;
open (CHECKPROFILE, "$memberspath/$name.txt");
@profile = <CHECKPROFILE>;
close (CHECKPROFILE);
@profilestats = split (/|/, $profile[0]);
if ($profilestats[9] eq 1) {return 1;} else {return 0;}
}
#查该用户是否在线
#checkuseron($room,$towho) if exsist $towho than return 1 ,or so return 0;
sub checkuseron
{
$onlinefile = $_[0];
@online=&readtxtfile($onlinefile,2);
@online=sort @online;
close ONLINEFILE;
$found=0;
$temp="";
ONLINE:foreach (@online)
{
($mark,$chkuserip,$chkusername,$chkuserlevel,$chkusersex,$chktimen,$chksecn,$markend,$last)=split(/↑/,$_);
if (($mark eq "online") && ($markend eq "end"))
{
if ($temp ne "$chkusername↑$chkuserlevel")
{
if ($chkusername eq $_[1]) {$found=1; last ONLINE;}
}
$temp="$chkusername↑$chkuserlevel";
}
}
return $found;
}
1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -