25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Improve example extauth script

This commit is contained in:
Evgeniy Khramtsov 2018-02-16 20:34:09 +03:00
parent 71a856deaa
commit f5d208441d

View File

@ -13,6 +13,10 @@ def read():
write(True) write(True)
elif cmd == 'isuser': elif cmd == 'isuser':
u, s = pkt.split(':', 2)[1:] u, s = pkt.split(':', 2)[1:]
if u == "wrong":
write(False)
else:
write(True)
elif cmd == 'setpass': elif cmd == 'setpass':
u, s, p = pkt.split(':', 3)[1:] u, s, p = pkt.split(':', 3)[1:]
write(True) write(True)