]> Cypherpunks.ru repositories - goircd.git/blobdiff - daemon.go
Continuation after negative replies
[goircd.git] / daemon.go
index 49e2dd876c6faaa1789c8e0bb454075eaa711687..a5b2d77dcd822d257132fe045cee53473bf89757 100644 (file)
--- a/daemon.go
+++ b/daemon.go
@@ -239,7 +239,6 @@ func (daemon *Daemon) HandlerJoin(client *Client, cmd string) {
                }
                if denied {
                        client.ReplyNicknamed("475", room, "Cannot join channel (+k) - bad key")
-                       continue
                }
                if denied || joined {
                        continue
@@ -247,6 +246,7 @@ func (daemon *Daemon) HandlerJoin(client *Client, cmd string) {
                room_new, room_sink := daemon.RoomRegister(room)
                if key != "" {
                        room_new.key = key
+                       room_new.StateSave()
                }
                room_sink <- ClientEvent{client, EVENT_NEW, ""}
        }
@@ -348,6 +348,7 @@ func (daemon *Daemon) Processor(events chan ClientEvent) {
                                        r, found := daemon.rooms[room]
                                        if !found {
                                                client.ReplyNoChannel(room)
+                                               continue
                                        }
                                        daemon.room_sinks[r] <- ClientEvent{client, EVENT_DEL, ""}
                                }
@@ -395,6 +396,7 @@ func (daemon *Daemon) Processor(events chan ClientEvent) {
                                r, found := daemon.rooms[cols[0]]
                                if !found {
                                        client.ReplyNoChannel(cols[0])
+                                       continue
                                }
                                var change string
                                if len(cols) > 1 {
@@ -412,6 +414,7 @@ func (daemon *Daemon) Processor(events chan ClientEvent) {
                                r, found := daemon.rooms[room]
                                if !found {
                                        client.ReplyNoChannel(room)
+                                       continue
                                }
                                daemon.room_sinks[r] <- ClientEvent{client, EVENT_WHO, ""}
                        case "WHOIS":