mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
fix invite message to clients
This commit is contained in:
parent
d6688a3047
commit
04bb79a610
@ -456,9 +456,8 @@ func (channel *Channel) Invite(invitee *Client, inviter *Client) {
|
||||
return
|
||||
}
|
||||
|
||||
// TODO Modify channel masks
|
||||
inviter.RplInviting(invitee, channel.name)
|
||||
invitee.Reply(RplInviteMsg(inviter, channel.name))
|
||||
invitee.Reply(RplInviteMsg(inviter, invitee, channel.name))
|
||||
if invitee.flags[Away] {
|
||||
inviter.RplAway(invitee)
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
SEM_VER = "ergonomadic-1.2.12"
|
||||
SEM_VER = "ergonomadic-1.2.13"
|
||||
CRLF = "\r\n"
|
||||
MAX_REPLY_LEN = 512 - len(CRLF)
|
||||
|
||||
|
@ -128,8 +128,8 @@ func RplError(message string) string {
|
||||
return NewStringReply(nil, ERROR, ":%s", message)
|
||||
}
|
||||
|
||||
func RplInviteMsg(inviter *Client, channel string) string {
|
||||
return NewStringReply(inviter, INVITE, channel)
|
||||
func RplInviteMsg(inviter *Client, invitee *Client, channel string) string {
|
||||
return NewStringReply(inviter, INVITE, "%s :%s", invitee.Nick(), channel)
|
||||
}
|
||||
|
||||
func RplKick(channel *Channel, client *Client, target *Client, comment string) string {
|
||||
|
@ -853,9 +853,8 @@ func (msg *InviteCommand) HandleServer(server *Server) {
|
||||
|
||||
channel := server.channels.Get(msg.channel)
|
||||
if channel == nil {
|
||||
name := strings.ToLower(msg.channel)
|
||||
client.RplInviting(target, name)
|
||||
target.Reply(RplInviteMsg(client, name))
|
||||
client.RplInviting(target, msg.channel)
|
||||
target.Reply(RplInviteMsg(client, target, msg.channel))
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user