|
Post by Wormopolis on Dec 19, 2008 16:40:35 GMT -8
Browsers Tested: IE and FF placement: Global Footer Ever ban your own IP? This script will help keep you from banning the IP you are currently using. Watches Ban Page and Profile Ban Page. <!-- SCRIPT DIVIDER: IP WARNING ON BAN --> <!--------- WATCHDOG v1.5 ---------> <div id="IPtemp" style="display: none"> <script src="http://embed.ipcatch.com/ip/" type="text/javascript"></script> </div>
<script type="text/javascript"> <!-- /* WATCHDOG v1.5 / By Wormopolis / Do not repost, Header must stay intact */ function chkIPs() { spotsForm=document.getElementsByTagName('form'); dvs=document.getElementById('IPtemp'); reportedIP=dvs.lastChild.nodeValue; reportedIP=reportedIP.substring(0,reportedIP.length-1); spots=spotsForm[0].getElementsByTagName('input'); for (sp=0; sp<spots.length; sp++) { if (spots[sp].type=="text" && spots[sp].size=='20' && spots[sp].value!=0 && spots[sp].style.backgroundColor!="red") { YOUR_ip=reportedIP.split('.'); Entry_ip=spots[sp].value.split('.'); if (parseInt(YOUR_ip[0])==parseInt(Entry_ip[0]) && (!Entry_ip[1] || (parseInt(YOUR_ip[1])==parseInt(Entry_ip[1]) && (!Entry_ip[2] || (parseInt(YOUR_ip[2])==parseInt(Entry_ip[2]) && (!Entry_ip[3] || (parseInt(YOUR_ip[3])==parseInt(Entry_ip[3])))))))) { alert("YOU ARE POSSIBLY ABOUT TO BAN YOURSELF. CHECK entries in red."); spots[sp].style.backgroundColor="red"; } } }
if (document.getElementById('IPUserTemp')) { if (reportedIP==document.getElementById('IPUserTemp').lastChild.nodeValue && spotsForm[0].banip.style.backgroundColor!="red") { spotsForm[0].banip.style.backgroundColor="red"; alert("IP MATCHES! YOU ARE ABOUT TO BAN YOURSELF"); } } }
if (location.href.match(/ion=ban/)) { btn=document.getElementsByTagName('input'); for (i=0; i<btn.length; i++) { if (btn[i].type=='submit') { dv=document.createElement('div'); btn[i].parentNode.insertBefore(dv, btn[i].nextSibling); if(document.addEventListener){ btn[i].addEventListener('mouseover',chkIPs,false); } else { btn[i].attachEvent('onmouseover',chkIPs); } dv.align='center' dvt=document.createTextNode('YOUR IP IS: '); dvs=document.getElementById('IPtemp'); dvs.style.display=""; dv.appendChild(dvt); dv.appendChild(dvs); if (document.cookie.match(/ipStore=(\d+\.\d+\.\d+\.\d+)/)) { prevIP=RegExp.$1; if (document.referrer.match(/ion=viewprofile/)) { dv.appendChild(document.createElement('br')); nm=document.referrer.split("user=")[1]; dvt2=document.createTextNode('USER: '+nm+' IP IS: '); dvs2=document.createElement('div'); dvs2t=document.createTextNode(''+prevIP); dvs2.appendChild(dvs2t); dvs2.id="IPUserTemp"; dv.appendChild(dvt2); dv.appendChild(document.createElement('br')); dv.appendChild(dvs2);
} } } } } if (location.href.match(/ion=viewprofile/)) { for (fnts=document.getElementsByTagName('font'), i=0; i<fnts.length; i++) { if (fnts[i].size=="2" && fnts[i].innerHTML.match('Last Known IP:')) { ipFound=fnts[i+1].innerHTML; document.cookie="ipStore="+ipFound; } } } else { document.cookie="ipStore="; } // --> </script>
Preview: EDIT: added watchdog to profile bans.
|
|