Difference between revisions of "2.0/Mysql:Scheme"

From AnopeWiki
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
* Work in progress
 
 
 
*'''NOTE''': These tables are usually prefixed by the prefix= entry in the services.conf configuration file.
 
*'''NOTE''': These tables are usually prefixed by the prefix= entry in the services.conf configuration file.
 
:'''Example''': anope_db_AutoKick
 
:'''Example''': anope_db_AutoKick
 +
 +
These tables are auto-created when you use m_sql and/or m_sql_live.  Do not alter their formats unless you really know what you are doing.  Changes could result in data corruption or preventing services from accessing the data.
 +
  
 
== <div class="moduleheader">AutoKick</div> ==
 
== <div class="moduleheader">AutoKick</div> ==
Line 30: Line 30:
  
 
== <div class="moduleheader">BotInfo</div> ==
 
== <div class="moduleheader">BotInfo</div> ==
 +
:;BotServ information :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
Line 52: Line 54:
  
 
== <div class="moduleheader">ChanAccess</div> ==
 
== <div class="moduleheader">ChanAccess</div> ==
 +
:;Chanserv Access information :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 +
|-
 +
|id || Internal ID for the channel Access entry
 +
|-
 +
|timestamp || Date and time it was created
 +
|-
 +
|ci || Channel Name
 +
|-
 +
|created || Unix Datetime for creation of entry
 +
|-
 +
|creator || Who added the entry
 +
|-
 +
|data || Access level, flag(s), and/or xOP level
 +
|-
 +
|last_seen || Last time the user was seen joining the channel
 +
|-
 +
|mask || Hostmask for this entry
 +
|-
 +
|provider || Type of Access list entry
 
|-
 
|-
 
|}
 
|}
  
 
== <div class="moduleheader">ChannelInfo</div> ==
 
== <div class="moduleheader">ChannelInfo</div> ==
 +
:;Channel registration and settings :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 
|-
 
|-
 +
|id || Internal ID number for this entry
 +
|-
 +
|timestamp || Date and time this entry was created or last updated
 +
|-
 +
|BS_FANTASY || Is BotServ's Fantasy commands enabled flag
 +
|-
 +
|BS_GREET || Is Botserv's channel Greeting enabled flag
 +
|-
 +
|CS_SECURE || Is Chanserv's secure channel flag enabled
 +
|-
 +
|KEEPTOPIC || Flag to determine if Chanserv should reset the topic when someone tries to change it
 +
|-
 +
|PEACE ||  Peave Flag. When peace is set, a user won't be able to kick, ban or remove a channel status of a user that has a level superior or equal to his via ChanServ commands.
 +
|-
 +
|SECUREFOUNDER ||  SecureFounder flag. When secure founder is set, only the real founder will be able to drop the channel, change its founder and its successor.
 +
|-
 +
|SIGNKICK || Signed Kick flag. Should the person who does a chanserv kick have their nick appended
 +
|-
 +
|TOPICLOCK || Topiclock Flag. When topiclock is set, the channel topic will be unchangeable except via the chanserv topic command
 +
|-
 +
|banexpire || Bans should auto expire after this time
 +
|-
 +
|bantype || Sets the ban type that will be used by services whenever they need to ban someone from your channel.  See Chanserv's SET BANTYPE for details.
 +
|-
 +
|capsmin || Minimum number of caps, before check for a ban
 +
|-
 +
|capspercent || Persentage of caps in a line to ban on.
 +
|-
 +
|description || Channel description
 +
|-
 +
|floodline || Number of lines to ban for flooding
 +
|-
 +
|floodsecs || Number of seconds to check number of lines for banning
 +
|-
 +
|founder || Channel owner
 +
|-
 +
|kickerdata:amsgs || Statistics, how many akicks.
 +
|-
 +
|kickerdata:badwords || Statistics, how many badword kicks
 +
|-
 +
|kickerdata:bolds || Statistics, how many bold kicks
 +
|-
 +
|kickerdata:caps || Statistics, how many caps kicks
 +
|-
 +
|kickerdata:colors || Statistics, how many color kicks
 +
|-
 +
|kickerdata:flood || Statistics, how many flood kicks
 +
|-
 +
|kickerdata:italics || Statistics, how many italic kicks
 +
|-
 +
|kickerdata:repeat || Statistics, how many repeated lines kicks
 +
