lol raven I also saw this topic and I just wrote this just now. Seems kinda redundant posting it now but well here it is. It's for WCS
You need to add 3 custom commands
/banhostname
/listhostbans
/clearhostbans
<config>
///////////
// 'Ban.Hostnames.by.Pri' Made 15th of October 2009 for Defender
// Script uses code from 'Pri.Installer' an install script for Metis developers available from mxpulse.com & mxmadness.org
// Scroll down to th bottom of the script to view which variables are in use, all variables begin with BH_ for banhost to stop conflicts with other scripts
// Modification of this script is allowed, re-distribution of the script is allowed if you supply credit by Pri somewhere in the scripts header (Like this one)
///////////
<command type="script">
<in>/banhostname %PARAM%</in>
// Check if the command was typed at the start of a sentance, if not break
<out type="push" extdata="BH_CMD_REQ">%TRIGGER%</out>
<out type="push" extdata="BH_CMD_REQ"><operator type="strleft" lvalue="$BH_CMD_REQ$" rvalue="13"/></out>
<out type="break" condition="!_?" lvalue="$BH_CMD_REQ$" rvalue="/banhostname "></out>
// Let the Admins with W access know that this user has attempted to use the /banhostname feature
<out>/hidecmd /gnotice W <%RAWNAME%> #c9#%TRIGGER%</out>
// Check if the dependencies for this script are installed, if not install them
<out type="push" extdata="BH_INSTALL_RESULT"><operator type="readfile" nvalue="C:\Pri.Script.Dependencies\install.log\installation.logfile.ini" lvalue="l" rvalue="1"/></out>
// If the above log file does not exsist begin installation
<out condition="==" lvalue="$BH_INSTALL_RESULT$" rvalue="">/hidecmd /privnotice %RAWNAME% [#c9#PVT#c8#] #c9#No past install was detected. A new installation will now begin. (v0.1)</out>
// Install main installation folder and log file
<out>/hidecmd /privnotice %RAWNAME% [#c9#PVT#c8#] #c2#Installing #c57#Main Directory:</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Script.Dependencies\install.log</out>
<out type="file" extdata="C:\Pri.Script.Dependencies\install.log\installation.logfile.ini" mode="t">1</out>
<out type="file" extdata="C:\Pri.Script.Dependencies\install.log\installation.logfile.ini" mode="a">v0.1</out>
<out type="file" extdata="C:\Pri.Script.Dependencies\install.log\installation.logfile.ini" mode="a">Installation Completed on %DATE%, Install initiated by %RAWNAME%</out>
<out>/hidecmd /privnotice %RAWNAME% [#c9#PVT#c8#] #c4#Installation of main directory completed. #c63#(#c57#C:\Pri.Script.Dependencies#c63#)</out>
// Install Folder for Ban.Hostnames.by.Pri
<out>/hidecmd /privnotice %RAWNAME% [#c9#PVT#c8#] #c2#Installing #c57#Ban.Hostnames.by.Pri v0.1</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Script.Dependencies\Ban.Hostnames</out>
<out>/hidecmd /privnotice %RAWNAME% [#c9#PVT#c8#] #c4##c4#Installation of #c63#"#c1#Ban.Hostnames.by.Pri#c63#" #c4#completed #c63#(#c57#C:\Pri.Script.Dependencies\Ban.Hostnames#c63#)</out>
// take the user paramater provided at the start and add it to the Ban file
<out type="file" extdata="C:\Pri.Script.Dependencies\Ban.Hostnames\list.of.hostnames.that.are.banned.ini" mode="a">%PARAM%\n</out>
<out>/hidecmd /privnotice %RAWNAME% [#c9#PVT#c8#] %PARAM% has been added to the list of banned hostnames</out>
</command>
<command type="script">
<in>/listhostbans</in>
// Check if the command was typed at the start of a sentance, if not break
<out type="push" extdata="BH_CMD_REQ">%TRIGGER%</out>
<out type="push" extdata="BH_CMD_REQ"><operator type="strleft" lvalue="$BH_CMD_REQ$" rvalue="13"/></out>
<out type="break" condition="!_?" lvalue="$BH_CMD_REQ$" rvalue="/listhostbans"></out>
// Check if the script has been installed yet, if it has not break script
<out type="push" extdata="BH_INSTALL_RESULT"><operator type="readfile" nvalue="C:\Pri.Script.Dependencies\install.log\installation.logfile.ini" lvalue="l" rvalue="1"/></out>
<out condition="==" lvalue="$BH_INSTALL_RESULT$" rvalue="">/hidecmd /privnotice %RAWNAME% [#c9#PVT#c8#] #c1#The script has not yet been installed so there cannot be any banned Hostnames</out>
<out type="break" condition="==" lvalue="$BH_INSTALL_RESULT$" rvalue=""></out>
// Start reading back the file
// Push 0 to the Line Count so we can start reading the file in from Line 1
<out type="push" extdata="BH_FILE_LINE">0</out>
<out type="push" extdata="BH_FILE_LINE"><operator type="+" lvalue="%USERVAR[BH_FILE_LINE]%" rvalue="1"/></out>
<out type="push" extdata="BH_BANHOSTNAME_OUTPUT"><operator type="readfile" nvalue="C:\Pri.Script.Dependencies\Ban.Hostnames\list.of.hostnames.that.are.banned.ini" lvalue="l" rvalue="%USERVAR[BH_FILE_LINE]%"/></out>
<out condition="!=" lvalue="%USERVAR[BH_BANHOSTNAME_OUTPUT]%" rvalue="">/hidecmd /privnotice %RAWNAME% %USERVAR[BH_BANHOSTNAME_OUTPUT]%</out>
// If we reach the end of the file then stop looping through the file for content and just continue on
<out type="goto" extdata="-3" condition="!=" lvalue="%USERVAR[BH_BANHOSTNAME_OUTPUT]%" rvalue=""></out>
<out>/hidecmd /privnotice %RAWNAME% Listing Complete</out>
</command>
<command type="script">
<in>/clearhostbans</in>
// Check if the command was typed at the start of a sentance, if not break
<out type="push" extdata="BH_CMD_REQ">%TRIGGER%</out>
<out type="push" extdata="BH_CMD_REQ"><operator type="strleft" lvalue="$BH_CMD_REQ$" rvalue="14"/></out>
<out type="break" condition="!_?" lvalue="$BH_CMD_REQ$" rvalue="/clearhostbans"></out>
// Erase the listing by pushing blank-ness to the file
<out type="file" mode="t" extdata="C:\Pri.Script.Dependencies\Ban.Hostnames\list.of.hostnames.that.are.banned.ini"></out>
<out>/hidecmd /gnotice W The list of Banned Hostnames has been erased by %NAME%</out>
</command>
///////////
// THE CODE BELOW MUST BE INSERTED IN TO YOUR <ONENTER> SCRIPT. IT IS PROVIDED SEPERATELY, ONCE YOU HAVE DONE SO REMOVE THE BELOW CODE FROM THIS FILE
///////////
// Check if the script has been installed yet, if it has not assume no hostnames have been saved and skip this part of the script
<out type="push" extdata="BH_INSTALL_RESULT"><operator type="readfile" nvalue="C:\Pri.Script.Dependencies\install.log\installation.logfile.ini" lvalue="l" rvalue="1"/></out>
<out type="goto" extdata="8" condition="==" lvalue="$BH_INSTALL_RESULT$" rvalue=""></out>
// Push 0 to the Line Count so we can start reading the file in from Line 1
<out type="push" extdata="BH_FILE_LINE">0</out>
<out type="push" extdata="BH_FILE_LINE"><operator type="+" lvalue="%USERVAR[BH_FILE_LINE]%" rvalue="1"/></out>
// Read in the file to BH_BANHOSTNAME_OUTPUT then check it for a hostname that matches
<out type="push" extdata="BH_BANHOSTNAME_OUTPUT"><operator type="readfile" nvalue="C:\Pri.Script.Dependencies\Ban.Hostnames\list.of.hostnames.that.are.banned.ini" lvalue="l" rvalue="%USERVAR[BH_FILE_LINE]%"/></out>
// If a match is found, stop reading in the file and skip to the /kickban part
<out type="goto" extdata="2" condition="_?" lvalue="%USERVAR[BH_BANHOSTNAME_OUTPUT]%" rvalue="%HOSTNAME%"></out>
// If we reach the end of the file then stop looping through the file for content and just continue on
<out type="goto" extdata="-3" condition="!=" lvalue="%USERVAR[BH_BANHOSTNAME_OUTPUT]%" rvalue=""></out>
// Ban the user if their Hostname contains a part of the hostname from the banned file
<out condition="_?" lvalue="%USERVAR[BH_BANHOSTNAME_OUTPUT]%" rvalue="%HOSTNAME%">/hidecmd /kickban %RAWNAME%</out>
// Let Admins with W access know that the user was banned for having the same Hostname as one from the ban file
<out condition="_?" lvalue="%USERVAR[BH_BANHOSTNAME_OUTPUT]%" rvalue="%HOSTNAME%">/hidecmd /gnotice W %NAME% was banned based on their Hostname matching one in the Hostname Ban File</out>
///////////
// variables in use:
// BH_CMD_REQ = Used to check if the command used by the User was from the start of a sentance or not
// BH_INSTALL_RESULT = Used to check if a previous installation of this script has been made
// BH_BANHOSTNAME_OUTPUT = Used to hold data from the current hostname ban file to check it for relevancy
// BH_FILE_LINE = Holds the current line number that the bot is reading from the hostname ban file
///////////
</config>