parent
d26194f62d
commit
90250f5be5
@ -1336,6 +1336,19 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
|||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
if entity == serviceNick {
|
||||||
|
dc.SendMessage(&irc.Message{
|
||||||
|
Prefix: dc.srv.prefix(),
|
||||||
|
Command: irc.RPL_WHOREPLY,
|
||||||
|
Params: []string{serviceNick, "*", servicePrefix.User, servicePrefix.Host, dc.srv.Hostname, serviceNick, "H", "0 " + serviceRealname},
|
||||||
|
})
|
||||||
|
dc.SendMessage(&irc.Message{
|
||||||
|
Prefix: dc.srv.prefix(),
|
||||||
|
Command: irc.RPL_ENDOFWHO,
|
||||||
|
Params: []string{dc.nick, serviceNick, "End of /WHO list"},
|
||||||
|
})
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
uc, upstreamName, err := dc.unmarshalEntity(entity)
|
uc, upstreamName, err := dc.unmarshalEntity(entity)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -27,6 +27,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const serviceNick = "BouncerServ"
|
const serviceNick = "BouncerServ"
|
||||||
|
const serviceRealname = "soju bouncer service"
|
||||||
|
|
||||||
var servicePrefix = &irc.Prefix{
|
var servicePrefix = &irc.Prefix{
|
||||||
Name: serviceNick,
|
Name: serviceNick,
|
||||||
|
@ -1337,7 +1337,7 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
|
|||||||
// Ignore
|
// Ignore
|
||||||
case irc.ERR_PASSWDMISMATCH, irc.ERR_ERRONEUSNICKNAME, irc.ERR_NICKNAMEINUSE, irc.ERR_NICKCOLLISION, irc.ERR_UNAVAILRESOURCE:
|
case irc.ERR_PASSWDMISMATCH, irc.ERR_ERRONEUSNICKNAME, irc.ERR_NICKNAMEINUSE, irc.ERR_NICKCOLLISION, irc.ERR_UNAVAILRESOURCE:
|
||||||
if !uc.registered {
|
if !uc.registered {
|
||||||
return fmt.Errorf("registration failed: %v", msg.Params[len(msg.Params) - 1])
|
return fmt.Errorf("registration failed: %v", msg.Params[len(msg.Params)-1])
|
||||||
}
|
}
|
||||||
fallthrough
|
fallthrough
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user