# Method Global:Ban [-] [+]

Ban's a Player's account, character or IP

    enum BanMode
    {
        BAN_ACCOUNT = 0,
        BAN_CHARACTER = 1,
        BAN_IP = 2
    };

## Synopsis

`result = Ban( banMode, nameOrIP, duration, reason, whoBanned )`

## Arguments

`BanMode banMode`

  Method of ban, refer to BanMode above.

`string nameOrIP`

  If BanMode is 0 then accountname, if 1 then charactername if 2 then ip.

`number duration`

  Duration (in seconds) of the ban.

  Valid numbers: integers from 0 to 4,294,967,295.

`string reason`
  See method description.

`string whoBanned`
  See method description.

## Returns

`number result`

  Status of the ban. 0 if success, 1 if syntax error, 2 if target not found, 3 if a longer ban already exists, nil if unknown result.

  Valid numbers: integers from -2,147,483,647 to 2,147,483,647.

# Keyboard shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

# Search tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct` (or `str`), `enum`, `trait`, `typedef` (or `tdef`).

Generated on
© 2010 - 2024 Eluna Lua Engine