PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: GeceBekcisi on 10 November, 2006, 22:08:19

Title: UserBekcisi
Post by: GeceBekcisi on 10 November, 2006, 22:08:19
Well, I wasn't planning to release the LUA 5.1 version of UserBekcisi until I was sure of everything (I didn't have much time to test it); but as there are lots of requests for it here you go folks..

Please do report all the problems you face.. Even if I can't help; I am sure the other scripters around will help you..
Title: Re: UserBekcisi
Post by: TS-SkyNet on 10 November, 2006, 23:17:48
Nice one  i be testing this thx Gєсє?єκсiѕi
Posted on: 10 November 2006, 21:24:28
Only one error i have found  is trying to get the whois on a user i get the following error

UserBekcisi.v1.00.RC3.b010.LUA.5.1 Error: ...Ptokax Hub\scripts\UserBekcisi\System\Functions2.lua:1562: attempt to call field 'BeginConnect' (a nil value)

on ptokax 0.3.5.1
Title: Re: UserBekcisi
Post by: GeceBekcisi on 10 November, 2006, 23:52:19
I was guessing that'd happen.. WHOIS command must be broken because I didn't have time to write a new code for new WSA library.

Please try not to use it for a while, at least until me or someone fixes it..
Title: Re: UserBekcisi
Post by: 6Marilyn6Manson6 on 11 November, 2006, 10:17:28
I Love this script :D
Title: Re: UserBekcisi
Post by: speedX on 11 November, 2006, 11:23:03
Showing me the following error:
Quote
scripts\UserBekcisi.v1.00.RC3.lua:167: bad argument #1 to 'find' (string expected, got nil)

And after making some change suggested by Crazyguy, it is showing the following error
Quote
scripts\UserBekcisi.v1.00.RC3.lua:167: attempt to call global 'frmHubLGetHubDescr' (a nil value)
Wat shud I do now??

Quote from: 6Marilyn6Manson6 on 11 November, 2006, 10:17:28
I Love this script :D

Me 2 ;)
Title: Re: UserBekcisi
Post by: 6Marilyn6Manson6 on 11 November, 2006, 11:46:32
Quote from: speedX on 11 November, 2006, 11:23:03
Me 2 ;)

