# IRC Services Manual

## Appendix B. XML data format description

B-1. Data file structure
B-2. Tag index

Table of Contents

### B-1. Data file structure

The example data below shows the structure of the XML data used by Services; click on a tag for information about that tag (from the tag index below). An ellipsis (`...`) indicates where data is entered.

    <ircservices-db>
        <constants>
            <LANG_DEFAULT>...</LANG_DEFAULT>
            <CHANMAX_UNLIMITED>...</CHANMAX_UNLIMITED>
            <CHANMAX_DEFAULT>...</CHANMAX_DEFAULT>
            <TIMEZONE_DEFAULT>...</TIMEZONE_DEFAULT>
            <ACCLEV_FOUNDER>...</ACCLEV_FOUNDER>
            <ACCLEV_INVALID>...</ACCLEV_INVALID>
            <ACCLEV_SOP>...</ACCLEV_SOP>
            <ACCLEV_AOP>...</ACCLEV_AOP>
            <ACCLEV_HOP>...</ACCLEV_HOP>
            <ACCLEV_VOP>...</ACCLEV_VOP>
            <ACCLEV_NOP>...</ACCLEV_NOP>
            <MEMOMAX_UNLIMITED>...</MEMOMAX_UNLIMITED>
            <MEMOMAX_DEFAULT>...</MEMOMAX_DEFAULT>
            <NEWS_LOGON>...</NEWS_LOGON>
            <NEWS_OPER>...</NEWS_OPER>
            <MD_AKILL>...</MD_AKILL>
            <MD_EXCLUDE>...</MD_EXCLUDE>
            <MD_EXCEPTION>...</MD_EXCEPTION>
            <MD_SGLINE>...</MD_SGLINE>
            <MD_SQLINE>...</MD_SQLINE>
            <MD_SZLINE>...</MD_SZLINE>
        </constants>
        <maxusercnt>...</maxusercnt>
        <maxusertime>...</maxusertime>
        <supass [cipher="..."]>...</supass>
        <nickgroupinfo>
            <id>...</id>
            <nicks count='...'>
                <array-element>...</array-element>
            </nicks>
            <mainnick>...</mainnick>
            <pass [cipher="..."]>...</pass>
            <url>...</url>
            <email>...</email>
            <last_email>...</last_email>
            <info>...</info>
            <flags>...</flags>
            <os_priv>...</os_priv>
            <authcode>...</authcode>
            <authset>...</authset>
            <authreason>...</authreason>
    	<suspend_who>...</suspend_who>
    	<suspend_reason>...</suspend_reason>
    	<suspend_time>...</suspend_time>
    	<suspend_expires>...</suspend_expires>
            <language>...</language>
            <timezone>...</timezone>
            <channelmax>...</channelmax>
            <access count='...'>
                <array-element>...</array-element>
            </access>
            <ajoin count='...'>
                <array-element>...</array-element>
            </ajoin>
            <memoinfo>
                <memos count='...'>
                    <memo>
                        <number>...</number>
                        <flags>...</flags>
                        <time>...</time>
                        <sender>...</sender>
                        <channel>...</channel>
                        <text>...</text>
                    </memo>
                </memos>
                <memomax>...</memomax>
            </memoinfo>
            <ignore count='...'>
                <array-element>...</array-element>
            </ignore>
        </nickgroupinfo>
        <nickinfo>
            <nick>...</nick>
            <status>...</status>
            <last_usermask>...</last_usermask>
            <last_realmask>...</last_realmask>
            <last_realname>...</last_realname>
            <last_quit>...</last_quit>
            <time_registered>...</time_registered>
            <last_seen>...</last_seen>
            <nickgroup>...</nickgroup>
        </nickinfo>
        <channelinfo>
            <name>...</name>
            <founder>...</founder>
            <successor>...</successor>
            <founderpass [cipher="..."]>...</founderpass>
            <desc>...</desc>
            <url>...</url>
            <email>...</email>
            <time_registered>...</time_registered>
            <last_used>...</last_used>
            <last_topic>...</last_topic>
            <last_topic_setter>...</last_topic_setter>
            <last_topic_time>...</last_topic_time>
            <flags>...</flags>
    	<suspend_who>...</suspend_who>
    	<suspend_reason>...</suspend_reason>
    	<suspend_time>...</suspend_time>
    	<suspend_expires>...</suspend_expires>
            <levels>
                <CA_INVITE>...</CA_INVITE>
                <CA_AKICK>...</CA_AKICK>
                <CA_SET>...</CA_SET>
                <CA_UNBAN>...</CA_UNBAN>
                <CA_AUTOOP>...</CA_AUTOOP>
                <CA_AUTODEOP>...</CA_AUTODEOP>
                <CA_AUTOVOICE>...</CA_AUTOVOICE>
                <CA_OPDEOP>...</CA_OPDEOP>
                <CA_ACCESS_LIST>...</CA_ACCESS_LIST>
                <CA_CLEAR>...</CA_CLEAR>
                <CA_NOJOIN>...</CA_NOJOIN>
                <CA_ACCESS_CHANGE>...</CA_ACCESS_CHANGE>
                <CA_MEMO>...</CA_MEMO>
                <CA_VOICE>...</CA_VOICE>
                <CA_AUTOHALFOP>...</CA_AUTOHALFOP>
                <CA_HALFOP>...</CA_HALFOP>
                <CA_AUTOPROTECT>...</CA_AUTOPROTECT>
                <CA_PROTECT>...</CA_PROTECT>
            </levels>
            <chanaccesslist count='...'>
                <chanaccess>
                    <nickgroup>...</nickgroup>
                    <level>...</level>
                </chanaccess>
            </chanaccesslist>
            <akicklist count='...'>
                <akick>
                    <mask>...</mask>
    	        <reason>...</reason>
                    <who>...</who>
                    <set>...</set>
                    <lastused>...</lastused>
                </akick>
            </akicklist>
            <mlock>
                <mlock.on>...</mlock.on>
                <mlock.off>...</mlock.off>
                <mlock.limit>...</mlock.limit>
                <mlock.key>...</mlock.key>
                <mlock.link>...</mlock.link>
                <mlock.flood>...</mlock.flood>
                <mlock.joindelay>...</mlock.joindelay>
                <mlock.joinrate1>...</mlock.joinrate1>
                <mlock.joinrate2>...</mlock.joinrate2>
            </mlock>
            <entry_message>...</entry_message>
        </channelinfo>
        <news>
            <type>...</type>
            <num>...</num>
            <text>...</text>
            <who>...</who>
            <time>...</time>
        </news>
        <maskdata type='...'>
            <num>...</num>
            <mask>...</mask>
            <limit>...</limit>
            <reason>...</reason>
            <who>...</who>
            <time>...</time>
            <expires>...</expires>
            <lastused>...</lastused>
        </maskdata>
        <serverstats>
            <name>...</name>
            <t_join>...</t_join>
            <t_quit>...</t_quit>
            <quit_message>...</quit_message>
        </serverstats>
    </ircservices-db>

