WinMX World :: Forum

Metis Scripts and Help => Other Metis scripts => Topic started by: Stevi on December 02, 2006, 05:37:53 pm

Title: Ban By Hostname (Author Unknown)
Post by: Stevi on December 02, 2006, 05:37:53 pm
This is one great script. Sometimes some users IP changes and their hostname doesnt. This script will check the hostname on entry and ban if it finds it in the list.

Files to be created:
1. Create a text file called Banned.txt in C:\Program Files\BOTNAME\Plugins\
2. Create a folder called hostname in C:\Program Files\RoboMX\Plugins\

Code: [Select]
<OnEnter type="script">
<out type="push" extdata="Host">%HOSTNAME%</out>
<out type="push" extdata="RawName">%NAME%</out>
<out type="file" mode="t" extdata="C:\Program Files\RoboMX\Plugins\hostname\$RawName$.txt">$Host$</out>
<out delay="2000">/opmsg Users Hostname is being checked against Ban List</out>
<out type="push" extdata="RECENTS"><operator type="readfile" nvalue="C:\Program Files\RoboMX\Plugins\Banned.txt" lvalue="c" rvalue="-1"/></out>
<out type="push" extdata="RULE8">NO</out>
<out type="push" extdata="RULE8" condition="?" lvalue="$RECENTS$" rvalue="%HOSTNAME%">YES</out>
<out condition="==" lvalue="$RULE8$" rvalue="NO">/opmsg Check Complete</out>
<out condition="==" lvalue="$RULE8$" rvalue="YES"> #c1#You Where Banned #c8#%NAME%#c1#, Nice Try but their no slipping Past us Bye Bye.</out>
<out condition="==" lvalue="$RULE8$" rvalue="YES">/opmsg Dont forget to /clearbans if you have unbanned them</out>
<out delay="5000"condition="==" lvalue="$RULE8$" rvalue="YES">/kickban %NAME%</out>
</OnEnter>

<OnOpMessage type="script">
<in>/kickban %PARAM%</in>
<out type="push" extdata="NAME">%PARAM%</out>
<out type="push" extdata="GO"><operator type="readfile" nvalue="C:\Program Files\RoboMX\Plugins\hostname\$NAME$.txt" lvalue="c" rvalue=-1/></out>
<out>/opmsg This Hostname :-$GO$ Has been added to the ban list, to remove it type /clearbans</out>
<out type="file" mode="a" extdata="C:\Program Files\RoboMX\Plugins\Banned.txt"> $GO$ \n</out>
</OnOpMessage>

<OnOpMessage type="script">
<in>/clearbans</in>
<out type="file" mode="t" extdata="C:\Program Files\RoboMX\Plugins\Banned.txt"></out>
<out delay="500">/opmsg Host Ban file cleared also</out>
</OnOpMessage>
Title: Re: Ban By Hostname (Author Unknown)
Post by: ··º)([¥])(º·· Defender on June 30, 2009, 08:06:15 pm
in this script do i put the hostname i want banning in the banned.txt file?
Title: Re: Ban By Hostname (Author Unknown)
Post by: wonderer on June 30, 2009, 09:42:29 pm
Be aware!!

This is script looks nice but has little or no value, specially when user's IP is changing as happens with a dynamic IP.

For more details on how this works you should take a look into the better welcome back scripts.

Most ISP generated hostnames contain parts or whole IP numbers changing with the user who gets the IP that day/week or whatever time.
This script only works for the very few users where the hostname is based on subscribers number and even than may change.

Before you start using it, write usernames +hostnames to a file for a couple of days and take a look into it.......
Title: Re: Ban By Hostname (Author Unknown)
Post by: deadlydeathangel on October 11, 2009, 02:49:27 am
that looks like one of my scripts ;o but i have added partial to mine :D