|
@@ -52,7 +52,7 @@ func NewServer(config *Config) *Server {
|
52
|
52
|
return server
|
53
|
53
|
}
|
54
|
54
|
|
55
|
|
-func (server *Server) ProcessCommand(cmd Command) {
|
|
55
|
+func (server *Server) processCommand(cmd Command) {
|
56
|
56
|
client := cmd.Client()
|
57
|
57
|
if DEBUG_SERVER {
|
58
|
58
|
log.Printf("%s → %s %s", client, server, cmd)
|
|
@@ -103,7 +103,7 @@ func (server *Server) Run() {
|
103
|
103
|
NewClient(server, conn)
|
104
|
104
|
|
105
|
105
|
case cmd := <-server.commands:
|
106
|
|
- server.ProcessCommand(cmd)
|
|
106
|
+ server.processCommand(cmd)
|
107
|
107
|
|
108
|
108
|
case client := <-server.idle:
|
109
|
109
|
client.Idle()
|
|
@@ -682,8 +682,7 @@ func (msg *ListCommand) HandleServer(server *Server) {
|
682
|
682
|
|
683
|
683
|
if len(msg.channels) == 0 {
|
684
|
684
|
for _, channel := range server.channels {
|
685
|
|
- if !client.flags[Operator] &&
|
686
|
|
- (channel.flags[Secret] || channel.flags[Private]) {
|
|
685
|
+ if !client.flags[Operator] && channel.flags[Private] {
|
687
|
686
|
continue
|
688
|
687
|
}
|
689
|
688
|
client.RplList(channel)
|
|
@@ -691,8 +690,7 @@ func (msg *ListCommand) HandleServer(server *Server) {
|
691
|
690
|
} else {
|
692
|
691
|
for _, chname := range msg.channels {
|
693
|
692
|
channel := server.channels[chname]
|
694
|
|
- if channel == nil || (!client.flags[Operator] &&
|
695
|
|
- (channel.flags[Secret] || channel.flags[Private])) {
|
|
693
|
+ if channel == nil || (!client.flags[Operator] && channel.flags[Private]) {
|
696
|
694
|
client.ErrNoSuchChannel(chname)
|
697
|
695
|
continue
|
698
|
696
|
}
|