Back to top

### B-2. Tag index

`ircservices-db`
  The enclosing tag for the entire database.
`constants`
  Contains the various constant values used in this data set.
`LANG_DEFAULT`
  Contains the value of the `LANG_DEFAULT` constant as a decimal integer.
`CHANMAX_UNLIMITED`
  Contains the value of the `CHANMAX_UNLIMITED` constant as a decimal integer.
`CHANMAX_DEFAULT`
  Contains the value of the `CHANMAX_DEFAULT` constant as a decimal integer.
`TIMEZONE_DEFAULT`
  Contains the value of the `TIMEZONE_DEFAULT` constant as a decimal integer.
`ACCLEV_FOUNDER`
  Contains the value of the `ACCLEV_FOUNDER` constant as a decimal integer.
`ACCLEV_INVALID`
  Contains the value of the `ACCLEV_INVALID` constant as a decimal integer.
`ACCLEV_SOP`
  Contains the value of the `ACCLEV_SOP` constant as a decimal integer.
`ACCLEV_AOP`
  Contains the value of the `ACCLEV_AOP` constant as a decimal integer.
`ACCLEV_HOP`
  Contains the value of the `ACCLEV_HOP` constant as a decimal integer.
`ACCLEV_VOP`
  Contains the value of the `ACCLEV_VOP` constant as a decimal integer.
`ACCLEV_NOP`
  Contains the value of the `ACCLEV_NOP` constant as a decimal integer.
`MEMOMAX_UNLIMITED`
  Contains the value of the `MEMOMAX_UNLIMITED` constant as a decimal integer.
`MEMOMAX_DEFAULT`
  Contains the value of the `MEMOMAX_DEFAULT` constant as a decimal integer.
`NEWS_LOGON`
  Contains the value of the `NEWS_LOGON` constant as a decimal integer.
`NEWS_OPER`
  Contains the value of the `NEWS_OPER` constant as a decimal integer.
`MD_AKILL`
  Contains the value of the `MD_AKILL` constant as a decimal integer.
`MD_EXCLUDE`
  Contains the value of the `MD_EXCLUDE` constant as a decimal integer.
`MD_EXCEPTION`
  Contains the value of the `MD_EXCEPTION` constant as a decimal integer.
`MD_SGLINE`
  Contains the value of the `MD_SGLINE` constant as a decimal integer.
`MD_SQLINE`
  Contains the value of the `MD_SQLINE` constant as a decimal integer.
`MD_SZLINE`
  Contains the value of the `MD_SZLINE` constant as a decimal integer.
