summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorbt <bt@rctt.net>2026-04-19 21:32:53 +0200
committerbt <bt@rctt.net>2026-05-03 17:52:37 +0200
commiteec10d41af62fb9a93cd5fd79dcf94616701cc2a (patch)
treed72068dcc4cb1aa43c2e0a2fae8ff094d41ed9c6 /client
parentc00e7dd589921e6be45918d4cd589e52e2b77036 (diff)
downloadsolec-0.3.0.tar.gz
solec-0.3.0.zip
[common] Basic group channels supportv0.3.0
Diffstat (limited to 'client')
-rw-r--r--client/client.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/client/client.go b/client/client.go
index 0fe967f..775fbb6 100644
--- a/client/client.go
+++ b/client/client.go
@@ -63,6 +63,26 @@ func (c *Client) SendMessage(target, content string) error {
return core.Send(c.conn, msg)
}
+func (c *Client) Join(channel string) error {
+ umod := core.Usermode{
+ UserAddr: c.uname + "@" + c.addr,
+ ChannelName: channel,
+ Mode: core.UsermodeInChannel,
+ }
+
+ return core.Send(c.conn, umod)
+}
+
+func (c *Client) Leave(channel string) error {
+ umod := core.Usermode{
+ UserAddr: c.uname + "@" + c.addr,
+ ChannelName: channel,
+ Mode: core.UsermodeNone,
+ }
+
+ return core.Send(c.conn, umod)
+}
+
func (c *Client) read() {
for {
payload, err := core.Read(c.conn)