Help With Userdb
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Help With Userdb

Started by Yahoo, 06 February, 2007, 13:07:55

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yahoo

i am getting an error with this script can any1 solve this problem..
[17:32] Syntax C:\Ptokax.0.3.5.2.lua5.1.1.dbg\scripts\userdb.lua:91: unfinished string near '", , , , , '
"BoRN FIGhTEr"

Psycho_Chihuahua

My guess is because that script is for Lua 5 and your using Lua 5.1.1
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Yahoo

can someone make this script for lua 5.1.1
"BoRN FIGhTEr"

Naithif

Quote from: Yahoo on 06 February, 2007, 13:07:55
i am getting an error with this script can any1 solve this problem..
[17:32] Syntax C:\Ptokax.0.3.5.2.lua5.1.1.dbg\scripts\userdb.lua:91: unfinished string near '", , , , , '

There's a line-break in line 91. Remove that break.

            					user:SendData(Bot,"Syntax Error, Syntax = "..Prefix..Cmd1..", , , , , 
, , , , , , ,")


To this

            					user:SendData(Bot,"Syntax Error, Syntax = "..Prefix..Cmd1..", , , , , , , , , , , ,")

Yahoo

Thnks Naithif, now i am getting the following error
Syntax ...scripts\userdb.lua:142: attempt to call a table value
"BoRN FIGhTEr"

Naithif

Try replacing line 142 with

for key, value in pairs(tTable) do


And 98 with

for i,v in pairs(Users) do


Even better, run a 50to51 converter

Yahoo

"BoRN FIGhTEr"

miago

Hi.

Just found this script and I really like it and I would like to hear if these things are possible to do.

1. Is it possible to get the info in pm instead of main?

2. Is it possible to create a choice in the menu where you can list all users registered? If so, can it be in columns?
(ex: Nicknamn   Password   Real Name   Education   Address   Occupation  E-mail
      [1Mbit]XXX robo         Jon Smith    Highschool  47th        Teacher     
      [10Mbit]Y   cop          Jane Doe                     Bigstreet  Between     yep@hotmail.com

3. Is it possible to let the fields be optional so that you are not forced to fill in them all?

4. Is it possible to make the Find function to search even if the whole nick isn't given?
(Ex: Find sara  - gives the result in a list with [3Mbit]Sara, [100Mbit]KalaSara and [OP]sara)

Thx in advance
//Miago
Being a biatch aint easy ;)

miago

Being a biatch aint easy ;)

miago

#9
Hi there Mutor..
You really are a fast dude  :D
I can agree about the columns, but if there is possibility it would be nice to have later on. I run a release/requestbot  (Release/Request Bot v3a - LUA 5.0.2/5.1 by jiten (3/27/2006)) that gives all info in columns, something like that would be super in the future maybe :)
But I'm already happy for what You have done!!!  :)))

Been testing a little and one thing I can't do is add a user like [1Mbit]Peter. Peter works fine, but not with the prefix and I dont get any error message on that.
Another thing about the search, great to get all users :D, but it still works so that you have to write the whole nick when you search for a user? Better to ask you first before commenting that it doesnt work :D

Again, thank you thank you :D
//Miago

Edit:
Tried the search again, I have 2 johan registerd (1mbitjohan and johan)
   Details for user *johan*

   [ Password ] = eeee
   [ Invitedby ] = Pelle
   [ Other ] = coolt va
   [ Email ] =
   [ Regdate ] = 07-02-10
   [ Regby ] = OP-nick
Did a search for johan and got this:
10:02:24] <-Hub-bot-> Sorry -Admin -, no pattern of johan was found in the database.
//miago

Edit2:
The searchfunction only gives feedback on the first user registered when searching for a nick.
I have 4 users reg, Pelle, johan, Kalle, 1mbitjohan (in that order)
The only one I get info about is when searching for Pelle, for the other I get "no pattern"
//Miago

Edit3:
Another question that popped up, when you do a search for all users, is it possible that the list comes in alphabetic order? Thx again
//Miago
Being a biatch aint easy ;)

