diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2021-09-11 10:15:17 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2021-09-11 10:15:17 +0200 |
commit | ccec89bce62cbcb1c067b51509d11a8bee43f0f2 (patch) | |
tree | 93fd408a72cc6bc4a02a5e8efdad36182e186745 | |
parent | 4845a3fda9b579bbcbeb3d1b01542d544ae97a0e (diff) |
Prevent empty disconnect reasons
-rw-r--r-- | moderation.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/moderation.go b/moderation.go index 1500a6d..4cb3e68 100644 --- a/moderation.go +++ b/moderation.go @@ -5,6 +5,10 @@ import "github.com/anon55555/mt" // Kick sends mt.ToCltDisco with the specified custom reason // and closes the ClientConn. func (cc *ClientConn) Kick(reason string) { + if reason == "" { + reason = "Kicked by proxy." + } + ack, _ := cc.SendCmd(&mt.ToCltDisco{ Reason: mt.Custom, Custom: reason, |