PtokaX forum

Development Section => Your Developing Problems => Topic started by: xfernal on 22 January, 2004, 20:22:26

Title: Updating Users From RegisteredUsers.dat Via Script?
Post by: xfernal on 22 January, 2004, 20:22:26
Okay, I have a scheduled VB script running that will update RegisteredUsers.dat with accounts that are in my SQL Server database. Now I need to have a LUA script that will refresh the registered users every 1 minute using that list. Is there a command that I am not aware of to do this? Anyone have any code? I will gladly share my script that will update RegisteredUsers.dat if anyone is interested in syncing website accounts with hub accounts.
Title:
Post by: c h i l l a on 22 January, 2004, 20:44:21
well you could

write the nicks to add into a second file.

and then read out that file with a lua script and

do this func

AddRegUser(nick,pass,profile_index)

done.
Title:
Post by: xfernal on 22 January, 2004, 20:58:31
Is AddRegUser smart enough to not add a duplicate user without throwing an error or do I need to loop through the existing users and see if the user is already registered?

Thats where it would be nice just to refresh the list rather than having to loop through all those users if AddRegUSer is not smart enough. Right now I have 2300+ members.
Title:
Post by: c h i l l a on 22 January, 2004, 21:15:00
well I guess it will not overwrite the old one... but not sure.. haven't tested yet.
Title:
Post by: plop on 22 January, 2004, 23:25:28
AddRegUser(nick, pass, level) - adds new registered user or changes his password and profile if user is already registered
can be solved by stuffing all the regged users in a table.

plop