Allow users with h to kick and kb themselves

This commit is contained in:
raylu 2010-10-29 17:13:33 -04:00
parent 585963cd2e
commit f7e3c71249
1 changed files with 4 additions and 4 deletions

View File

@ -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)