chatServer/modules/messageid.py

7 lines
261 B
Python
Raw Permalink Normal View History

2021-10-28 06:17:07 +00:00
global getMessageId
def getMessageId():
messageId = dbGet(p(sp,"server.db"),"MESSAGES","messageId")
if messageId == False: messageId = "-1"
messageId = str(int(messageId) + 1)
dbSet(p(sp,"server.db"),"MESSAGES","messageId",messageId)
return messageId