`maxusercnt`
  Contains the maximum number of users seen on the network as a decimal integer.
`maxusertime`
  Contains the timestamp of the time when the maximum number of users on the network was recorded as a decimal integer.
`supass`
  Contains the password for the OperServ `SU` command. If the "cipher" attribute is given, it specifies the name of the algorithm used to encrypt the password; if not given, the password is not encrypted.
`nickgroupinfo`
  Contains data related to a single nickname group.
`id`
  Contains the ID value for this nickname group as a decimal integer. The ID value is a positive integer unique across all nickname groups.
`nicks count='n'`
  Contains `n` `<array-element>` tags which contain the nicknames associated with this nickname group.
`array-element`
  Contains a text string used as an array element.
`mainnick`
  Contains the index number in the `nicks` array of the main nick for the nick group as a decimal integer.
`pass`
  Contains a nickname group password. If the "cipher" attribute is given, it specifies the name of the algorithm used to encrypt the password; if not given, the password is not encrypted.
`url`
  Contains a URL for a nickname group or channel.
`email`
  Contains an E-mail address for a nickname group or channel.
`last_email`
  Contains the last authenticated E-mail address for a nickname group, if the E-mail address has been changed and not yet been authenticated.
`info`
  Contains the information text for a nickname group.
`authcode`
  Contains the authentication code for a nickname group as a decimal integer. If no authentication code is set, contains the number 0 (zero).
`authset`
  Contains the timestamp of the time at which the nickname group's authentication code was set, if an authentication code is set.
`authreason`
  Contains the reason code for the nickname group's authentication code, if an authentication code is set.
`suspend_who`
  Contains the nickname responsible for suspending a nickname or channel.
`suspend_reason`
  Contains the reason for suspending a nickname or channel.
`suspend_time`
  Contains the timestamp of the time the nickname or channel was suspended as a decimal integer.
`suspend_expires`
  Contains the timestamp of the time the nickname's or channel's suspension expires (or zero if the suspension does not expire) as a decimal integer.
`flags`
  Contains flags for a nickname or channel as a decimal integer.
`os_priv`
  Contains the OperServ privilege level of a nickname group as a decimal integer.
`language`
  Contains the language (or `LANG_DEFAULT`) selected for a nickname group as a decimal integer.
`timezone`
  Contains the timezone offset from UTC in minutes (or `TIMEZONE_DEFAULT`) selected for the nickname as a decimal integer.
`channelmax`
  Contains the maximum number of channels a nickname group is permitted to register (or `CHANMAX_UNLIMITED` or `CHANMAX_DEFAULT`) as a decimal integer.
`access count='n'`
  Contains `n` `<array-element>` tags containing the nickname group's access list entries.
`ajoin count='n'`
  Contains `n` `<array-element>` tags containing the nickname group's autojoin list entries.
`memoinfo`
  Contains a nickname group or channel's memo data.
`memos count='n'`
  Contains `n` `<memo>` tags containing memos.
`memo`
  Contains the data for a single memo.
`number`
  Contains the number of the memo as a decimal integer.
`time`
  Contains the timestamp of the time a memo was sent or the time a news or mask-data entry was added as a decimal integer.
`sender`
  Contains the nickname of the sender of the memo.
`channel`
  If the memo is a channel memo, contains the name of the channel the memo was sent to.
`text`
  Contains the text of a memo or news item.
`memomax`
  Contains the maximum number of memos the nickname group or channel is allowed to store (or `MEMOMAX_UNLIMITED` or `MEMOMAX_DEFAULT`) as a decimal integer.
`ignore count='n'`
  Contains `n` `<array-element>` tags containing the nickname group's memo ignore list entries.
`nickinfo`
  Contains data for a single nickname.
`nick`
  Contains the nickname with which the data is associated.
`status`
  Contains the nickname's "status" field as a decimal integer.
`last_usermask`
  Contains the nickname's last seen usermask (possibly including a fakehost).
`last_realmask`
  Contains the nickname's last seen real usermask.
`last_realname`
  Contains the nickname's last seen real name.
`last_quit`
  Contains the nickname's last quit message.
`time_registered`
  Contains the timestamp of the time the nickname or channel was registered as a decimal integer.
`last_seen`
  Contains the timestamp of the last time the nickname's owner was seen online as a decimal integer.
`nickgroup`
  Contains the ID value of the nickname group with which this nickname or channel access list entry is associated.
`channelinfo`
  Contains data for a channel.
`name`
  Contains the name of the channel or server with which the following data is associated.
`founder`
  Contains the ID value of the founder's nickname group as a decimal integer.
`successor`
  Contains the ID value of the successor's nickname group as a decimal integer.
`founderpass`
  Contains the channel's founder password. If the "cipher" attribute is given, it specifies the name of the algorithm used to encrypt the password; if not given, the password is not encrypted.
