Browse Source

Use userExists

hs/check-pls
Will Hunt 3 years ago
parent
commit
164032a2f8
  1. 4
      clients/clients.go

4
clients/clients.go

@ -338,8 +338,8 @@ func (c *Clients) onRoomMemberEvent(client *BotClient, event *mevt.Event) {
client.LeaveRoom(rID) client.LeaveRoom(rID)
return return
} }
var pl = plContent.Users[event.Sender.String()]
if pl == 0 {
var pl, userExists = plContent.Users[event.Sender.String()]
if !userExists {
pl = plContent.UsersDefault pl = plContent.UsersDefault
} }
if pl < client.config.MinimumPowerLevel { if pl < client.config.MinimumPowerLevel {

Loading…
Cancel
Save