diff --git a/irc/channel.go b/irc/channel.go index a9b45861..bab45747 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -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) } diff --git a/irc/constants.go b/irc/constants.go index 02a78ab2..6b4a89ec 100644 --- a/irc/constants.go +++ b/irc/constants.go @@ -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) diff --git a/irc/reply.go b/irc/reply.go index 970876fb..3e69b746 100644 --- a/irc/reply.go +++ b/irc/reply.go @@ -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 { diff --git a/irc/server.go b/irc/server.go index ebd5d3f7..6b770be3 100644 --- a/irc/server.go +++ b/irc/server.go @@ -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 }