`desc`
  Contains the channel's description.
`last_used`
  Contains the timestamp of the last time a channel was used.
`last_topic`
  Contains the last seen topic of the channel.
`last_topic_setter`
  Contains the nickname of the setter of the last seen topic of the channel.
`last_topic_time`
  Contains the timestamp of the time the last seen topic of the channel was set.
`levels`
  Contains tags for each channel access level.
`CA_INVITE`
  Contains the value of the `CA_INVITE` level as a decimal integer.
`CA_AKICK`
  Contains the value of the `CA_AKICK` level as a decimal integer.
`CA_SET`
  Contains the value of the `CA_SET` level as a decimal integer.
`CA_UNBAN`
  Contains the value of the `CA_UNBAN` level as a decimal integer.
`CA_AUTOOP`
  Contains the value of the `CA_AUTOOP` level as a decimal integer.
`CA_AUTODEOP`
  Contains the value of the `CA_AUTODEOP` level as a decimal integer. Always -1 in Services 5.1.
`CA_AUTOVOICE`
  Contains the value of the `CA_AUTOVOICE` level as a decimal integer.
`CA_OPDEOP`
  Contains the value of the `CA_OPDEOP` level as a decimal integer.
`CA_ACCESS_LIST`
  Contains the value of the `CA_ACCESS_LIST` level as a decimal integer.
`CA_CLEAR`
  Contains the value of the `CA_CLEAR` level as a decimal integer.
`CA_NOJOIN`
  Contains the value of the `CA_NOJOIN` level as a decimal integer. Always -100 in Services 5.1.
`CA_ACCESS_CHANGE`
  Contains the value of the `CA_ACCESS_CHANGE` level as a decimal integer.
`CA_MEMO`
  Contains the value of the `CA_MEMO` level as a decimal integer.
`CA_VOICE`
  Contains the value of the `CA_VOICE` level as a decimal integer.
`CA_AUTOHALFOP`
  Contains the value of the `CA_AUTOHALFOP` level as a decimal integer.
`CA_HALFOP`
  Contains the value of the `CA_HALFOP` level as a decimal integer.
`CA_AUTOPROTECT`
  Contains the value of the `CA_AUTOPROTECT` level as a decimal integer.
`CA_PROTECT`
  Contains the value of the `CA_PROTECT` level as a decimal integer.
`chanaccesslist count='n'`
  Contains `n` `<chanaccess>` tags containing the entries on the channel's access list.
`chanaccess`
  Contains the data for a channel access list entry.
`level`
  Contains the level for a channel access list entry as a decimal integer.
`akicklist count='n'`
  Contains `n` `<akick>` tags containing the entries on the channel's autokick list.
`akick`
  Contains the data for a channel autokick list entry.
`mask`
  Contains the mask associated with a channel autokick or mask-data entry.
`who`
  Contains the nickname of the user who added a channel autokick or mask-data entry.
`set`
  Contains the timestamp of the time a channel autokick entry was added.
`lastused`
  Contains the timestamp of the last time a channel autokick or mask-data entry was added.
`mlock`
  Contains the data for a channel's mode lock.
`mlock.on`
  Contains the string of modes locked on for the channel.
`mlock.off`
  Contains the string of modes locked off for the channel.
`mlock.limit`
  Contains the channel's locked limit, if any.
`mlock.key`
  Contains the channel's locked key, if any.
`mlock.link`
  Contains the channel's locked link channel, if any.
`mlock.flood`
  Contains the channel's locked flood setting, if any.
`mlock.joindelay`
  Contains the channel's locked join delay setting, if any.
`mlock.joinrate1`
  Contains the first part of the channel's locked join rate limit setting, if any.
`mlock.joinrate2`
  Contains the second part of the channel's locked join rate limit setting, if any.
`entry_message`
  Contains the channel's entry message, if any.
`news`
  Contains the data for a news item.
`type`
  Contains the type of the news item (`NEWS_LOGON` or `NEWS_OPER`) or mask-data entry (`MD_*`) as a decimal integer.
`num`
  Contains the number of the news item as a decimal integer.
`maskdata`
  Contains the data for a mask-data entry.
`limit`
  Contains the limit for an exception list entry as a decimal integer.
`reason`
  Contains the reason given for an autokick or mask-data entry.
`expires`
  Contains the timestamp of the time at wich a mask-data entry expires (or zero if the entry does not expire) as a decimal integer.
`serverstats`
  Contains the data for a StatServ server entry.
`t_join`
  Contains the timestamp of the last time the server joined the network as a decimal integer.
`t_quit`
  Contains the timestamp of the last time the server disconnected from the network as a decimal integer.
`quit_message`
  Contains the server's last quit message.

Back to top

Table of Contents