From c99bc6b453cb6e51ead19cb863651dbc0bb432de Mon Sep 17 00:00:00 2001 From: Jeremy Latt Date: Tue, 11 Dec 2012 22:54:57 -0800 Subject: [PATCH] Display umode; delete a bunch of data structures for features that won't be implemented. --- src/irc/channel.go | 28 +++++++--------------------- src/irc/client.go | 8 ++++++-- src/irc/reply.go | 2 +- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/irc/channel.go b/src/irc/channel.go index 7db9a765..81c766a6 100644 --- a/src/irc/channel.go +++ b/src/irc/channel.go @@ -1,31 +1,17 @@ package irc type Channel struct { - server *Server - name string - key string - topic string - members ClientSet - operators ClientSet - creators ClientSet - voiced ClientSet - invites map[string]bool + server *Server + name string + key string + topic string + members ClientSet + invites map[string]bool // modes - anonymous bool inviteOnly bool - moderated bool noOutside bool - quiet bool - private bool - secret bool - serverReop bool - operTopic bool // modes with args - password string - userLimit int - banMask string - banExceptMask string - inviteMask string + password string } type ChannelSet map[*Channel]bool diff --git a/src/irc/client.go b/src/irc/client.go index 5eacc0d0..8d878cc7 100644 --- a/src/irc/client.go +++ b/src/irc/client.go @@ -77,10 +77,14 @@ func (c *Client) Nick() string { } func (c *Client) UModeString() string { + mode := "+" if c.invisible { - return "+i" + mode += "i" } - return "" + if c.wallOps { + mode += "w" + } + return mode } func (c *Client) HasNick() bool { diff --git a/src/irc/reply.go b/src/irc/reply.go index d1c43506..e6344b65 100644 --- a/src/irc/reply.go +++ b/src/irc/reply.go @@ -77,7 +77,7 @@ func RplCreated(server *Server) Reply { func RplMyInfo(server *Server) Reply { return NewReply(server, RPL_MYINFO, - fmt.Sprintf("%s %s iwroO ik", server.name, VERSION)) + fmt.Sprintf("%s %s w ikn", server.name, VERSION)) } func RplUModeIs(server *Server, client *Client) Reply {