|
@@ -1364,12 +1364,17 @@ func (channel *Channel) Kick(client *Client, target *Client, comment string, rb
|
1364
|
1364
|
func (channel *Channel) Invite(invitee *Client, inviter *Client, rb *ResponseBuffer) {
|
1365
|
1365
|
chname := channel.Name()
|
1366
|
1366
|
if channel.flags.HasMode(modes.InviteOnly) && !channel.ClientIsAtLeast(inviter, modes.ChannelOperator) {
|
1367
|
|
- rb.Add(nil, inviter.server.name, ERR_CHANOPRIVSNEEDED, inviter.Nick(), channel.Name(), inviter.t("You're not a channel operator"))
|
|
1367
|
+ rb.Add(nil, inviter.server.name, ERR_CHANOPRIVSNEEDED, inviter.Nick(), chname, inviter.t("You're not a channel operator"))
|
1368
|
1368
|
return
|
1369
|
1369
|
}
|
1370
|
1370
|
|
1371
|
1371
|
if !channel.hasClient(inviter) {
|
1372
|
|
- rb.Add(nil, inviter.server.name, ERR_NOTONCHANNEL, inviter.Nick(), channel.Name(), inviter.t("You're not on that channel"))
|
|
1372
|
+ rb.Add(nil, inviter.server.name, ERR_NOTONCHANNEL, inviter.Nick(), chname, inviter.t("You're not on that channel"))
|
|
1373
|
+ return
|
|
1374
|
+ }
|
|
1375
|
+
|
|
1376
|
+ if channel.hasClient(invitee) {
|
|
1377
|
+ rb.Add(nil, inviter.server.name, ERR_USERONCHANNEL, inviter.Nick(), invitee.Nick(), chname, inviter.t("User is already on that channel"))
|
1373
|
1378
|
return
|
1374
|
1379
|
}
|
1375
|
1380
|
|