Skip to content

Commit

Permalink
show player quit, peer disconnect with no soft-mod.
Browse files Browse the repository at this point in the history
  • Loading branch information
Distortions81 committed Mar 10, 2024
1 parent 67a49be commit a9b0ef0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions support/pipeHandle.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ func handleDisconnect(NoTC string, line string) {

if strings.HasPrefix(NoTC, "Info ServerMultiplayerManager") {

if strings.Contains(line, "removing peer") {

fact.WriteFact(glob.OnlineCommand)
if glob.SoftModVersion == constants.Unknown {
if strings.Contains(line, "removing peer") {
fact.CMS(cfg.Local.Channel.ChatChannel, "A player has disconnected.")
fact.WriteFact(glob.OnlineCommand)
}
}
}
}
Expand Down Expand Up @@ -360,6 +362,12 @@ func handlePlayerLeave(NoDS string, line string, NoDSlist []string, NoDSlistlen
if NoDSlistlen > 1 {
pname := NoDSlist[1]

/* Show quit if there is no soft-mod */
if glob.SoftModVersion == constants.Unknown {
buf := fmt.Sprintf("%v left.", pname)
fact.CMS(cfg.Local.Channel.ChatChannel, buf)
}

go func(factname string) {
fact.UpdateSeen(factname)
}(pname)
Expand Down

0 comments on commit a9b0ef0

Please sign in to comment.