More RFC-close reply human-readable messages

This commit is contained in:
Sergey Matveev 2014-05-13 23:57:45 +04:00
parent 80082ba6f6
commit 1331f317fb
2 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@ func (daemon *Daemon) SendLusers(client *Client) {
lusers++ lusers++
} }
} }
client.ReplyNicknamed("251", fmt.Sprintf("There are %d users and 0 services on 1 server", lusers)) client.ReplyNicknamed("251", fmt.Sprintf("There are %d users and 0 invisible on 1 servers", lusers))
} }
func (daemon *Daemon) SendMotd(client *Client) { func (daemon *Daemon) SendMotd(client *Client) {
@ -113,7 +113,7 @@ func (daemon *Daemon) SendWhois(client *Client, nicknames []string) {
} }
sort.Strings(subscriptions) sort.Strings(subscriptions)
client.ReplyNicknamed("319", c.nickname, strings.Join(subscriptions, " ")) client.ReplyNicknamed("319", c.nickname, strings.Join(subscriptions, " "))
client.ReplyNicknamed("318", c.nickname, "End of WHOIS list") client.ReplyNicknamed("318", c.nickname, "End of /WHOIS list")
} }
if !found { if !found {
client.ReplyNoNickChan(nickname) client.ReplyNoNickChan(nickname)
@ -138,7 +138,7 @@ func (daemon *Daemon) SendList(client *Client, cols []string) {
client.ReplyNicknamed("322", room, fmt.Sprintf("%d", len(r.members)), r.topic) client.ReplyNicknamed("322", room, fmt.Sprintf("%d", len(r.members)), r.topic)
} }
} }
client.ReplyNicknamed("323", "End of LIST") client.ReplyNicknamed("323", "End of /LIST")
} }
// Unregistered client workflow processor. Unregistered client: // Unregistered client workflow processor. Unregistered client:
@ -362,7 +362,7 @@ func (daemon *Daemon) Processor(events chan ClientEvent) {
continue continue
case "NOTICE", "PRIVMSG": case "NOTICE", "PRIVMSG":
if len(cols) == 1 { if len(cols) == 1 {
client.ReplyNicknamed("411", "No recipient given") client.ReplyNicknamed("411", "No recipient given ("+command+")")
continue continue
} }
cols = strings.SplitN(cols[1], " ", 2) cols = strings.SplitN(cols[1], " ", 2)

View File

@ -121,7 +121,7 @@ func (room *Room) Processor(events chan ClientEvent) {
for m := range room.members { for m := range room.members {
client.ReplyNicknamed("352", room.name, m.username, m.conn.RemoteAddr().String(), room.hostname, m.nickname, "H", "0 "+m.realname) client.ReplyNicknamed("352", room.name, m.username, m.conn.RemoteAddr().String(), room.hostname, m.nickname, "H", "0 "+m.realname)
} }
client.ReplyNicknamed("315", room.name, "End of WHO list") client.ReplyNicknamed("315", room.name, "End of /WHO list")
case EVENT_MODE: case EVENT_MODE:
if event.text == "" { if event.text == "" {
mode := "+" mode := "+"