Fix handleJoin for new goirc layout

This commit is contained in:
raylu 2010-12-20 15:05:28 -06:00
parent 04886d6f3c
commit ed3ccb524e
1 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ func handleJoin(conn *irc.Conn, line *irc.Line) {
return
}
channel := conn.GetChannel(line.Args[1])
channel := conn.GetChannel(line.Args[0])
if channel == nil || !channel.Modes.Moderated {
return
}
@ -96,8 +96,8 @@ func handleJoin(conn *irc.Conn, line *irc.Line) {
if nick == nil {
return
}
if hasAccess(conn, nick, line.Args[1], "v") {
conn.Mode(line.Args[1], "+v " + line.Nick)
if hasAccess(conn, nick, line.Nick, "v") {
conn.Mode(line.Args[0], "+v " + line.Nick)
}
}