From cc6f764c85024675ce908ed2bebf579975134aa4 Mon Sep 17 00:00:00 2001 From: Jeremy Latt Date: Mon, 24 Feb 2014 17:45:04 -0800 Subject: [PATCH] minor cleanup --- README.md | 2 +- irc/commands.go | 2 -- irc/server.go | 10 ++++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9bc383b8..cc68f07b 100644 --- a/README.md +++ b/README.md @@ -40,5 +40,5 @@ byte strings. You can generate them with e.g. `ergonomadic -genpasswd ```sh go get go install -ergonomadic -conf '/path/to/ergonomadic.json' +ergonomadic -conf '/path/to/config.json' ``` diff --git a/irc/commands.go b/irc/commands.go index b228fe93..e75dd164 100644 --- a/irc/commands.go +++ b/irc/commands.go @@ -199,8 +199,6 @@ type PassCommand struct { err error } -var ErrCannotCheck = errors.New("cannot check password") - func (cmd *PassCommand) String() string { return fmt.Sprintf("PASS(password=%s)", cmd.password) } diff --git a/irc/server.go b/irc/server.go index 0ff45e01..97ed0054 100644 --- a/irc/server.go +++ b/irc/server.go @@ -52,7 +52,7 @@ func NewServer(config *Config) *Server { return server } -func (server *Server) ProcessCommand(cmd Command) { +func (server *Server) processCommand(cmd Command) { client := cmd.Client() if DEBUG_SERVER { log.Printf("%s → %s %s", client, server, cmd) @@ -103,7 +103,7 @@ func (server *Server) Run() { NewClient(server, conn) case cmd := <-server.commands: - server.ProcessCommand(cmd) + server.processCommand(cmd) case client := <-server.idle: client.Idle() @@ -682,8 +682,7 @@ func (msg *ListCommand) HandleServer(server *Server) { if len(msg.channels) == 0 { for _, channel := range server.channels { - if !client.flags[Operator] && - (channel.flags[Secret] || channel.flags[Private]) { + if !client.flags[Operator] && channel.flags[Private] { continue } client.RplList(channel) @@ -691,8 +690,7 @@ func (msg *ListCommand) HandleServer(server *Server) { } else { for _, chname := range msg.channels { channel := server.channels[chname] - if channel == nil || (!client.flags[Operator] && - (channel.flags[Secret] || channel.flags[Private])) { + if channel == nil || (!client.flags[Operator] && channel.flags[Private]) { client.ErrNoSuchChannel(chname) continue }