X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=daemon.go;h=9a5ae85e75bec66c8ac8d6b33e5e66a5ec2bd927;hb=7afceda9cb6352809a0a3123c6aae1234329088b;hp=d46ee07fe0944ea74e63694bd6787cbb253aeb6e;hpb=bab2b1b9f6a0a2c0e0b243c16f814b5a73f74184;p=goircd.git diff --git a/daemon.go b/daemon.go index d46ee07..9a5ae85 100644 --- a/daemon.go +++ b/daemon.go @@ -1,6 +1,6 @@ /* goircd -- minimalistic simple Internet Relay Chat (IRC) server -Copyright (C) 2014-2016 Sergey Matveev +Copyright (C) 2014-2017 Sergey Matveev 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 @@ -167,7 +167,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 +445,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()