|-
 +
|kickerdata:reverses || Statistics, how many reverse text kicks
 +
|-
 +
|kickerdata:underlines || Statistics, how many underline text kicks
 +
|-
 +
|last_topic || The topic currently set by Chanserv
 +
|-
 +
|last_topic_setter || Person who set the last topic
 +
|-
 +
|last_topic_time || Unixtime date and time topic was last reset
 +
|-
 +
|last_used ||  Last time someone on the access list joined the channel
 +
|-
 +
|levels || Access levels for channel.  See Chanserv's LEVELS command for details.
 +
|-
 +
|memomax || Maximum number of channel memos.
 +
|-
 +
|name || Channel name
 +
|-
 +
|repeattimes || How many repeated lines before kicking.
 +
|-
 +
|time_registered || Unixtime data and time channel was registered.
 +
|-
 +
|ttb || Time to ban
 +
|-
 +
|CS_PRIVATE || Private flag. When private is set, the channel will not appear in ChanServ's LIST command
 +
|-
 +
|CS_NO_EXPIRE || No Expire flag.  Should the channel expire be ignored if the cahnnel sits unused for longer than the expire time of channels.
 +
|-
 +
|SECUREOPS || SecureOps Flag.  When secure ops is set, users who are not on the userlist will not be allowed chanop status
 +
|-
 +
|bi || Assigned Bot nick, if any.
 +
|-
 +
|successor || Successor for channel ownership if the current channel's founder's nick expires.
 +
|-
 +
|}
 +
 +
== <div class="moduleheader">EntryMsg</div> ==
 +
:;Channel Entry Message :
 +
 +
:{| class="modules sortable"
 +
! Column || Description
 +
|-
 +
|id || Internal ID number of entry
 +
|-
 +
|timestamp || Date and Time entry was last updated or created
 +
|-
 +
|ci || Channel name
 +
|-
 +
|creator || who set it
 +
|-
 +
|message || Entry message to display to users
 +
|-
 +
|when || When was it last updated or created, unixtime format.
 
|}
 
|}
  
 
== <div class="moduleheader">Exception</div> ==
 
== <div class="moduleheader">Exception</div> ==
 +
:;IP Limit Exception list :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 +
|-
 +
|id || internal ID number for this entry
 +
|-
 +
|timestamp || Date and time entry was last updated or created
 +
|-
 +
|expires || Expires after how long
 +
|-
 +
|limit || How many connections are allowed as the exception
 +
|-
 +
|mask || hostmask to allow
 +
|-
 +
|reason || Why they were allowed the exception
 +
|-
 +
|time || Unixtime format for the last time the record was updated, or created.
 +
|-
 +
|who || who set the exception
 
|-
 
|-
 
|}
 
|}
  
 
== <div class="moduleheader">ForbidData</div> ==
 
== <div class="moduleheader">ForbidData</div> ==
 +
:;Forbid Channel/Nick information :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 +
|-
 +
|id || Internal ID number of the entry
 +
|-
 +
|timestamp || Date and Time entry was last updated or created
 +
|-
 +
|created || Unixtime format of date/time when it was created.
 +
|-
 +
|creator || Who created the entry
 +
|-
 +
|expires || when to expire
 +
|-
 +
|mask || What to forbid
 +
|-
 +
|reason || Why banned
 +
|-
 +
|type || mask type (1: nick, 2: channel, 3: email, etc)
 
|-
 
|-
 
|}
 
|}
  
 
== <div class="moduleheader">Memo</div> ==
 
== <div class="moduleheader">Memo</div> ==
 +
:;MemoServ memos :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 +
|-
 +
|id || Internal ID number
 +
|-
 +
|timestamp || Date and time entry was last modified or created
 +
|-
 +
|owner || Recipient of the memo
 +
|-
 +
|receipt || Should a read receipt be sent flag
 +
|-
 +
|sender || Who sent the memo
 +
|-
 +
|text || The text of the memo
 +
|-
 +
|time || Unixtime format, of last time the memo was created, accessed, or modified
 +
|-
 +
|unread || Read status of the memo
 
|-
 
|-
 
|}
 
|}
  
 
== <div class="moduleheader">NewsItem</div> ==
 
== <div class="moduleheader">NewsItem</div> ==
 +
:;Logon/Oper/Random-News :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 +
|-
 +
|id || Internal ID number of the entry
 +
|-
 +
|timestamp || Date and time that this entry was created, or updated
 +
|-
 +
|text || News item text to be displayed
 +
|-
 +
|time || Unixtime format of the creation date of this entry
 +
|-
 +
|type || News item type LogonNews, OperNews, RandomNews
 +
|-
 +
|who || Who submitted the news item
 
|-
 
|-
 
|}
 
|}
  
 
== <div class="moduleheader">NickAlias</div> ==
 
== <div class="moduleheader">NickAlias</div> ==
 +
:;Nick information :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 
|-
 
|-
 +
|id || Internal ID number of record
 +
|-
 +
|timestamp || Last date and time of record creation or update
 +
|-
 +
|NS_NO_EXPIRE || Nick No-expire flag
 +
|-
 +
|last_quit || Last seen quit message
 +
|-
 +
|last_realhost || Last seen real hostmask
 +
|-
 +
|last_realname || Last seen client supplied real name
 +
|-
 +
|last_seen || Unixtime format, last seen date and time
 +
|-
 +
|last_usermask || Last seen user's hostmask as seen by others
 +
|-
 +
|nc || Nick Core name
 +
|-
 +
|time_registered || Unixtime format, date and time of nick registration
 +
|-
 +
|vhost_creator || Who created the user's vhost
 +
|-
 +
|vhost_vhost || The  domain portion of the supplied virtual host
 +
|-
 +
|vhost_ident || The username part of the hostmask supplied for the virtual host
 +
|-
 +
|vhost_time || Unixtime format, Date and time vhost was created.
 
|}
 
|}
  
 
== <div class="moduleheader">NickCore</div> ==
 
== <div class="moduleheader">NickCore</div> ==
 +
:;NickServ nick-core information common to all registered nicks for a user :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 +
|-
 +
|id || Internal ID number of the record
 +
|-
 +
|timestamp || Last date and time record was created or updated
 +
|-
 +
|AUTOOP || Auto Op Flag
 +
|-
 +
|HIDE_EMAIL || Hide email in whois flag
 +
|-
 +
|HIDE_MASK || Hide last hostmask flag
 +
|-
 +
|MEMO_RECEIVE || Memo recieve flag
 +
|-
 +
|MEMO_SIGNON || Check for new memos at signon flag
 +
|-
 +
|NS_PRIVATE || Private flag
 +
|-
 +
|NS_SECURE || Secure flag
 +
|-
 +
|access || hostmask access list
 +
|-
 +
|display || Nick used for main nick display
 +
|-
 +
|email || Email address for nick group
 +
|-
 +
|language || Language setting
 +
|-
 +
|memomax || Max number of memos that can be recieved at one time
 +
|-
 +
|pass || Password.  Encrypted, or not as defined by services.conf modules
 +
|-
 +
|KILL_QUICK || Quick Kill flag
 +
|-
 +
|KILLPROTECT || Kill protection flag
 +
|-
 +
|MSG || Nick entry message text displayed in channels that have the option enabeled
 +
|-
 +
|KILL_IMMED || Immediate kill flag
 +
|-
 +
|}
 +
 +
== <div class="moduleheader">SeenInfo</div> ==
 +
:;Seen information :
 +
 +
:{| class="modules sortable"
 +
! Column || Description
 +
|-
 +
|id || Internal ID for this record
 +
|-
 +
|timestamp || Last date and time this record was created or updated
 +
|-
 +
|channel || Channel name
 +
|-
 +
|last || Unixtime format, last seen date and time for this record
 +
|-
 +
|message || What they did
 +
|-
 +
|nick || Nick that triggered this seen entry
 +
|-
 +
|nick2 || What nick they may be.
 +
|-
 +
|type || Seen info type
 +
|-
 +
|vhost || Virtual host of nick
 
|-
 
|-
 
|}
 
|}
  
 
== <div class="moduleheader">Stats</div> ==
 
== <div class="moduleheader">Stats</div> ==
 +
:;Statitstics :
 +
 
:{| class="modules sortable"
 
:{| class="modules sortable"
 
! Column || Description
 
! Column || Description
 +
|-
 +
|id || Internal ID number for this record
 +
|-
 +
|timestamp || Last date and time this record was updated or created
 +
|-
 +
|maxusercnt || Max user count seen on the network
 +
|-
 +
|maxusertime || Unixtime format, date and time entry was placed in database
 +
|}
 +
 +
== <div class="moduleheader">XLine</div> ==
 +
:;Bans :
 +
 +
:{| class="modules sortable"
 +
! Column || Description
 +
|-
 +
|id || Internal ID number for this record
 +
|-
 +
|timestamp || Date and time of last record update or creation
 +
|-
 +
|by || Who set the ban
 +
|-
 +
|created || The date and time in Unixtime format that this record was updated
 +
|-
 +
|expires || The unixtime format for the date and time the ban expires
 +
|-
 +
|manager || What type of ban management is stored
 +
|-
 +
|mask || Hostmask to ban
 +
|-
 +
|reason || Ban reason
 +
|-
 +
|uid || Bad id for easy removal
 
|-
 
|-
 
|}
 
|}

Latest revision as of 20:24, 30 May 2014

  • NOTE: These tables are usually prefixed by the prefix= entry in the services.conf configuration file.
Example: anope_db_AutoKick

These tables are auto-created when you use m_sql and/or m_sql_live. Do not alter their formats unless you really know what you are doing. Changes could result in data corruption or preventing services from accessing the data.


AutoKick

Channel AutoKick List 
Column Description
id Entry ID number
timestamp Date and time akick was set
addtime UnixTime akick was added
ci Channel name
creator Who set the akick
last_used Unixtime of when last kick was done
mask hostmask to auto kick
reason Reason for kick

BotInfo

BotServ information 
Column Description
id Botinformation ID Number
timestamp Human readable date and time that the bot was created
created Unix Timestamp for the date and time that the bot was created
host Hostname defined for the bot
nick IRC Nick for the bot.
oper_only Flag to determine of the bot is for ircop access only
realname Real-name field for /whois information
user Ident/Username field for /whois information

ChanAccess

Chanserv Access information 
Column Description
id Internal ID for the channel Access entry
timestamp Date and time it was created
ci Channel Name
created Unix Datetime for creation of entry
creator Who added the entry
data Access level, flag(s), and/or xOP level
last_seen Last time the user was seen joining the channel
mask Hostmask for this entry
provider Type of Access list entry

ChannelInfo

Channel registration and settings 
Column Description
id Internal ID number for this entry
timestamp Date and time this entry was created or last updated
BS_FANTASY Is BotServ's Fantasy commands enabled flag
BS_GREET Is Botserv's channel Greeting enabled flag
CS_SECURE Is Chanserv's secure channel flag enabled
KEEPTOPIC Flag to determine if Chanserv should reset the topic when someone tries to change it
PEACE Peave Flag. When peace is set, a user won't be able to kick, ban or remove a channel status of a user that has a level superior or equal to his via ChanServ commands.
SECUREFOUNDER SecureFounder flag. When secure founder is set, only the real founder will be able to drop the channel, change its founder and its successor.
SIGNKICK Signed Kick flag. Should the person who does a chanserv kick have their nick appended
TOPICLOCK Topiclock Flag. When topiclock is set, the channel topic will be unchangeable except via the chanserv topic command
banexpire Bans should auto expire after this time
bantype Sets the ban type that will be used by services whenever they need to ban someone from your channel. See Chanserv's SET BANTYPE for details.
capsmin Minimum number of caps, before check for a ban
capspercent Persentage of caps in a line to ban on.
description Channel description
floodline Number of lines to ban for flooding
floodsecs Number of seconds to check number of lines for banning
founder Channel owner
kickerdata:amsgs Statistics, how many akicks.
kickerdata:badwords Statistics, how many badword kicks
kickerdata:bolds Statistics, how many bold kicks
kickerdata:caps Statistics, how many caps kicks
kickerdata:colors Statistics, how many color kicks
kickerdata:flood Statistics, how many flood kicks
kickerdata:italics Statistics, how many italic kicks
kickerdata:repeat Statistics, how many repeated lines kicks
kickerdata:reverses Statistics, how many reverse text kicks
kickerdata:underlines Statistics, how many underline text kicks
last_topic The topic currently set by Chanserv
last_topic_setter Person who set the last topic
last_topic_time Unixtime date and time topic was last reset
last_used Last time someone on the access list joined the channel
levels Access levels for channel. See Chanserv's LEVELS command for details.
memomax Maximum number of channel memos.
name Channel name
repeattimes How many repeated lines before kicking.
time_registered Unixtime data and time channel was registered.
ttb Time to ban
CS_PRIVATE Private flag. When private is set, the channel will not appear in ChanServ's LIST command
CS_NO_EXPIRE No Expire flag. Should the channel expire be ignored if the cahnnel sits unused for longer than the expire time of channels.
SECUREOPS SecureOps Flag. When secure ops is set, users who are not on the userlist will not be allowed chanop status
bi Assigned Bot nick, if any.
successor Successor for channel ownership if the current channel's founder's nick expires.

