forked from External/ergo
add UNINVITE command (#1171)
This commit is contained in:
parent
42d246b557
commit
4b1e6b04c4
5 changed files with 39 additions and 1 deletions
|
|
@ -1113,7 +1113,9 @@ func infoHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
|||
}
|
||||
|
||||
// INVITE <nickname> <channel>
|
||||
// UNINVITE <nickname> <channel>
|
||||
func inviteHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
|
||||
invite := msg.Command == "INVITE"
|
||||
nickname := msg.Params[0]
|
||||
channelName := msg.Params[1]
|
||||
|
||||
|
|
@ -1129,7 +1131,12 @@ func inviteHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
|
|||
return false
|
||||
}
|
||||
|
||||
channel.Invite(target, client, rb)
|
||||
if invite {
|
||||
channel.Invite(target, client, rb)
|
||||
} else {
|
||||
channel.Uninvite(target, client, rb)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue