Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: anope.db - I LOVE YOU! ... But any documentation?  (Read 2946 times)

0 Members and 1 Guest are viewing this topic.

someone

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 42
    • http://www.somenet.org
anope.db - I LOVE YOU! ... But any documentation?
« on: June 20, 2010, 12:49:37 AM »

First of all: TY!
Finally you did something with the database structure.

I requested "Separate Memoserv's DB from nick and chan db" (on: November 13, 2007, 09:26:14 am) some possibility to delete old memos ;)
Also thumbs up that you did NOT stick with some shit like xml!

But now - as its FINALLY human readable - I would like to know, if there is any documentation for the new database structure?

in love
~someone

edit:
All I know/guessed until now:
Code: [Select]
VER 1 // database struct version
MD <subtype> // Random "metadata" extending/adding info to last NON-MD line?
NC // NickCore *nc = NULL;
NA // NickAlias *na = NULL;
BI // BotInfo - didnt encountered this line on my testserver.
CH // ChannelInfo
OS // OperServInfo

Single Nick + settings + memos
Code: [Select]
NC <nick> password lang memoHardLimit memoSoftLimit
MD FLAGS ... //nickgroup settings
MD <MI == MemoInfo?> <ID> <time> <from> :<text> //Memos MI could mean, that MDline is a memo.
Question: Is there a sense in the ID, except ordering?
What would happen, if anope encounters a missing ID like...
MD MI 1 1250705388 Someone :test1
MD MI 3 1251411578 Someone :test3
because i deleted the memo in the db manually?
would it simply reorder the memos to 1 and 2, would it crash, or would memo 3 get lost? ... ?

the Nick Alias
Code: [Select]
NA <nickCore> <nickAlias> <registered> <lastUsed>
MD FLAGS NOEXPIRE //obvious

the Channel block
Code: [Select]
CH <chan> <registered> <lastUsed> <???> <memolimit>
//obvious settings
MD FOUNDER <nick>
MD LEVELS [<levelName> <levelValue>]{repeat for all levels}
MD FLAGS
MD DESC :<text>
MD TOPIC <setBy> <time> :<text>
MD MLOCK_ON <lockedONModes> // most likely there is also a MLOCK_OFF
MD MI //memos for channel
MD ENTRYMSG :<text>
MD BI TTB BOLDS 0 COLORS 0 REVERSES 0 UNDERLINES 0 BADWORDS 0 CAPS 0 FLOOD 0 REPEAT 0 // WTF IS THIS?!

The OS-Block:
Code: [Select]
OS STATS <maxUsers> <time>

Open questions:
* the ":" in CH and NC - is this some unreal-specific stuff or is this some intended delimiter?
* where are the logon news? they seem to be gone?
* What would happen, if you add "ilogical" MD to fields? Like add MD MLOCK_ON ... to a NC or NA line?
« Last Edit: June 20, 2010, 01:29:49 AM by someone »
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: anope.db - I LOVE YOU! ... But any documentation?
« Reply #1 on: June 20, 2010, 01:49:51 AM »

No currently there is no documentation.

MD MI is memoinfo, yes.

Im not sure why we store memo numbers, something left over from 1.8 I guess. Im not sure what happens if you just remove one.

MD BI TTB BOLDS 0 COLORS 0 REVERSES 0 UNDERLINES 0 BADWORDS 0 CAPS 0 FLOOD 0 REPEAT 0
Is the times to ban for /bs kick for different settings.

The : is for the last token, its what the DB parser users to split up args, eg
MD ENTRYMSG :Entry message goes here
Would be split up into ("MD", "ENTRYMSG", "Entry message goes here")

Logon news should still exist... the db-converter however does not convert them.

Quote
What would happen, if you add "ilogical" MD to fields? Like add MD MLOCK_ON ... to a NC or NA line?

Theoretically nothing, it would be overwritten next DB save.
Logged
Pages: [1]   Go Up