Scripting/mIRC/Functions/Misc/BanIP

From VC-MP Wiki

Jump to: navigation, search

This will ban a player's ip from the server.

Syntax

alias vcmp.banip !return $dll( " $+ $scriptdirvcmp.dll $+ ", BanIP, $1- )

Arguments

  • $1 - ServerID
  • $2 - PlayerIP

Example

This will ban an IP from the server, this will be performed when a player types "!banip 127.0.0.1" (This example is for a local IP).

on *:SIGNAL:vcmp.player.command:{
     if ( $3 == banip ) && ($4) {
          vcmp.banip $1 $4
     }
}

This function is similar to the ban function but it will ban an IP from the server, this means that the next time someone tries to connect with that IP then they will be unable to join as it has been banned.

Note: The BanIP function only comes into play once the player with the banned IP leaves the server and tries to rejoin.

The example above is a simple one to make sure that there is something after the "!banip".

Notes

This example uses vcmp.player.command.

Related Functions

Personal tools
squirrel scripting