]> Cypherpunks.ru repositories - goircd.git/blobdiff - client.go
Remove signal processor for password reloading and use pointers to strings
[goircd.git] / client.go
index 4f48daf90be4f1f0981b96f6e30ca04fa1f438a0..3637d499da5e245990241eaffb0efad337214600 100644 (file)
--- a/client.go
+++ b/client.go
@@ -31,7 +31,7 @@ const (
 )
 
 type Client struct {
-       hostname   string
+       hostname   *string
        conn       net.Conn
        registered bool
        nickname   string
@@ -49,7 +49,7 @@ func (client Client) String() string {
        return client.nickname + "!" + client.username + "@" + client.conn.RemoteAddr().String()
 }
 
-func NewClient(hostname string, conn net.Conn) *Client {
+func NewClient(hostname *string, conn net.Conn) *Client {
        return &Client{hostname: hostname, conn: conn, nickname: "*", password: ""}
 }
 
@@ -89,7 +89,7 @@ func (client *Client) Msg(text string) {
 
 // Send message from server. It has ": servername" prefix.
 func (client *Client) Reply(text string) {
-       client.Msg(":" + client.hostname + " " + text)
+       client.Msg(":" + *client.hostname + " " + text)
 }
 
 // Send server message, concatenating all provided text parts and