egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MySQL instead of Eggdrops userfile?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
innu
Voice


Joined: 20 Aug 2006
Posts: 10

PostPosted: Thu Dec 14, 2006 11:05 am    Post subject: Reply with quote

demond wrote:
using SQL is an overkill for the simple task of reading userfile ONCE (on (re)start) and writing it back ONCE an hour

another matter is that the proprietary text format eggdrop uses should be replaced with XML schema, thus allowing for easy userfile manipulation by external tools; but eggdrop is an antiquated piece of software anyway and that won't happen


What do you mean about 'eggdrop is an antiquated piece of software'? Is there something better.

Even xml is better than usual textfile.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Dec 14, 2006 1:17 pm    Post subject: Reply with quote

Using xml might make it easier to alter the user database by hand. But you'd still have the issue of the userfile only being read once, and written every hour or so (making manually editing the userfile pretty pointless in most cases). In the rare occasion you'd have to repair your database manually, I'd probably think current format would be easier to fix by hand than xml. I'm sure there are a few good reasons to edit the database using various xml-tools, tho I'd considder those extremely rare (during my years since 1.0p and numerous botnets, I can count the number of times I've had to edit a userfile by hand on the fingers of my right hand...)

And since the data in the userfile always should be considdered old while your eggie is running, there really would'nt be much point in using any external tools to extract data while the eggie is running...

And as for mysql, I'm not too keen on having to install a mysqld and setting up databases and accounts with proper privileges, just in order to run an eggie.

Oh, and should I someday find a huge need to be able to modify my userlist from a fancy webpage with all the bells and whistles.. I'd just write a tiny script using sockets to allow my php-script to interface with my eggie under controlled conditions...
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Dec 14, 2006 1:41 pm    Post subject: Reply with quote

it would definitely make editing the userfile by hand easier, at least for novices (have you tried XML Notepad?)

but I actually meant another, more important advantage - now that people are used to mySQL db's storing and manipulating all kinds of webpage data, import/export & process eggdrop userfile in XML format would be possible with one-liner tools without any need of special SQL interface in eggdrop

and yes, it is an antiquated software - or to put it mildly, it isn't exactly what you call the bleeding edge of software development or at least a modern day software (my understanding is that there are some developments in integrating modern era technologies - 1.9 branch? - but given the pace of eggheads, we won't be seeing those released in stable builds anytime soon - if ever)
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
whittinghamj
Op


Joined: 21 May 2006
Posts: 103

PostPosted: Thu Mar 08, 2007 12:54 pm    Post subject: Reply with quote

I this is a really old post but Its exactly what I am looking for - does anyone know of a script / module to make this happen?

Cheers
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Mar 08, 2007 1:40 pm    Post subject: Reply with quote

Currently, the user database is very much integrated in the core application, making it impossible to switch the non-volatile datastorage without extensive patching of the core.
That said, what can currently be done with scripts or modules, is to export a copy of the userfile into xml-data, mysqldump-data, or whatever flavor you desire. Performing this would be quite simple. This however, will not allow you to modify the user database from "outside" your eggdrop (that is, you'd still have to rely on eggdrops user database API in order to alter the database in any way).

The outlines for a script to export the database would be something like this, I suppose:
Code:
proc exportdatabase {stream} {
 foreach u [userlist -b] {
  #hosts, laston, info, xtra, comment, email, url, handle, pass
  puts $stream "user: $u"
  puts $stream "hosts: [getuser $u hosts]"
  puts $stream "laston: [getuser $u laston"
  #and so on...
 }
 foreach u [userlist +b] {
  #botfl, botaddr,hosts, laston, info, xtra, comment, email, url, handle, pass
  #same for bots, except they have two additional fields
 }
}

The above proc will expect an already opened file-stream (from either open or socket), and will probably require some tailoring to suit individual needs
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber