invite command

This commit is contained in:
Jeremy Latt
2014-02-25 07:28:09 -08:00
parent d6ec1e719b
commit f0305cf01a
4 changed files with 66 additions and 5 deletions
+9 -4
View File
@@ -128,8 +128,8 @@ func RplError(message string) string {
return NewStringReply(nil, ERROR, ":%s", message)
}
func RplInviteMsg(channel *Channel, inviter *Client) string {
return NewStringReply(inviter, INVITE, channel.name)
func RplInviteMsg(inviter *Client, channel string) string {
return NewStringReply(inviter, INVITE, channel)
}
func RplKick(channel *Channel, client *Client, target *Client, comment string) string {
@@ -175,9 +175,9 @@ func (target *Client) RplTopic(channel *Channel) {
// <nick> <channel>
// NB: correction in errata
func (target *Client) RplInvitingMsg(channel *Channel, invitee *Client) {
func (target *Client) RplInvitingMsg(invitee *Client, channel string) {
target.NumericReply(RPL_INVITING,
"%s %s", invitee.Nick(), channel.name)
"%s %s", invitee.Nick(), channel)
}
func (target *Client) RplEndOfNames(channel *Channel) {
@@ -369,6 +369,11 @@ func (target *Client) RplVersion() {
"ergonomadic-%s %s", SERVER_VERSION, target.server.name)
}
func (target *Client) RplInviting(invitee *Client, channel string) {
target.NumericReply(RPL_INVITING,
"%s %s", invitee.Nick(), channel)
}
//
// errors (also numeric)
//