Separate 401 code answer
This commit is contained in:
parent
dfe9f27ec9
commit
80082ba6f6
@ -117,3 +117,7 @@ func (client *Client) ReplyNotEnoughParameters(command string) {
|
|||||||
func (client *Client) ReplyNoChannel(channel string) {
|
func (client *Client) ReplyNoChannel(channel string) {
|
||||||
client.ReplyNicknamed("403", channel, "No such channel")
|
client.ReplyNicknamed("403", channel, "No such channel")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (client *Client) ReplyNoNickChan(channel string) {
|
||||||
|
client.ReplyNicknamed("401", channel, "No such nick/channel")
|
||||||
|
}
|
||||||
|
@ -116,7 +116,7 @@ func (daemon *Daemon) SendWhois(client *Client, nicknames []string) {
|
|||||||
client.ReplyNicknamed("318", c.nickname, "End of WHOIS list")
|
client.ReplyNicknamed("318", c.nickname, "End of WHOIS list")
|
||||||
}
|
}
|
||||||
if !found {
|
if !found {
|
||||||
client.ReplyNicknamed("401", nickname, "No such nickname")
|
client.ReplyNoNickChan(nickname)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -385,7 +385,7 @@ func (daemon *Daemon) Processor(events chan ClientEvent) {
|
|||||||
target, _ = RoomNameSanitize(target)
|
target, _ = RoomNameSanitize(target)
|
||||||
r, found := daemon.rooms[target]
|
r, found := daemon.rooms[target]
|
||||||
if !found {
|
if !found {
|
||||||
client.ReplyNicknamed("401", target, "No such nickname/channel")
|
client.ReplyNoNickChan(target)
|
||||||
}
|
}
|
||||||
daemon.room_sinks[r] <- ClientEvent{client, EVENT_MSG, command + " " + strings.TrimLeft(cols[1], ":")}
|
daemon.room_sinks[r] <- ClientEvent{client, EVENT_MSG, command + " " + strings.TrimLeft(cols[1], ":")}
|
||||||
case "TOPIC":
|
case "TOPIC":
|
||||||
|
Loading…
Reference in New Issue
Block a user