Hihihi
Title: Re: UserBekcisi
Post by: Thor on 11 November, 2006, 11:55:06
speedX change that line to:
if not string.find(frmHub:GetHubDescr(),"UB.RC3") then
GeceBekcisi:
Please change this line:
frmHub:SetHubDescr("\[UB.RC3\]."..frmHub:GetHubDescr())
to:
frmHub:SetHubDescr("frmHub:GetHubDescr().."\[UB.RC3\].")
Or something like this, because hungarian hubs description must start with [HUN], and if somebody use your great script, that will change. I could modify it, but many hub-owners don't know what caused this.
Title: Re: UserBekcisi
Post by: speedX on 11 November, 2006, 17:15:02
:(

It is showing me the following error even after making tht change:
Quote
scripts\UserBekcisi.v1.00.RC3.lua:167: bad argument #1 to 'find' (string expected, got nil)

In my script line no. 167 looks like this:
Quote
if not string.find(frmHub:GetHubDescr(),"UB.RC3") then frmHub:SetHubDescr("\[UB.RC3\]."..frmHub:GetHubDescr()) end
Title: Re: UserBekcisi
Post by: CrazyGuy on 11 November, 2006, 18:03:57
Quote
And after making some change suggested by Crazyguy, it is showing the following error


scripts\UserBekcisi.v1.00.RC3.lua:167: attempt to call global 'frmHubLGetHubDescr' (a nil value)

Wat shud I do now??


Well i can see you made a typing mistake in frmHub:GetHubDescr()
Title: Re: UserBekcisi
Post by: GeceBekcisi on 11 November, 2006, 18:20:43
First post updated with UserBekcisi v1.00 RC3.1 b010 LUA.5.1 built @ 20061111191154; disabled hub description change & PxWSA usage. Hope you don't have any errors now..
Title: Re: UserBekcisi
Post by: speedX on 11 November, 2006, 19:06:44
showing the following error :(
Quote
scripts\UserBekcisi.v1.00.RC3.1.lua:145: attempt to index global 'WSA' (a nil value)
Title: Re: UserBekcisi
Post by: GeceBekcisi on 11 November, 2006, 19:17:08
First post updated with UserBekcisi v1.00 RC3.1 b010 LUA 5.1 built @ 20061111200935, error fixed.
Title: Re: UserBekcisi
Post by: speedX on 11 November, 2006, 19:41:11
Yes, now its working fine

But after some time it gives error in Ptokax, donno why, but the script works fine ever after the occurence of the error :P
Quote
scripts\UserBekcisi.v1.00.RC3.1.lua:340: attempt to index global 'tOnlineOps' (a nil value)
Title: Re: UserBekcisi
Post by: GeceBekcisi on 11 November, 2006, 22:02:36
I must say wow  :o, interesting error messages you get from the new PtokaX  ::) , PPK has something changed with frmHub calls?  :-\
Title: Re: UserBekcisi
Post by: Mozzilla? on 30 November, 2006, 15:17:43
Nice looking script, but could somebody adapt it so it can work with profile [6] HubOwner ???

Please and Thanks
Title: Re: UserBekcisi
Post by: GeceBekcisi on 30 November, 2006, 20:04:08
Open Settings.lua and modify the table below

Code (lua) Select
tProfiles = {
[-1] = {0,"User"},
[0] = {5,"Master"},
[1] = {3,"Operator"},
[2] = {2,"VIP"},
[3] = {1,"Reg"},
[4] = {4,"Moderator"},
[5] = {6,"NetFounder"},
},


as

Code (lua) Select
tProfiles = {
[-1] = {0,"User"},
[0] = {5,"Master"},
[1] = {3,"Operator"},
[2] = {2,"VIP"},
[3] = {1,"Reg"},
[4] = {4,"Moderator"},
[5] = {6,"NetFounder"},
[6] = {7,"HubOwner"},
},



It is just as simple as this..


NOTE: I assume HubOwner profile should have highest profile level index, so I put "7" as the profile level. But if you want something different (like NetFounder to be higher than HubOwner) you can arrange the numbers as you wish. Don't forget, higher the number is, higher the level is.
Title: Re: UserBekcisi
Post by: Mozzilla? on 02 December, 2006, 00:40:23
Thanks for your reply Gєсє?єκсiѕi, i made the modifications you posted but got the following error when scripts were reset and i reconnected to the hub

Quote[23:31] Syntax ...es\MuZiK-XcHaNgE\scripts\UserBekcisi.v1.00.RC3.1.lua:294: attempt to index field '?' (a nil value)
[23:31] Syntax ...es\MuZiK-XcHaNgE\scripts\UserBekcisi.v1.00.RC3.1.lua:294: attempt to index field '?' (a nil value)

The line of code in the error is

if Data and tSettings.tProfiles[curUser.iProfile][1] <= tSettings.iMaxCheckLevel then

Taken from this section of code from the main script

--// Process each users / IPs
MyINFOArrival = function(curUser, Data)
if curUser then
if ScriptRunning then
tFunctions.Data_LogUser(curUser)
if Data and tSettings.tProfiles[curUser.iProfile][1] <= tSettings.iMaxCheckLevel then
return tFunctions.Check_Main(curUser, Data, 1)
end
end
else
if iDebug == 1 then TraceBack() end
end
end


I'm also getting this error after adding [6] = 1, to all the commands in commands.lua

Quote[23:52] Syntax ...es\MuZiK-XcHaNgE\scripts\UserBekcisi.v1.00.RC3.1.lua:437: attempt to index field '?' (a nil value)
The line of code in the error is

if tSettings.tProfiles[curUser.iProfile][1] <= tSettings.iMaxCheckLevel and tSettings.iCheckSearch == 1 then

Taken from this section of code in the main script

SRArrival = function(curUser, Data)
if curUser and Data then
if tSettings.tProfiles[curUser.iProfile][1] <= tSettings.iMaxCheckLevel and tSettings.iCheckSearch == 1 then
local _,_,From,Reply,FileSize,FreeSlots,TotalSlots,HubNameTTH = string.find(Data, "^%$SR%s+(%S+)%s+(.*)"..string.char(5).."(%d+)%s+(%d+)%/(%d+)"..string.char(5).."(%S+)")
if Reply then
return tFunctions.Check_Main(curUser,Reply,5,HubNameTTH)
end
end
else
if iDebug == 1 then TraceBack() end
end
end
Title: Re: UserBekcisi
Post by: GeceBekcisi on 02 December, 2006, 02:05:36
Try this please and post the output if any error happens..
Title: Re: UserBekcisi
Post by: Mozzilla? on 02 December, 2006, 21:51:43
Thanks for your assistance GeceBekcisi

The script seems to have registered a bot called GeceBekcisi and i can't find it anywhere in the script.

Title: Re: UserBekcisi
Post by: GeceBekcisi on 03 December, 2006, 12:27:25
Well, yesterday I was trying to enter your hub and suddenly a PM popped up saying that I was regged with operator profile, and I couldn't enter your hub later just because I was not notified about the password. Would you mind checking it (not because I want to be an operator of your hub, because of your "GeceBekcisi" bot ;))?
Title: Re: UserBekcisi
Post by: amenay on 12 December, 2006, 23:03:44
Attached below is UserBekcisi with full PxWSA l5.1 compatibility, and with GeoIP fixed. Report any problems here.
Title: Re: UserBekcisi
Post by: GeceBekcisi on 12 December, 2006, 23:39:40
Thank you amenay, I am honored by your efforts and ashamed by my laziness  :-[
Title: Re: UserBekcisi
Post by: 7P-Darkman on 13 December, 2006, 09:37:49
Quote from: amenay on 12 December, 2006, 23:03:44
Attached below is UserBekcisi with full PxWSA l5.1 compatibility, and with GeoIP fixed. Report any problems here.

The file attached is bad... verify, please

Respectfully,


7P-Darkman
Title: Re: UserBekcisi
Post by: CrazyGuy on 13 December, 2006, 11:34:02
Quote from: 7P-Darkman on 13 December, 2006, 09:37:49
The file attached is bad... verify, please

Respectfully,


7P-Darkman

works for me
Title: Re: UserBekcisi
Post by: amenay on 30 December, 2006, 01:33:29
I was thinking back whenever I had to be more conservative on RAM, and how I'd go through the script and stop GeoIP from loading.. then realised maybe it'd be a good option to have in settings. So that's all this update is about, maybe some users shied away from the hefty usage created by GeoIP.  From my tests it made a dramatic difference.  Anyhow, instructions follow.

You'll need to either overwrite your settings file (UserBekcisi\System\Settings.lua) or add this line above iGeoIPisPublic: --Would you like to enable the GeoIP lookup module?
iUseGeoIP = 1,


And you'll also need to delete your Settings.tbl file in UserBekcisi\Data so it can add the new field. (do this while the script is off, as it saves on exit)  The script will recreate this file from the  System\Settings.lua file on startup. Report any problems or questions back here.

Oh, yes.. one more thing, I've seen some conflicting information on where to place PxWSA files in some threads.  Well, I've found you can put them anywhere you want (I do so even with the latest version of D2AF and it updates fine) just so long as you have the Borland dependencies (cc3270.dll) in the PtokaX root.  So to get this working you'll need to have cc3270.dll in the PtokaX root directory. But please, anyone.. feel free to correct me if I'm mistaken.

//ame
Title: Re: UserBekcisi
Post by: ?StIfFLEr?? on 12 December, 2008, 15:41:28
is the converted version available?? to 4.0
Title: Re: UserBekcisi
Post by: GeceBekcisi on 13 December, 2008, 11:52:30
Sorry mate, I am really away from scripting for a looong time, I don't know what changed in LUA language and PtokaX API so I won't be able to convert it..

And since the code is not a small piece of work, I don't know if anyone would like to convert it.
Title: Re: UserBekcisi
Post by: CrazyGuy on 18 December, 2008, 15:01:44
I don't think this script will be converted. It uses libs no longer available.
A re-write would be more in place. Most functionality has been covered already by other scripts/PtokaX by now.

Furthermore, this board is Archived, that should give a pretty clear idea on what will happen to new requests here..  ;)