]> Cypherpunks.ru repositories - goircd.git/blobdiff - daemon.go
Forbid any later GNU GPL versions autousage
[goircd.git] / daemon.go
index d46ee07fe0944ea74e63694bd6787cbb253aeb6e..f6aa14db15e4e67a91d6ad7ba291b94adc345a70 100644 (file)
--- a/daemon.go
+++ b/daemon.go
@@ -1,11 +1,10 @@
 /*
 goircd -- minimalistic simple Internet Relay Chat (IRC) server
-Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2018 | wn Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, version 3 of the License.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -167,7 +166,8 @@ func ClientRegister(client *Client, cmd string, cols []string) {
                        client.ReplyNotEnoughParameters("PASS")
                        return
                }
-               client.password = &cols[1]
+               password := strings.TrimPrefix(cols[1], ":")
+               client.password = &password
        case "NICK":
                if len(cols) == 1 || len(cols[1]) < 1 {
                        client.ReplyParts("431", "No nickname given")
@@ -444,9 +444,7 @@ func Processor(events chan ClientEvent, finished chan struct{}) {
                                        if r, found := rooms[room]; found {
                                                roomSinks[r] <- ClientEvent{client, EventDel, ""}
                                        } else {
-                                               roomsM.RUnlock()
                                                client.ReplyNoChannel(room)
-                                               continue
                                        }
                                }
                                roomsM.RUnlock()