BF2.US bf2-rsdeveloper wiki Parity Discord bf2.us
generated from the code
On this page

Online services (gs_)

3 functions of the host module. Generated from the bf2-rs sources; see the reference index for the cross-game table.

gs_abortCurrentConnectionAttempt#

2142Heroes
python
host.gs_abortCurrentConnectionAttempt(...)
FactDetail
Original codeBFHeroes.exe (1.89)!0x0066d902
bf2-rscrates/bf2-server/src/hostfns_2142.rs:181

What it does (from the bf2-rs port). BFHeroes.exe!0x0066d902: same behaviour (GameServer vt+0x10c). gs_abortCurrentConnectionAttempt (bf2142ded!0x08162cd0, BF2142.exe!0x00568700): argInt(0) into GameServer +0x140 (GameServer::abortCurrentConnectionAttempt 0x080ba570), the connection handleClientInfo then refuses.

Shipped scripts use it like this:

2142: python/bf2/GameLogic.py:78
def abortCurrentConnectionAttempt(self, clientId): return host.gs_abortCurrentConnectionAttempt(clientId)
Heroes: python/bf2/GameLogic.py:105
def abortCurrentConnectionAttempt(self, clientId): return host.gs_abortCurrentConnectionAttempt(clientId)

gs_handleRankChallenge#

2142
python
host.gs_handleRankChallenge(...)
FactDetail
bf2-rscrates/bf2-server/src/hostfns_2142.rs:193

What it does (from the bf2-rs port). gs_handleRankChallenge (bf2142ded!0x08162d20, BF2142.exe!0x00568750): argInt(0) player, argInt(1) rank; GameServer::handleRankChallenge (bf2142ded!0x080b4da0) on a ranked server with sv.maxRank and a rank of 13 or more kicks the player (kickPlayer reason 0x25).

gs_validateContent#

2142Heroes
python
host.gs_validateContent(...)
FactDetail
Original codeBFHeroes.exe (1.89)!0x0066d941
bf2-rscrates/bf2-server/src/hostfns_2142.rs:209

What it does (from the bf2-rs port). BFHeroes.exe!0x0066d941: same behaviour (the "bp-1" check). gs_validateContent (bf2142ded!0x08162db0, BF2142.exe!0x005687c0): argInt(0) player, argString(1) content, argInt(2); content "bp-1" (the booster pack) without the flag 1 kicks the player (reason 0x27).

Source: tools/devwiki/refs_python.py · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.