Jump to content

Finally Host Ban Script Created


{SB}Killer

Is the Script Nice  

22 members have voted

  1. 1. Is the Script Nice

    • Yes
      7
    • No
      13
    • Hell Yaa You Rock
      2


Recommended Posts

Well i had always been bugging many scripters to make a hostban script but no one really worked on it so i decided to work on it and succeded in making a Hostban part so it will now ban the host along with the ip of the player and i dont know everyone can have same host identity so now HACKERS beware before u decide to use the HACK.

Well the script it seems to works on my Servers but i need to say this that i havent tested it with OLIS script because i dont USE his Scripts so if you have Any script just add the things i include here in that script.

Well i am not a good scripter so if anyone can improve it please do so and post it here .

Well i am using the Admin Script Made by Vincent (contact at [email protected] ) for TTH Clan Server and this is the part from that script . And this is how to proceed to add hostban commands:

Under

on *:SIGNAL:mta.command: {

Put these Lines:


 if ($3 == !host && %rights. [ $+ [ $1 ] $+ . $+ [ $2 ] ] > 0) {
   if ($4 != $null) && ($mta.name($1,$mta.getid($1,$4)) != Unknown) {
     .timer 1 2 mta.say $1 $mta.dns($1,$mta.getid($1,$4)) 
     set %host on
   }
   else mta.say $1 $mta.name($1,$2) $+ : Error - Specify an ID. Syntax: !host 
 }

 ; Above Part is optional to test the host of the person
 ;Ban if you're admin 

 if ($3 == !hostban) && (%rights. [ $+ [ $1 ] $+ . $+ [ $2 ] ] > 1) {
   if (%rights. [ $+ [ $1 ] $+ . $+ [ $2 ] ] > %rights. [ $+ [ $1 ] $+ . $+ [ $mta.getid($1,$4) ] ]) {
     if ( $mta.name($1,$mta.getid($1,$4)) == Unknown ) {
       mta.say $1 Error: unable to ban absent ID or Name! 
     } 
     else { 
       if ($5 != $null) { 
         mta.say $1 $mta.name( $1 , $2 ) is Banning the Host of $mta.name( $1 , $mta.getid($1,$4) ) ( $+ $mta.ip( $1 , $mta.getid($1,$4)) $+ ) $+ . Reason: $5-
         set %hostban. [ $+ [ $1 ] $+ . $+ [ $mta.getid($1,$4) ] ] on        
         mta.hostban $1-   
        .timer 1 4 mta.addban $1 $mta.getid($1,$4)
        .timer 1 4 mta.ban $1 $mta.getid($1,$4)       
       } 
       else { 
         mta.say $1 $mta.name( $1 , $2 ) is Banning the Host of $mta.name( $1 , $mta.getid($1,$4) ) ( $+ $mta.ip( $1 , $mta.getid($1,$4)) $+ )
         set %hostban. [ $+ [ $1 ] $+ . $+ [ $mta.getid($1,$4) ] ] on
         mta.hostban $1-  
         .timer 1 4 mta.addban $1 $mta.getid($1,$4)
         .timer 1 4 mta.ban $1 $mta.getid($1,$4)
       } 
     } 
   }
   elseif ($mta.name($1,$mta.getid($1,$4)) != Unknown) {
     mta.say $1 Insufficient authority to ban $mta.name($1,$mta.getid($1,$4))
   }
 }

At the very bottom of the script where all those alias.mta.blbla {

are there add this alias

alias mta.dnsban { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 


alias mta.hostban { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 

alias mta.dns { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 

on *:DNS:{ 
 !tokenize 32 $hget(mta.dns,$dns(0).ip) 
 !hdel mta.dns $dns(0).ip 
 if ($1 != $null) && ($readini(hostban.txt,banned,$dns(0).addr) == $dns(0).addr) {
 mta.say $1 $mta.name($1,$2) $+ 's host: $dns(0).addr Is Banned! Later Looser !  
 mta.ban $1 $2
 mta.addban $1 $2
 }
elseif (%host == on) {
    mta.say $1  $mta.name($1,$2) $+ 's Host Is: $dns(0).addr
    unset %host
   }
elseif (%hostban. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == on ) {
   writeini -n "hostban.txt" banned $dns(0).addr $dns(0).addr
   mta.say $1 $mta.name($1,$2) $+ 's host: $dns(0).addr Is Banned! Later Looser !
   .timer 1 2 unset %hostban. [ $+ [ $1 ] $+ . $+ [ $2 ] ] 

  }

}

Under mta.join part put this :

  
 !.timer 1 0 mta.dnsban $1-
 unset %hostban. [ $+ [ $1 ] $+ . $+ [ $2 ] ]
 unset %host  ;this is only if u are using the !host command as above

Well i repeat i am not a good scripter like Vincent or Jax so if anyone can shorten the script please do so an post here.

If you are Running Olis Script which you cannot edit you can add all those things above into any other rpg or manhunt script you running but remember to change the names of commands like instead of !host use !host2 as the command and instead of

alias mta.dnsban { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 


alias mta.hostban { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 

alias mta.dns { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 

on *:DNS:{ 
 !tokenize 32 $hget(mta.dns,$dns(0).ip) 
 !hdel mta.dns $dns(0).ip 
 if ($1 != $null) && ($readini(hostban.txt,banned,$dns(0).addr) == $dns(0).addr) {
 mta.say $1 $mta.name($1,$2) $+ 's host: $dns(0).addr Is Banned! Later Looser !  
 mta.ban $1 $2
 mta.addban $1 $2
 }
elseif (%host == on) {
    mta.say $1  $mta.name($1,$2) $+ 's Host Is: $dns(0).addr
    unset %host
   }
elseif (%hostban. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == on ) {
   writeini -n "hostban.txt" banned $dns(0).addr $dns(0).addr
   mta.say $1 $mta.name($1,$2) $+ 's host: $dns(0).addr Is Banned! Later Looser !
   .timer 1 2 unset %hostban. [ $+ [ $1 ] $+ . $+ [ $2 ] ] 

  }

}

use

alias mta.dnsban2 { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 


alias mta.hostban2 { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 

alias mta.dns2 { 
 !hadd -m mta.dns $mta.ip($1,$2) $1 $2 
 !.dns $mta.ip($1,$2) 
} 

on *:DNS:{ 
 !tokenize 32 $hget(mta.dns,$dns(0).ip) 
 !hdel mta.dns $dns(0).ip 
 if ($1 != $null) && ($readini(hostban.txt,banned,$dns(0).addr) == $dns(0).addr) {
 mta.say $1 $mta.name($1,$2) $+ 's host: $dns(0).addr Is Banned! Later Looser !  
 mta.ban $1 $2
 mta.addban $1 $2
 }
elseif (%host2 == on) {
    mta.say $1  $mta.name($1,$2) $+ 's Host Is: $dns(0).addr
    unset %host
   }
elseif (%hostban2. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == on ) {
   writeini -n "hostban.txt" banned $dns(0).addr $dns(0).addr
   mta.say $1 $mta.name($1,$2) $+ 's host: $dns(0).addr Is Banned! Later Looser !
   .timer 1 2 unset %hostban2. [ $+ [ $1 ] $+ . $+ [ $2 ] ] 

  }

}

And so on If any problem in implementing it please Post here Please note you will have to create at hostban.txt file or any file u like cause i dont know if it will auto create the files and the file should read as :

[banned]

Well i hope this will prevent HACKERS ruining the MTA game. If i have left something out please post what i left out .

Chow Looking forward to see more servers with this part on them.And oli can u add this to you script too so everyone can benifit if its usefull to anyone that is.

Ok After Testing (say after 20 mins) i am getting MTA:ma Error and asking to reinstall mirc and it is shutting mirc down does anyone know why that is happening . Please

Link to comment

i have written a type of hostban for the next version of MTA:mA:GRS.. however it is a lot more compressed than this 1.

Also note: its as easy to change ure host than it is to change ure IP these days so this won't definately stop hackers.

This could also be dangerous as it could potentially ban a whole country.

Link to comment
i have written a type of hostban for the next version of MTA:mA:GRS.. however it is a lot more compressed than this 1.

Also note: its as easy to change ure host than it is to change ure IP these days so this won't definately stop hackers.

This could also be dangerous as it could potentially ban a whole country.

dude yaa u can change host and whether it bans whole country is yet to be seen but if hackers wana disgrace there country by using hacks just for fun then that country does deserve to be banned. anyways as i said this script is an optional script only you wana use it use i have tested on dsl and cable lines but have yet to try on dial up and will be doing that soon if it fails than i guess people need not use this and just use ban script.

Link to comment

So you think hackers will stop because they don't want to disgrace their country and get it banned?

The whole point of most of them is to disrupt, and they will abuse this script as much as possible if it allows large areas to get banned.

Link to comment
i had a hostban script on the FMJ server in MTA 0.3 but found it ineffective.

Ban the whole country.. i'm glad you arn't a top county judge.

i dont get u man how can it ban the whole country can u explain but anyways this script giving mtama:crc errors i wonder why anyone like to throw some light on that error i started to get.

Link to comment
not the whole country...but look at it this way:

35% of the UK population are on BT Broadband.

you hostban BT Broadband.

you ban 35% of the uk.

thats a large majority of people banned from your server.

did u ever notice someone do a !host for u and ur freind on same line only 2 blocks from u both of ur hosts will be different but i dont know i might be wrong but i need to first fix that mta:ma crc failure that has started to come up now.

Link to comment
crc check fail is due to ure manipulation of the on:DNS event. This will need to be addressed and should have been tested before you released this.

as i said it worked fine for like 20 min or so but i think i know what the problem is whenever a new person joins the timer is set wrong on mta.join i have changed it to .timer 1 5 and testing it now so if u have msn oli let me know send me pm .

Hmm this didnt solve it either so oli what u think should be done if u know let me know.

Link to comment
not the whole country...but look at it this way:

35% of the UK population are on BT Broadband.

you hostban BT Broadband.

you ban 35% of the uk.

thats a large majority of people banned from your server.

did u ever notice someone do a !host for u and ur freind on same line only 2 blocks from u both of ur hosts will be different but i dont know i might be wrong but i need to first fix that mta:ma crc failure that has started to come up now.

but in that case your host probably changes with your ip, before my latest ip change, my host was 80-235-132-186.cable.ubr08.na.blueyonder.co.uk and since it contains my ip, its obviously gonna change every time i change ip. banning mac addresses is useless too, i found a way to change that.

Link to comment

Well for time been i have been unable to fix the mtama:crc failure error yet so i need some scripter to provide a solutions thanks a lot for looking and i hope when that problem gets solved maybe we can have hostban after removing the ip from the host name or some mannual command to add that host name to the files after getting rid of ip.

Link to comment
  • 3 weeks later...

Killer nice host banner, looks pretty hard to put together, Thanks for the hostbanner... I could really use this :lol: if ya would like to forgive me for w/e but I really don't care if you unban me or not from your server but I just wanna be forgiven... lol... well u know my MSN so uh anyways nice script :)

Link to comment
WHERE do I copy it too? I mean... what file do I edit and put it into?

Ok dude dont u have someones msn who knows scripting why are u posting such things here ? i remember when i started from 0 knowledge i didnt post no where to get help but msned people and bugged them posting sovles nothing. plus if u wana edit scripts u frist need to know little C and what are if elseif loops and what is the meaning of { and } ,so if u dont know what are those your might just as will use premade scripts intead of trying to ask where and how to copy. YOU copy in whatever script ur running PERIOD

Link to comment

SB Killer: stop being so misleading bordering on untruthful. And STOP telling people to 'bug people on MSN'.

Stewie: no C knowledge is required, just basic common sense and the ability to absorb a few techniques. Make sure you read the manual for mtama, browse the scripting.html that breaks down all the commands, finally read through the mtama help thread from the start, that has many simple, easy to understand snippets that you will either be able to use straight off or adapt to your needs. Good luck.

Link to comment
SB Killer: stop being so misleading bordering on untruthful. And STOP telling people to 'bug people on MSN'.

Stewie: no C knowledge is required, just basic common sense and the ability to absorb a few techniques.

Yaa LOL i know that dude and i doubt he can use common sense so he will posting here all the time a simple stuff thats why i asked him to poke some one on MSN but its not my forums so u guys might as well bear with him.

And dude u atleast need to know what if and else loops are like how is someone gonaa know where do i change some condition ? I dont know if i could have edited any script had i not know C and no know what if and else loops do... But yaa people can grab things without knowing the meaning of but it might be hard for kids aged 13 or 12 so thats why i am suggesting to take a course in C or something instead of starting to create scripts.

Link to comment
  • 2 weeks later...

Cool hostban script now works with the new trace ban script created and its way more powerful than blacklist, which checks for same name only so if someone wana try there luck out go check out the servers . Its under test so if it passes test it might be released. so all those with dynamic ips and not dial up freaks are welcome to be beta testers on server who can change there ips or are on router. :lol:

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...