mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
fix house password checking
This commit is contained in:
@@ -142,7 +142,10 @@ func handleMsgMhfLoadHouse(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
bf := byteframe.NewByteFrame()
|
bf := byteframe.NewByteFrame()
|
||||||
if pkt.Destination != 9 && len(pkt.Password) > 0 && pkt.CheckPass {
|
if pkt.Destination != 9 && len(pkt.Password) > 0 && pkt.CheckPass {
|
||||||
var password string
|
var password string
|
||||||
s.server.db.Select(&password, `SELECT house_password FROM user_binary WHERE id=$1`, pkt.CharID)
|
err := s.server.db.Get(&password, `SELECT house_password FROM user_binary WHERE id=$1`, pkt.CharID)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
if pkt.Password != password {
|
if pkt.Password != password {
|
||||||
doAckSimpleFail(s, pkt.AckHandle, make([]byte, 4))
|
doAckSimpleFail(s, pkt.AckHandle, make([]byte, 4))
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user