This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Users in SQL db?

Old posts that have not been replied to for several years.
Locked
t
tuffy
Voice
Posts: 2
Joined: Sun Jan 30, 2005 6:36 pm

Users in SQL db?

Post by tuffy »

Hello

Anyone know of any script/module that stores eggdrop users in a sql db?
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

no i think, it doesn't exist , i was looking for that as well, with no succes.. but if you do find it plz post
XplaiN but think of me as stupid
s
shanks
Voice
Posts: 19
Joined: Mon Aug 18, 2003 7:03 am

Post by shanks »

I used to have one... I had my bot use it to share user accounts with a website...

don't think i've got it any more though - was planning on writing a new one soon though. much more efficient aswell. (it will be with a MySQL DB however)
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

? just put the usernames into a mysql db would be easy but using a mysql db as a user file is something entirely different, well not easy easy just not that hard to do .. i gues..
XplaiN but think of me as stupid
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

i believe its easier to make a web (php?!) script to read the .user data and write to a telnet connection than running an eggdrop in read/write to an sql db :).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

As long as you have a php backend that access's the mysql database you could quite easily bind on join pass the hostmask across the $_GET line and if the php script comes back as true or false, op or dont op. then you can extend on that with various replies for whatever you want to do. trigger commands etc etc. I used this method for a channel protect script that also allowed users onto a webpage so i could modify the users settings on the webpage and the bot would be updated accordingly. Works well except for when mysql or apache went down, the bot just sat there and did nothing :)
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
t
tuffy
Voice
Posts: 2
Joined: Sun Jan 30, 2005 6:36 pm

HI!

Post by tuffy »

The main thought was to use the same username/password with the website. All info in the same mysql db so you could easily fetch/change the info from irc or the web.


Would be nice if someone could do something so that all info that is in the user file is stored in a mysql db instead. My programing experience is realy poor so i can't do it. :-(

Thanks for the replies!
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

you should be able to change the eggdrop's source in such a way that it does that, but it ain't easy. I'm still hoping that eggheads will make it possible...
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

still you can't just bind all stuff in a mysql db it would always overwrite the bot will take his cached data in favor of the db so all you would able to do is read data thats it
XplaiN but think of me as stupid
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

thats why I suggested to use telnet to update changes from web to the bot. This way you will not have to change the bots usermanagement in any way. You might want to change the user file save to every 5min in the source or so ^-^
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

De Kus wrote:thats why I suggested to use telnet to update changes from web to the bot. This way you will not have to change the bots usermanagement in any way. You might want to change the user file save to every 5min in the source or so ^-^
my point exactly if you changed something in those 5 mins on dcc and bot loads the mysql db you would have to do it all over again my point is that you need a direct interface a scriptable webserver which i am working on no use using mysql cause you will always end up [censored] up the user file .. unless you write directly to the user file when you do a party line event. for example when you change modes write it directly in a db instead of caching it into memory and writing it away later on.

but thats not just a small change in the bot but a huge. and beleve me with all them sockets you guys are planning to use .. then your beter of using a script directly into the bot cause lets face it http admin interface is what he is looking for.
XplaiN but think of me as stupid
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

what every bot does is save the userfile every hour. So if you would make a script or module that uploads the userfile into a mysql DB every x minutes/hours then ur problem is solved. If you want to be able to edit either the DB or the userfile in cache, then you'd have to make a synchronization module that checks the changes in either and then chooses to upload to/ download from the DB...
Locked