|
IRC Services Manual
5. Importing and exporting databases
5-1. Exporting Services databases in XML format
5-2. Importing (merging) data from an XML file
5-3. Converting data from other Services-like programs
5-3-1. Using the
convert-db program
5-3-2. Notes on converting
databases from particular programs
Table of Contents
5-1. Exporting Services databases in XML format
In order to facilitate processing of the Services databases by other
programs, Services provides the ability to export the databases in XML
and the HTTP server built into Services.
database access module (httpd/dbaccess) will display an "XML
database download" link. Clicking on the link will display the XML data
in your browser, which you can then save (for Netscape and Internet
Explorer, select "Save as..." from the browser's File menu).
Alternatively, you can download the link directly without displaying it in
your browser; in Netscape, hold shift while clicking on the link, and in
Internet Explorer, right-click on the link and select "Save target as..."
from the pop-up menu.
The format of the exported XML data is discussed in
Appendix B. No DTD is currently available.
Note: Services will not respond to any network activity while you
are downloading the database. If you have a large database, this can make
Services appear to "freeze" with respect to the IRC network, and it may
even get disconnected from the network in extreme cases.
Note to Internet Explorer users: Some versions of Internet
Explorer have a bug which can prevent the XML data from being displayed or
downloaded properly. If you have this problem, use another browser, or add
the following key to your registry using the Registry Editor
(regedit), as described in Microsoft Knowledge Base article
Q239750
[support.microsoft.com]:
Key: |
| HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
| Value name: | | IsTextPlainHonored
| Value type: | | DWORD
| Value data: | | HEX 0x1
|
Improper use of the Registry Editor can cause your system to malfunction,
so be careful when making any changes. You may also need to upgrade your
system files as described in the Knowledge Base article linked to above
if you are using Windows 95, Windows 98, or Windows NT 4.0.
Back to top
5-2. Importing (merging) data from an XML file
Just as it can export data in XML format, Services can also read in XML
data and import (merge) it into its databases. Importing is handled by the
module must be loaded at startup (loading it via an OperServ
REHASH or a SIGHUP
signal will have no effect).
To import a set of data stored in XML format into Services, start
Services with the command-line option "-import=filename",
where filename is the name of the file containing the data;
if it does not begin with a slash, it is taken relative to the Services
data directory. Services will parse the data file, and if no errors are
found, the data will be merged into Services' databases and the program
will terminate. If problems are found, they will be printed on standard
output.
Normally, if nickname or channel "collisions" occur—that is, if a
nickname or channel in the input data is already registered in Services'
databases—Services will skip over that nickname group or channel,
respectively. (For nicknames, the entire nickname group is skipped to
prevent cases where, for example, a user's secondary nick is available but
the primary nick is registered to someone else.) This behavior can be
modified by the
options in modules.conf. Additionally, Services can be made to
output a list of all data imported by setting the
option (which is set in the example modules.conf provided with
Services).
Note that the maximum user count, OperServ
SU password, and news items will not
be imported. Also, any autokills, session limit exceptions, or S-lines
which collide with those in the database will be automatically skipped.
Back to top
5-3. Converting data from other Services-like programs
5-3-1. Using the convert-db program
For users of other Services-like programs who want to switch to IRC
Services, a program called convert-db is supplied to convert
databases used by such programs into XML data files, which can then be
imported into Services as described in section 5-2 above.
This program is installed into the Services data directory
(/usr/lib/ircservices for binary distributions,
/usr/local/lib/ircservices by default for source distributions).
In its simplest form, convert-db takes the pathname of the
directory containing the database files to convert on the command line,
and writes the converted XML data to standard output. A typical invocation
might look like this:
convert-db will look at the files in the directory given and
attempt to determine automatically what program created them; if this
succeeds, it will proceed to read in the database files and convert them to
files, you can tell it explicitly by adding a +program-name
option in front of the path name (see the full syntax description below for
valid values for program-name).
Note that not all features of all programs are supported by Services,
and some settings may be lost when you import data. See
section 5-3-2 below for information on particular
programs, and section 5-2 for notes on importing the
converted data into Services.
The full syntax for convert-db is as follows:
convert-db [-v] [+program-name] pathname
The options and parameters are:
- -v: Display progress information as the data is converted.
- +program-name: Explicitly indicates what program was
used to create the data files. A list of possible
program-name values is given in table 5-1 below.
program-name values are not case sensitive.
- pathname: Specifies the pathname of the directory
containing the database files.
Table 5-1. Values for +program-name parameter to
convert-db
Back to top
5-3-2. Notes on converting databases from particular programs
Note that this is not a comprehensive list of differences; only the
major differences and types of data that cannot be converted are listed.
All programs
- The "NOOP" and "NEVEROP" nickname flags used in some
programs to mean "do not auto-op this nickname regardless of
channel access level" are not supported. Any nicknames with these
flags set will still be opped by Services if they have the
appropriate access level in a channel.
- The setter and reason for a forbidden nickname or channel will not be
imported.
- Channel privilege level settings (the equivalent of the ChanServ
LEVELS command), on programs that support them, will not
be imported; all channels will be reset to the default values.
- Services does not record the setter and last used time for channel
access entries is not supported; this data will be lost on
conversion for programs that do record it.
- Services does not support "bots" or a "BotServ", and all such data will
be lost on conversion.
Auspice
- The ChanServ TIMEOP feature in version 2.6 and later is not
supported. Nicknames on a channel's TIMEOP list will not
be added to the channel's access list for Services, and thus will
have no privileges on the channel.
- Services does not support "root" and "master" privilege levels as in
Auspice. There can only be one root nickname, which is set in
ircservices.conf; all root/master settings in the data
files will be discarded. (Admin/oper settings will be retained.)
Note that Services admins can perform any function (except
modifying the admin list), including modifying Services settings
and shutting down Services.
- NickServ AUTH, COMMENT, NOTE, LOCK,
MARK, SET KILL HIGH, SETFLAG AUTOJOIN,
and SETMLOCK, as well as ChanServ BADWORDS,
FREEZE, and MARK, are not supported. Nickname
notes will be converted to non-expiring memos with the user
themselves as the sender; other data will be lost.
- Services uses a different news system than Auspice; network and channel
news items will not be converted.
- Aside from the above, Services does not store the following
information; it will be lost when the databases are converted:
- UIN, age, and gender for nicknames
- last GETPASS user and HOLD setter and reason
for channels
- E-mailing of log files is not supported.
Bolivia
- Channel memos are implemented differently (they are stored separately
from nickname memos), and any user may send a memo to a channel.
- Limiting channels to priviliged users (the LEVEL command) is
not supported, and such restrictions will be discarded when
converting the databases. However, some IRC servers (such as
Unreal) have channel modes allowing channels to be limited to IRC
operators or administrators only, and Services allows those modes
to be locked on with the SET MLOCK command.
- ChanServ FREEZE is not supported.
- ChanServ HOLD setter will be lost when converting.
- E-mailing of log files is not supported.
Daylight
- Services does not support the XMANAGEMENT channel setting.
Epona
- Services does not store the following information; it will be lost when
the databases are converted:
- ICQ number for nicknames
- last used time for channel access entries
- Services does not distinguish between using the ChanServ OP,
VOICE, and related commands on oneself or on other users.
IRCS
- By default, IRCS supports channels with names longer than 63 characters
(including the leading "#"). Services does not support these by
default, and such channels will not be imported.
- Channel autoop/autovoice cannot be set for individual nicknames. All
nicks with appropriate access will be opped even if the NickServ
NOOP setting was set or ChanServ SET AUTOOP OFF
was used for the nick.
- The numeric access level for SOP is different from that used
in Services, so some access levels will be altered to match the
default SOP level in Services. (Channel privileges will
remain unchanged.)
- The "senior", "junior", and "helper" OperServ access levels do not
exist in Services. Users on the "senior" list will be moved to the
Services admin list; users on other lists will be moved to the
Services operator list. WARNING: As a result of the above,
users on the "senior" list will be given access to the
JUPE and LISTIGNORE commands.
Magick I 1.4
- Services does not send replies using PRIVMSG; the
NI_PRIVMSG nickname setting will be ignored.
- Services does not have a "channel news" system like Magick, and all
channel news items will be discarded.
PTlink 2.18
- PTlink supports several encryption methods; passwords encrypted with a
method other than MD5 cannot be used with Services, and
convert-db will refuse to convert such databases.
- Services does not store the following information; it will be lost when
the databases are converted:
- ICQ number, location, birthdate, and time of last identify for
nicknames
- maximum number of users and time of maximum for channels
SirvNET
- Channel memos are implemented differently (they are stored separately
from nickname memos), and any user may send a memo to a channel.
- Limiting channels to priviliged users (the LEVEL command) is
not supported, and such restrictions will be discarded when
converting the databases. However, some IRC servers (such as
Unreal) have channel modes allowing channels to be limited to IRC
operators or administrators only, and Services allows those modes
to be locked on with the SET MLOCK command.
- NickServ AUTH and ChanServ FREEZE are not supported.
- ChanServ HOLD setter and reason will be lost when converting.
- E-mailing of log files is not supported.
trircd
- Forbid setter and reason information will be lost after conversion.
- SET EXCEPTION, SET INVITES, HIDE OPTIONS,
and HIDE DESC channel settings are not supported.
Wrecked 1.2.0
- Services does not send replies using PRIVMSG; the
NI_PRIVMSG nickname setting will be ignored.
- The VOPALL channel setting is not supported.
Back to top
Table of Contents |
Previous section: Services command reference |
Top |
Next section: Adding features to Services
|