Technical Documents:MySQL:Scheme
From AnopeWiki
This list was compiled by iScripters. It is aimed at stripping down the Anope MySQL Database Structure into normal language (It tells what field is used for what).
If you find any incorrect data or you know where a field is used for which is marked as Unknown, feel free to update the page, if you belive a description can be fixed use this page's talk page to address it.
anope_bs_core
| Column | Description |
| bs_id | This field is used to store the ID number of a bot created in BotServ. |
| nick | This field contains the nickname for the created bot. |
| user | This field containts the username for the created bot. |
| host | This field contains the hostname for the created bot. |
| rname | This field contains the real name for the created bot. |
| flags | This field contains the flags given to a created bot. |
| created | This field contains a timestamp which indicates when the bot was created. |
| chancount | This field contains the number of channels a bot is assigned to. |
| user | This field containts the username for the created bot. |
anope_cs_access
| Column | Description |
| ca_id | This field contains an ID number for every access entry of all channels. |
| in_use | This field shows if it is in use or not (1 or 0). |
| level | This field containts the access level a user has got. |
| display | This field contains the nickname belonging to an access level. |
| channel | This field contains the channel where the access level is used on. |
| last_seen | This field contains a timestamp which indicates when display was last seen on channel. |
anope_cs_akicks
| Column | Description |
| ck_id | The ID number for the akick |
| channel | The channel where the akick is used on |
| flags | Flags assigned to the akick |
| dmask | The mask on which the akick applies |
| reason | The reason why the akick has been set |
| creator | The nickname of the user that set the akick |
| addtime | A UNIX timestamp which indicates when the akick has been set |
anope_cs_badwords
| Column | Description |
| cw_id | The ID number for the badword |
| channel | The channel where the badword is used on |
| word | The badword itself |
| type | The type flag which tells anope what to look for
ANY 0 |
anope_cs_info
| Column | Description |
| ci_id | The ID number of a channel |
| name | The channel name |
| founder | The channel founder's nick |
| successor | The channel successor's nick |
| founderpass | The founderpass used to log in as channel founder |
| descr | The channel description |
| url | The URL assigned to the channel |
| The email address assigned to the channel | |
| time_registered | A UNIX timestamp indicating when the channel was registered |
| last_used | A UNIX timestamp indicating when the channel was last used |
| last_topic | The last known topic |
| last_topic_setter | The nickname of the user that was seen setting the last topic |
| last_topic_time | A UNIX timestamp indicating when the last topic seen has been set |
| flags | The flags assigned to the channel (see discussion page) |
| forbidby | The user that has made this channel fobidden, if the channel is forbidden at all |
| forbidreason | The reason why the channel has been forbidden, if the channel has been forbidden at all |
| bantype | The bantype services will use when placing bans |
| accesscount | The current number of entries in the access list for this channel |
| akickcount | The number of akicks active on this channel |
| mlock_on | The OR'd set of the flags defining which channel mlocks are on for this channel (see IRCd doc) |
| mlock_off | The OR'd set of the flags defining which mlocks are off for this channel (see IRCd doc) |
| mlock_limit | The parameter of the limit (+l) mode, if it is mlocked in mlock_on |
| mlock_key | The parameter of the key (+k) mode, if it is mlocked in mlock_on |
| mlock_flood | The parameter of the flood (+f) mode, if it is mlocked in mlock_on |
| mlock_redirect | The parameter of the redirect (+L) mode, if it is mlocked in mlock_on |
| entry_message | The entry message for this channel, displayed when any user joins |
| memomax | The maximum number of memos a channel can receive |
| botnick | The nickname of the bot assigned to this channel, if there is a bot assigned at all |
| botflags | The flags given to the bot assigned to this channel, if there is a bot assigned at all |
| bwcount | The number of badwords active on this channel |
| capsmin | The minimum number of capitals to write before being kicked |
| capspercent | The minimum percentage of capitals to write before being kicked |
| floodlines | The maximum number of lines within floodsecs seconds (see below) before it's assumed to be flood |
| floodsecs | The threshold under which more than floodlines lines are assumed to be flood |
| repeattimes | The maximum number of repeated lines before a user gets banned |
| active | Wether the channel is active (1) or not (0) |
anope_cs_levels
| Column | Description |
| cl_id | The ID number for each access level |
| channel | The channel where the access level is used on |
| position | The number corresponding to the access name (between 0 and 35) |
| level | The level the access is set to (between -9999 and 9999) |
anope_hs_core
| Column | Description |
| bs_id | The ID number for a vhost |
| nick | The nickname the vhost is applied to |
| vident | The virtual-ident for the nickname |
| vhost | The virtual-host for the nickname |
| creator | The nickname of the user/admin who set the vhost |
| time | A UNIX timestamp indicating when the vhost was created |
anope_info
This table is only updated when mydbgen is used, otherwise this is blank
| Column | Description |
| version | No information known yet. |
| date | No information known yet. |
anope_ms_info
| Column | Description |
| nm_id | The ID number of the memo |
| receiver | The recipent of the memo |
| number | The number of the memo |
| flags | The flags assigned to the memo |
| time | A UNIX timestamp indicating when the memo has been sent |
| sender | The nickname of the sender of the memo |
| text | The message content of the memo |
| serv | The type of the memo target ("NICK" or "CHAN") |
anope_ns_access
| Column | Description |
| na_id | The ID number of the access |
| display | The registered nickname the access applies to |
| access | The mask the user needs to have to the registered nickname 'display' |
anope_ns_alias
| Column | Description |
| na_id | The ID number of the alias |
| display | The primary (registered) nickname this alias is associated wih |
| nick | The nickname defining this alias |
| time_registered | The UNIX timestamp indicating when this alias was registered |
| last_seen | The UNIX timestamp indicating the last time the nick was seen in use |
| status | The status of the nick (currently only 1 flag: NS_NO_EXPIRE Nick never expires) |
| last_usermask | Last ident seen by services for the given nick |
| last_realname | Last host address seen by services for the given nick |
| last_quit | The last /quit message as stored by services; this can always be the suspend or forbid reason. |
| active | Wether the alias is active (1) or not (0) |
anope_ns_core
| Column | Description |
| nc_id | The unique ID of this row |
| display | The user's primary nickname |
| pass | Password stored in binary format; can be encrypted if specified in Anope config |
| The e-mail provided by the user | |
| icq | ICQ contact number provided by the user |
| url | Website URL provided by the user |
| flags | The option flags for the user |
| language | The number indicated what language the user has set for services |
| accesscount | The current number of access stored fot the user |
| memocount | The current number of memos stored for the user |
| memomax | The maximum number of memos services can store for the user |
| channelcount | The current number of channels registered by the user |
| channelmax | The maximum number of channels services can store for the user |
| greet | The user's greet message |
| active | Whether the nick is suspended or not |
anope_ns_request
| Column | Description |
| nr_id | The unique ID of the current entry |
| nick | The nickname the user requested to NickServ |
| passcode | The passcode sent by NickServ to the user's mail address |
| password | The password the user requested for registration |
| The email the user gave for registration | |
| requested | No information known yet. |
| active | Whether the request is still active or not |
anope_os_akills
| Column | Description |
| ok_id | The unique ID of the current entry |
| user | The user part of the mask that matches the akill |
| host | The host part of the mask that matches the akill |
| xby | The nickname of the operator who set the akill |
| reason | The reason the akill was set |
| seton | The UNIX timestamp indicating when the akill was set |
| expire | The UNIX timestamp indicating when the akill will expire |
anope_os_core
| Column | Description |
| oc_id | The unique ID of the current entry |
| maxusercnt | The max user count (minus services bots) |
| maxusertime | The time stamp when the max user count was reached |
| akills_count | The number of akills. |
| sglines_count | The number of sglines. |
| sqlines_count | The number of sqlines. |
| szlines_count | The number of szlines. |
anope_os_exceptions
| Column | Description |
| oe_id | The unique ID of the current entry |
| mask | The mask of the user that matches the exception |
| lim | The limit of connexions for the exception |
| who | The nickname of the operator who set the exception |
| reason | The reason the exception was set |
| time | The UNIX timestamp indicating when the exception was set |
| expires | The UNIX timestamp indicating when the exception will expire |
anope_os_hcache
This table is no longer used due to the proxy detector has been removed
| Column | Description |
| oh_id | The unique ID of the current entry |
| mask | No information known yet. |
| status | No information known yet. |
| used | No information known yet. |
anope_os_news
| Column | Description |
| on_id | The unique ID of the current entry |
| type | The type number of the news (login, oper or random news) |
| num | The number of the news (numbering is separate for login and oper news) |
| ntext | The actual text of the news |
| who | The nickname of the operator who set the news |
| time | The UNIX timestamp indicating when the news was set |
anope_os_sglines
| Column | Description |
| og_id | The unique ID of the current entry |
| mask | The mask of the user that matches the sgline |
| xby | The nickname of the operator who set the sgline |
| reason | The reason the sgline was set |
| seton | The UNIX timestamp indicating when the sgline was set |
| expire | The UNIX timestamp indicating when the sgline will expire |
anope_os_sqlines
| Column | Description |
| og_id | The unique ID of the current entry |
| mask | The qline nick (mask) which is banned. |
| xby | qline set by. |
| reason | Reason for the qline. |
| seton | Time stamp of when the qline was set. |
| expire | Time stamp of when the qline will be removed. |
anope_os_status
| Column | Description |
| os_id | The unique ID of the current entry |
| host | No information known yet. |
| status | No information known yet. |
| used | No information known yet. |
anope_os_szlines
| Column | Description |
| og_id | The unique ID of the current entry |
| mask | The zline address (mask) which is banned. |
| xby | zline set by. |
| reason | Reason for the zline. |
| seton | Time stamp of when the zline was set. |
| expire | Time stamp of when the zline will be removed. |