Codice PHP:
$msgst= mysql_query("UPDATE ibwf_users SET chmsgs='".$totl."' WHERE id='".$uid."'");
}else{
$bantime = time() + (30*24*60*60);
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
echo "Can't Post Msg<br/><br/>";
echo "You just tried sending a msg with a link to one of the crapiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. you have lost all your plusses<br/>3. You are BANNED!";
$user = getnick_sid($sid);
mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='<b>".getnick_uid(1)."</b> auto banned $user for spamming chat', actdt='".time()."'");
mysql_query("INSERT INTO ibwf_penalties SET uid='".$uid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$uid."'");
echo "</body>";
echo "</html>";
exit();
}
if($rinfo[1]==2)
{
//oh damn i gotta post this message to ravebabe :(
//will it succeed?
$botid = "eeb070e74e366473";
$hostname = "www.pandorabots.com";
$hostpath = "/pandora/talk-xml";
$sendData = "botid=".$botid."&input=".urlencode($message)."&custid=".$custid;
$result = PostToHost($hostname, $hostpath, $sendData);
$pos = strpos($result, "custid=\"");
$pos = strpos($result, "<that>");
if ($pos === false) {
$reply = "";
} else {
$pos += 6;
$endpos = strpos($result, "</that>", $pos);
$reply = unhtmlspecialchars2(substr($result, $pos, $endpos - $pos));
$reply = mysql_escape_string($reply);
}
$chatok = mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='', timesent='".time()."', msgtext='".$reply." @".getnick_uid($uid)."', rid='".$rid."';");
}
$message = "";
}
echo "<br/>";
$chats = mysql_query("SELECT chatter, who, timesent, msgtext, exposed FROM ibwf_chat WHERE rid='".$rid."' ORDER BY timesent DESC, id DESC");
$counter=0;
while($chat = mysql_fetch_array($chats))
{
$canc = true;
if($counter<40)
{
if(istrashed($chat[0])){
if($uid!=$chat[0])
{
$canc = false;
}
}
//////good
/*if(isignored($chat[0],$uid)){
$canc = false;
}*/
//////////good
if($chat[0]!=$uid)
{
if($chat[1]!=0)
{
if($chat[1]!=$uid)
{
$canc = false;
}
}
}
if($chat[4]=='1' && ismod($uid))
{
$canc = true;
}
if($canc)
{
$cmid = mysql_fetch_array(mysql_query("SELECT chmood FROM ibwf_users WHERE id='".$chat[0]."'"));
$iml = "";
if(($cmid[0]!=0))
{
$mlnk = mysql_fetch_array(mysql_query("SELECT img, text FROM ibwf_moods WHERE id='".$cmid[0]."'"));
$iml = "<img src=\"$mlnk[0]\" alt=\"$mlnk[1]\"/>";
}
$chnick = getnick_uid($chat[0]);
$optlink = $iml.$chnick;
if(($chat[1]!=0)&&($chat[0]==$uid))
{
///out
$iml = "<img src=\"../moods/out.gif\" alt=\"!\"/>";
$chnick = getnick_uid($chat[1]);
$optlink = $iml."Pm To ".$chnick;
}
if($chat[1]==$uid)
{
///out
$iml = "<img src=\"../moods/in.gif\" alt=\"!\"/>";
$chnick = getnick_uid($chat[0]);
$optlink = $iml."Pm By ".$chnick;
}
if($chat[4]=='1')
{
///out
$iml = "<img src=\"../moods/point.gif\" alt=\"!\"/>";
$chnick = getnick_uid($chat[0]);
$tonick = getnick_uid($chat[1]);
$optlink = "$iml By ".$chnick." To ".$tonick;
}
$ds= date("H.i.s", $chat[2]);
$text = parsepm($chat[3], $sid);
$nos = substr_count($text,"<img src=");
if(isspam($text))
{
$chnick = getnick_uid($chat[0]);
echo addchatmsg($chat[0],$text,1,"*Oi! $chnick, No Spamming!*");
}
else if($nos>2){
$chnick = getnick_uid($chat[0]);
echo addchatmsg($chat[0],$text,1,"*Hey! $chnick, U Can Only Use 2 Smilies Per Msg!*");
}else{
$sres = substr($chat[3],0,3);
if($sres == "/me")
{
$chco = strlen($chat[3]);
$goto = $chco - 3;
$rest = substr($chat[3],3,$goto);
$tosay = parsepm($rest, $sid);
echo addchatmsg($chat[0],$tosay,1,"");
}
else{
if($rinfo[0]==0){$tosay = getbbcode($chat[3], $sid, 0);}
else{$tosay = parsepm($chat[3], $sid, 1);}
if($rinfo[1]==1){$tosay = strrev($tosay);}
echo "<a href=\"chat.php?action=say2&sid=$sid&who=$chat[0]&rid=$rid&rpw=$rpw\">$optlink</a> - ";
echo $tosay."<br/>";
}
}
$counter++;
}
}
}
echo "<br/>";
echo "<a name=\"opt\" id=\"opt\"></a>";
echo "<b>* </b><a accesskey=\"*\" href=\"chat.php?time=";
echo "".date("dmHis")."";
echo "&sid=$sid&rid=$rid&rpw=$rpw\">Refresh</a><br/>";