EntryMsg

Channel Entry Message 
Column Description
id Internal ID number of entry
timestamp Date and Time entry was last updated or created
ci Channel name
creator who set it
message Entry message to display to users
when When was it last updated or created, unixtime format.

Exception

IP Limit Exception list 
Column Description
id internal ID number for this entry
timestamp Date and time entry was last updated or created
expires Expires after how long
limit How many connections are allowed as the exception
mask hostmask to allow
reason Why they were allowed the exception
time Unixtime format for the last time the record was updated, or created.
who who set the exception

ForbidData

Forbid Channel/Nick information 
Column Description
id Internal ID number of the entry
timestamp Date and Time entry was last updated or created
created Unixtime format of date/time when it was created.
creator Who created the entry
expires when to expire
mask What to forbid
reason Why banned
type mask type (1: nick, 2: channel, 3: email, etc)

Memo

MemoServ memos 
Column Description
id Internal ID number
timestamp Date and time entry was last modified or created
owner Recipient of the memo
receipt Should a read receipt be sent flag
sender Who sent the memo
text The text of the memo
time Unixtime format, of last time the memo was created, accessed, or modified
unread Read status of the memo

NewsItem

Logon/Oper/Random-News 
Column Description
id Internal ID number of the entry
timestamp Date and time that this entry was created, or updated
text News item text to be displayed
time Unixtime format of the creation date of this entry
type News item type LogonNews, OperNews, RandomNews
who Who submitted the news item

NickAlias

Nick information 
Column Description
id Internal ID number of record
timestamp Last date and time of record creation or update
NS_NO_EXPIRE Nick No-expire flag
last_quit Last seen quit message
last_realhost Last seen real hostmask
last_realname Last seen client supplied real name
last_seen Unixtime format, last seen date and time
last_usermask Last seen user's hostmask as seen by others
nc Nick Core name
time_registered Unixtime format, date and time of nick registration
vhost_creator Who created the user's vhost
vhost_vhost The domain portion of the supplied virtual host
vhost_ident The username part of the hostmask supplied for the virtual host
vhost_time Unixtime format, Date and time vhost was created.

NickCore

NickServ nick-core information common to all registered nicks for a user 
Column Description
id Internal ID number of the record
timestamp Last date and time record was created or updated
AUTOOP Auto Op Flag
HIDE_EMAIL Hide email in whois flag
HIDE_MASK Hide last hostmask flag
MEMO_RECEIVE Memo recieve flag
MEMO_SIGNON Check for new memos at signon flag
NS_PRIVATE Private flag
NS_SECURE Secure flag
access hostmask access list
display Nick used for main nick display
email Email address for nick group
language Language setting
memomax Max number of memos that can be recieved at one time
pass Password. Encrypted, or not as defined by services.conf modules
KILL_QUICK Quick Kill flag
KILLPROTECT Kill protection flag
MSG Nick entry message text displayed in channels that have the option enabeled
KILL_IMMED Immediate kill flag

SeenInfo

Seen information 
Column Description
id Internal ID for this record
timestamp Last date and time this record was created or updated
channel Channel name
last Unixtime format, last seen date and time for this record
message What they did
nick Nick that triggered this seen entry
nick2 What nick they may be.
type Seen info type
vhost Virtual host of nick

Stats

Statitstics 
Column Description
id Internal ID number for this record
timestamp Last date and time this record was updated or created
maxusercnt Max user count seen on the network
maxusertime Unixtime format, date and time entry was placed in database

XLine

Bans 
Column Description
id Internal ID number for this record
timestamp Date and time of last record update or creation
by Who set the ban
created The date and time in Unixtime format that this record was updated
expires The unixtime format for the date and time the ban expires
manager What type of ban management is stored
mask Hostmask to ban
reason Ban reason
uid Bad id for easy removal