
miniCruzer
Novice
Oct 8, 2010, 5:33 PM
Post #1 of 4
(2652 views)
|
|
Which DBI to use for this project?
|
Can't Post
|
|
A few friends and I are writing an IRC Bot in Perl, and want to incorporate a database file. At the moment, its using text files to read and write, which can become very slow when reading large databases. We need something that is quick, and light (not bucketloads of code). The database (as of now) includes 4 keys, that are: Channel, Admin, Owner, "ATS". Channels are prefixed with "#". Admins are prefixed with "A:", Owners are prefixed with "O:", and "ATS" is prefixed with "ATS". For example, if someone adds a channel runtime, it writes that channel to the database, as If someone adds an ATS command, it writes as
ATS:Call:Response can be more than 1 word It deletes these keys by matching with the prefix, and loads the keys for runtime use with prefixes into arrays and/or hashes. It would be nice to be able to attach extra data to these values, perhaps in the following way:
channels { "#chan1" { createdby = "user", createdon = "date", bans = { "*!*@host1.com", "*!*@host2.com", }, autoop = { "this!user@*", "thisother!user@*", }, "#chan2" { createdby = "user", createdon = "user", modes = "tnsirz", }, }
|