gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
76774 Posts in 13500 Topics by 1651 Members - Latest Member: insider4ever April 19, 2024, 07:54:53 am
*
gfx*gfx
gfx
WinMX World :: Forum  |  Metis Scripts and Help  |  Metis Script Help  |  Hostname Script Required
gfx
gfxgfx
 

Author Topic: Hostname Script Required  (Read 4268 times)

0 Members and 1 Guest are viewing this topic.

Hostname Script Required
« on: October 14, 2009, 07:34:41 pm »
Hi i would like some assistance with creating a script that will effectively block hostnames is there anyone out here than can help with this

Offline birdman

  • Forum Member
Re: Hostname Script Required
« Reply #1 on: October 15, 2009, 11:40:40 am »
Help you with a script so you can claim it as your own or remove the writters name from it as you have done with other scripts/games used in your room today !

Offline Bluey_412

  • Forum Member
  • I'm Watching...
Re: Hostname Script Required
« Reply #2 on: October 15, 2009, 02:02:32 pm »
Thats a pretty rough allegation to make...
What you think is important is rarely urgent
But what you think is Urgent is rarely important

Just remember that...

Offline DaBees-Knees

  • WMW Team
  • *****
Re: Hostname Script Required
« Reply #3 on: October 15, 2009, 02:10:34 pm »
When someone asks for help either give it or don't. Accusations are not called for.

Offline tig

  • Forum Member
  • WinMXWorld.com Help_AE182F4EBABE
Re: Hostname Script Required
« Reply #4 on: October 15, 2009, 02:18:01 pm »
Since I can not find it .. I will start this is not a thread to abuse or accuse anyone. I know that their has been a  previous warning against the abuse and accusation before.

Defender has asked for help and not to be accused of accusations. This needs to stop. I am well aware of what is going on. I do not fell like this is getting anywere with accusations going back and forth is necessary.

I am not going to get involved with the differences you 2 have or the fact that this worrying to read when a person is accused of re naming someones script. When really you cant put the name on the script in the room unless you do a masssive list. The host is usually remembers were it has come from.

Birdman consider this as a warning from me.

The fact is Defender has asked for help. Please get back on topic and stay on topic.

If anyone has got a script that they could help defender out this would be great. As I am interested with what people come up with.   
People become really quite remarkable when they start thinking that they can do things. When they believe in themselves they have the first secret of success. BY Norman Vincent Peale

Offline birdman

  • Forum Member
Re: Hostname Script Required
« Reply #5 on: October 15, 2009, 03:41:56 pm »
I see so it is ok for Defender to make accusations in the host section against me and false ones at that, and for fact i know defender has removed smokins name from the wordfinder game and replaced it with "By Tribal "  their room founder, so no not an allegation its fact and thats one script example i know of  so i thought anyone who was going to spend hours makin such a script for this person should be aware. And just so you know smokin is part of my room so i know for fact who wrote wordfinder

Offline ]2aven (R.I.P.)

  • MX Hosts
  • *****
Re: Hostname Script Required
« Reply #6 on: October 15, 2009, 05:20:02 pm »
Alright lets hope that this helps the situation..

Defender.. I'm assuming that you use FXS so here's a ban by hostname script that should help you. I just edited it and tested it with an FXS room. I'm not claiming that this script was made by me, I only modified it for FXS.

Code: [Select]

<config>

<OnEnter type="script">
<out type="push" extdata="HOST">%HOSTNAME%</out>
<out type="push" extdata="USER">%NAME%</out>
<out type="push" extdata="BADHOSTIP">%IP%</out>
<out delay="25000">/opmsg  #c1#$USER$#c1# Hostname is being checked against Ban List</out>
<out type="push" extdata="HOSTBANLIST"><operator type="readfile" nvalue="C:\Documents and Settings\raven\Desktop\RoboMX\Plugins\bannedhostname\Banned.txt" lvalue="c" rvalue="-1"/></out>
<out type="push" extdata="RULE8">NO</out>
<out type="push" extdata="RULE8" condition="?" lvalue="$HOSTBANLIST$" rvalue="%USERVAR[HOST]%">YES</out>
<out delay="5000" condition="==" lvalue="$RULE8$" rvalue="NO">/opmsg #c4#$USER$ Hostname: OK!</out>
<out delay="5000" condition="==" lvalue="$RULE8$" rvalue="YES">#c1#%NAME% #c8#Banned Hostname Detected</out>
<out condition="==" lvalue="$RULE8$" rvalue="YES">/message $USER$ #c1#Sorry but you or somebody with the same ISP is not wanted here... Bye!</out>
<out delay="5000"condition="==" lvalue="$RULE8$" rvalue="YES">/banip $BADHOSTIP$</out>
<out delay="5000"condition="==" lvalue="$RULE8$" rvalue="YES">/kickban $USER$</out>
</OnEnter>

<command type="script">
<in>/banhost %PARAM%</in>
<out type="push" extdata="HOSTNAME">%PARAM%</out>
<out type="file" mode="a" extdata="C:\Documents and Settings\raven\Desktop\RoboMX\Plugins\bannedhostname\Banned.txt">$HOSTNAME$\n</out>
<out>/opmsg #c8#This Hostname #c1#:- #c4#$HOSTNAME$ #c8#Has been added to the ban list</out>
</command>

<command type="script">
<in>/clearhostbans</in>
<out type="file" mode="t" extdata="C:\Documents and Settings\raven\Desktop\RoboMX\Plugins\bannedhostname\banned.txt"></out>
<out delay="500">/opmsg #c4#Hostname Bans have been cleared</out>
</command>

<command type="script" flood="7">
<in>/listhostbans</in>
<out type="push" extdata="directory">C:\Documents and Settings\raven\Desktop\RoboMX\Plugins\bannedhostname</out>
<out type="push" extdata="searchlinkline">1</out>
<out type="push" extdata="displayline">0</out>
<out>/message %NAME% #c1#List Of Banned Hostnames #c9#:-</out>
<out type="push" extdata="searchline"><operator type="readfile" nvalue="$directory$\Banned.txt" lvalue="l" rvalue="$searchlinkline$"/></out>
<out type="push" extdata="displayline" condition="?" lvalue="$searchline$" rvalue=""><operator type="+" lvalue="$displayline$" rvalue="1"/></out>
<out delay="800" condition="?" lvalue="$searchline$" rvalue="">/message %NAME% #c8#($displayline$) #c6#$searchline$</out>
<out type="push" extdata="searchlinkline"><operator type="+" lvalue="$searchlinkline$" rvalue="1"/></out>
<out type="goto" extdata="-4" condition="!=" lvalue="$searchline$" rvalue=""></out>
<out delay="1500" condition="!=" lvalue="$displayline$" rvalue="0">/message %NAME% #c4#End of list</out>
<out delay="1500" condition="==" lvalue="$displayline$" rvalue="0">/message %NAME% #c8#Sorry #c1#%NAME% #c8#No Banned Hostnames at this time.</out>
<out type="pop" extdata="500"/>
<out type="pop" extdata="501"/>
</command>

</config>


Obviously you have to paste it into notepad and save it as hostname ban v0.1.xml .. then add the include file to MXC.xml .. <include file="hostname ban v0.1.xml"/>

Edit the Robo directory to your bots directory. Put the xml along with a folder called bannedhostname. Inside the folder make a text file called Banned.txt and add the hostnames to that file.

Birdman .. I will edit it for WCS and post it on my site for you very shortly. Let's hope this settles this issue for both parties.  :-)

[EDIT] I edited some WCS commands that were supposed to be FXS commands. [EDIT]

Offline Pri

  • MX Hosts
  • *****
  • *****
Re: Hostname Script Required
« Reply #7 on: October 15, 2009, 05:28:50 pm »
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

Code: [Select]
<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 &lt;%RAWNAME%&gt; #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>

Offline ]2aven (R.I.P.)

  • MX Hosts
  • *****
Re: Hostname Script Required
« Reply #8 on: October 15, 2009, 05:32:25 pm »
No.. I'm actually glad you did because I see a typo or 2 I can't fix since I dont have a edit button .. It's been so long since I used FXS, I'm getting my commands messed up. None the less it does work. So thanks for that.  heh

WinMX World :: Forum  |  Metis Scripts and Help  |  Metis Script Help  |  Hostname Script Required
 

gfxgfx
gfx
©2005-2024 WinMXWorld.com. All Rights Reserved.
SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
Page created in 0.022 seconds with 23 queries.
Helios Multi © Bloc
gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!