PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Shurlock on 14 October, 2004, 23:26:57

Title: Confirming user Registered status
Post by: Shurlock on 14 October, 2004, 23:26:57
Hi all,

I'm STUCK!  For some reason I'm not able to detect a few status checks on users in order to enable them to change their password.

I need to check the following:

- is the user online?

If so:
- is the user registered
- is the user NOT registered

That's all I need.

Any help to get me out of a serious 'bugged' loop is welcome!

Thanks in advance (as always!)
Title:
Post by: bastya_elvtars on 14 October, 2004, 23:54:14
GetItemByName(nick)

looks if nick online. returns nil if not, else returns a table, so if u use it as l

usr=GetItemByName(nick) then u can use usr.sIp with it for instance, so returns a table with the well-known user parameters in ptokax

if user.iProfile~=-1

below things will be called if profile index is not -1. as you probably know, -1 means unregistered user.
Title:
Post by: Shurlock on 15 October, 2004, 11:58:07
Thanks for the script Mutor, works perfect.

I still have one small problem though, which will probably not be solved:

Immediately after registering a new user, the profile will not be updated untill the user re-connects.  X(
But, I can live with that.
Title:
Post by: bastya_elvtars on 15 October, 2004, 12:21:47
QuoteOriginally posted by Shurlock
Thanks for the script Mutor, works perfect.

I still have one small problem though, which will probably not be solved:

Immediately after registering a new user, the profile will not be updated untill the user re-connects.  X(
But, I can live with that.

this is a dc++ protocol thing, scripts have nothing 2 do w/ it
Title:
Post by: Herodes on 15 October, 2004, 13:48:41
user:SendData(bot, "please reconnect ( press Ctrl+R ) to enable your new registration")
user:Disconnect()
Title:
Post by: Herodes on 16 October, 2004, 13:48:46
Guibs had used this in his great ChannelBot ,... from my CBExperience this dont work ... :/