mirror of https://github.com/fluffle/goirc
Allow users with h to kick and kb themselves
This commit is contained in:
parent
585963cd2e
commit
f7e3c71249
|
@ -115,8 +115,8 @@ func kick(conn *irc.Conn, nick *irc.Nick, args, target string) {
|
|||
}
|
||||
|
||||
split := strings.Split(args, " ", 2)
|
||||
if n := conn.GetNick(split[0]); n == nil ||
|
||||
(!hasAccess(conn, nick, channel, "o") && hasAccess(conn, n, channel, "oh")) {
|
||||
if n := conn.GetNick(split[0]); n == nil || (split[0] != nick.Nick &&
|
||||
(!hasAccess(conn, nick, channel, "o") && hasAccess(conn, n, channel, "oh"))) {
|
||||
// if we only have h, we can't kick people with o or h
|
||||
return
|
||||
}
|
||||
|
@ -186,8 +186,8 @@ func kickban(conn *irc.Conn, nick *irc.Nick, args, target string) {
|
|||
split := strings.Split(args, " ", 2)
|
||||
|
||||
n := conn.GetNick(split[0])
|
||||
if n == nil ||
|
||||
(!hasAccess(conn, nick, channel, "o") && hasAccess(conn, n, channel, "oh")) {
|
||||
if n == nil || (split[0] != nick.Nick &&
|
||||
(!hasAccess(conn, nick, channel, "o") && hasAccess(conn, n, channel, "oh"))) {
|
||||
return
|
||||
}
|
||||
conn.Mode(channel, "+b *!*@" + n.Host)
|
||||
|
|
Loading…
Reference in New Issue