Skip to content

Commit

Permalink
Merge pull request #210 from inada-s/ignore-tempban-p2p
Browse files Browse the repository at this point in the history
disable temp ban in p2p lobby
  • Loading branch information
inada-s authored Oct 15, 2022
2 parents e26952e + 64916a1 commit 8570daf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions gdxsv/lbs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ import (
const (
maxLobbyCount = 22
maxRoomCount = 5
)

const (
PlatformConsole = "console" // Real PS2 / Dreamcast
PlatformEmuX8664 = "emu-x86/64" // PCSX2 / Flycast on x64 platform
)

const (
GameDiskDC1 = "dc1" // Dreamcast
GameDiskDC2 = "dc2" // Dreamcast DX
GameDiskPS2 = "ps2" // PS2 DX

McsAddrP2PGame = "255.255.255.255:255"
)

func lobbyKey(platform string, disk string) string {
Expand Down Expand Up @@ -445,6 +443,12 @@ func (lbs *Lbs) eventLoop() {

lbs.banChecked[g.BattleCode] = true

if g.McsAddr == McsAddrP2PGame {
// temp ban is currently disabled on p2p game
logger.Info("p2p game ignored")
continue
}

var mcsUsers []*McsUser
stateCount := map[int]int{}
for _, u := range sharedData.GetMcsUsers() {
Expand Down
2 changes: 1 addition & 1 deletion gdxsv/lbs_lobby.go
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ func (l *LbsLobby) prepareMcs(mcsRegion string) (newMcsRegion string, mcsPeer *L
if mcsRegion == "p2p" {
newMcsRegion = "p2p"
mcsPeer = nil
mcsAddr = "255.255.255.255:255"
mcsAddr = McsAddrP2PGame
canStart = true
return
}
Expand Down

0 comments on commit 8570daf

Please sign in to comment.