aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-10-13 22:38:25 +0200
committerHimbeer <himbeer@disroot.org>2024-10-13 22:38:25 +0200
commit542955410600d337d595fc3b63910d8716e6a19f (patch)
tree4275878f9f0992460c33786a441c4ffc231925d1
parent5f4a7ad627aab0fe53ddba433d85a6beb939e9da (diff)
Expose CltInfo to plugins
This change allows plugins to query information about clients such as the version string or the formspec version.
-rw-r--r--client_conn.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/client_conn.go b/client_conn.go
index da45c8d..951fa95 100644
--- a/client_conn.go
+++ b/client_conn.go
@@ -112,6 +112,9 @@ func (cc *ClientConn) Log(dir string, v ...interface{}) {
cc.logger.Println(append([]interface{}{dir}, v...)...)
}
+// CltInfo returns the ToSrvCltInfo known about the client.
+func (cc *ClientConn) ToSrvCltInfo() *mt.ToSrvCltInfo { return cc.cltInfo }
+
func handleClt(cc *ClientConn) {
for {
pkt, err := cc.Recv()