speedX

#10
Another great script Mutor ;)

Needed one addition if possible,
I want to use only one field of this script (location) , so is it possible to combine it with the addreguser command.
Like !addreguser <nick> <pass> <location>
Also the name of the op who regged the user shud come in the database.


Bug:
My database looks like this
Quote
Details for user *kunalk*
[ Location ] = ghantali

Details for user *champion*
[ Location ] = Mirani Nagar

When i try to delete the entry with name kunalk, it does not get deleted
the command i type is +dbdelete kunalk
Thanking You,

speedX

miago

Ty again :D

The search now works wonderfully.
Ok, since LUA is like arabic to me, and I understand that there are things harder to do, the alphabetic order can rest in peace    ;D 

QuoteBeen testing a little and one thing I can't do is add a user like [1Mbit]Peter. Peter works fine, but not with the prefix and I dont get any error message on that.

This doesn't work, but maybe you havent had time to make it or maybe I wrote to much so it was blended in with all my other comments  :)

Thanks again
//Miago
Being a biatch aint easy ;)

miago

 :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-*

You're the King!!

//miago
Being a biatch aint easy ;)

Yahoo

sir i am using userdb 2.0
i will like to have a small change in the script
sir there are some users in my hub whose nick
are not accepted by the script for eg:
??????????????
CyRuS?
etc
"BoRN FIGhTEr"

Creative

Hello Sir,
           Can u tell me which code i should change if i want Operators to see only Add/Edit entry and not (Delete, Query Database, UserDB 2.0b Commands) option in Right Click. But Masters can see and use all options from Right Click.

Psycho_Chihuahua

i found a small minor bug Mutor

when a User enters an address in form of -->        location, Country (example   Lucerne, Switzerland)
the script crashes which is launched by the comma

is it possible to fix that?
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Creative

Great Work Mutor :)
                 
I would like you to add 1 more thing, when a Operator add any user's info, it should be saved with his nick too.
I mean while reading any user's db by +dbread nick, it should show which operator added the Info.
This will be a good addition if done,
For Example,
<[UserDB]> 

	Details for user *protocol*
             [ Operator ] = Creative

	[ password ] = alien
	[ name ] = James
	[ address ] = 45 street
	[ education ] = Engineering
	[ occupation ] = student
	[ email ] = xyz@yahoo.com


thanks in advance :)

Creative

Sorry Mutor, but i didnt understand what u said.
I just thought if you can add the function so that if we do +dbread then it will show the Operator name too who added the info.

Creative

Sir, can you show me how to add that field??  ???

achiever

i think if changed then this is how ur columns should look
-- Command(s) will be updated once script is saved/restarted
Columns = {
	"password",
	"operator",
	"name",
	"education",
	"address",
	"occupation",
	"email"
	},
thks,
achiever.

Creative

Thankx, but i was thinking, if the operators name get saved automatically. And at the time of +read the name of the operator will be shown.

And 1 more thing,
When Operator puts an User's Info, the script will save the info as well as it will reg tht user(as nick/pass is also added)
So no need to reg the user again by +addreguser command.
Saving the user's info and registering the user will be done by the script itself.

Creative

Hello Mutor...
                 Actually, i have tried keeping this script open for users, but there are some users who add fake info too... so it creates havoc.......
In my hub, users PM operators from other hub to register them...... so while registering them, operators take info and reg them, and then the Operators add info in UserDB. So i would like if you add 1 more function so that when any Operator adds Info, at the same time, the user will get registered as we put nick and pass in userdb.
My columns are as follows:
Columns = {
   "password",
   "Full_Name",
   "DOB",
   "Address",
   "Phone_No.",
   "Education",
   "Operator_Nick",
   },

achiever

i think u r in need of this http://forum.ptokax.org/index.php?topic=5445.0#top

but its a lua 5 versions and will need coneversion and gives me error
[20:14] Syntax E:\Downloads\0.3.5.2[Fusion Hub]\scripts\regdb.lua:158: attempt to call a table value
thks,
achiever.

SMF spam blocked by CleanTalk