]> Cypherpunks.ru repositories - goircd.git/blobdiff - client.go
Mention TLS and -verbose options in documentation
[goircd.git] / client.go
index 632bf1fb339b3fb7ee8e86e6e9ca1f447401b633..950cbcaba02100a28fb0b9f994a41e026548ad56 100644 (file)
--- a/client.go
+++ b/client.go
@@ -52,10 +52,10 @@ func NewClient(hostname string, conn net.Conn) *Client {
 // Client processor blockingly reads everything remote client sends,
 // splits messages by CRLF and send them to Daemon gorouting for processing
 // it futher. Also it can signalize that client is unavailable (disconnected).
-func (client *Client) Processor(sink chan ClientEvent) {
+func (client *Client) Processor(sink chan<- ClientEvent) {
        var buf_net []byte
        buf := make([]byte, 0)
-       log.Println("New client", client)
+       log.Println(client, "New client")
        sink <- ClientEvent{client, EVENT_NEW, ""}
        for {
                buf_net = make([]byte, BUF_SIZE)
@@ -117,3 +117,7 @@ func (client *Client) ReplyNotEnoughParameters(command string) {
 func (client *Client) ReplyNoChannel(channel string) {
        client.ReplyNicknamed("403", channel, "No such channel")
 }
+
+func (client *Client) ReplyNoNickChan(channel string) {
+       client.ReplyNicknamed("401", channel, "No such nick/channel")
+}