Skip to content

Commit 9d17108

Browse files
committed
Send kick order on gpcm disconnect
1 parent 07ceab4 commit 9d17108

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

gpcm/main.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ var (
6868
mutex = deadlock.Mutex{}
6969

7070
allowDefaultDolphinKeys bool
71-
config common.Config
71+
config common.Config
7272
)
7373

74-
7574
func StartServer(reload bool) {
7675
qr2.SetGPErrorCallback(func(pid uint32, reason string) {
7776
kickPlayer(pid, reason, resolveWWFCMessage(reason))
@@ -127,6 +126,14 @@ func CloseConnection(index uint64) {
127126

128127
logging.Notice(session.ModuleName, "Connection closed")
129128

129+
ip, _ := common.IPFormatToInt(session.RemoteAddr)
130+
qr2.OrderKickFromGroups([]qr2.PIDIPPair{
131+
{
132+
PID: session.User.ProfileId,
133+
IP: uint32(ip),
134+
},
135+
})
136+
130137
if session.LoggedIn {
131138
qr2.Logout(session.User.ProfileId)
132139
if session.QR2IP != 0 {

0 commit comments

Comments
 (0)