Browse Source

fix miscounting in LUSERS

tags/v0.12.0
Shivaram Lingamneni 6 years ago
parent
commit
a4546c418b
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      irc/client.go

+ 3
- 2
irc/client.go View File

@@ -765,11 +765,12 @@ func (client *Client) destroy(beingResumed bool) {
765 765
 
766 766
 	// send quit messages to friends
767 767
 	if !beingResumed {
768
-		client.server.stats.ChangeTotal(-1)
768
+		if client.Registered() {
769
+			client.server.stats.ChangeTotal(-1)
770
+		}
769 771
 		if client.HasMode(modes.Invisible) {
770 772
 			client.server.stats.ChangeInvisible(-1)
771 773
 		}
772
-
773 774
 		if client.HasMode(modes.Operator) || client.HasMode(modes.LocalOperator) {
774 775
 			client.server.stats.ChangeOperators(-1)
775 776
 		}

Loading…
Cancel
Save