dont do weird stuff when they are not authenticated with services

This commit is contained in:
vulpine 2020-11-23 19:49:55 -05:00
parent 6b93249843
commit 8388301bc1
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,9 @@ async def send(self,c,n,m):
to = self.users[m.pop(0).lower()].account
except:
await self.message(c, '[\x036coin\x0f] that user is not logged in. refusing so coins are not lost')
if to == '':
await self.message(c, '[\x036coin\x0f] they must authenticate with nickserv.')
return
amount = round(float(m.pop(0)),2)
message = ' '.join(m)
sender = self.users[n.lower()].account
@ -52,6 +55,8 @@ async def balance(self,c,n,m):
m = self.users[m.lower()].account
except:
m = m
if m == '':
m = m
bals = await bal(self)
if m in bals:
latest = self.ledger.find_one(to=m,order_by='-id')