summaryrefslogtreecommitdiffstats
path: root/modules/xml.pl
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-26 09:17:21 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-26 09:17:21 +0000
commit14bd999ada56e20ffc355ef32d7a8a0bbf9d1032 (patch)
tree05e8351b5dca645e6fd6eaf86db5813227af4083 /modules/xml.pl
parent7e08e2e87e3de903b8810a0bd357a45a65cc3b49 (diff)
new commands, users, hilights, rules, bugfixes, and all sorts of other good stuff
Diffstat (limited to 'modules/xml.pl')
-rw-r--r--modules/xml.pl17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/xml.pl b/modules/xml.pl
index 2cb2505..9e7e526 100644
--- a/modules/xml.pl
+++ b/modules/xml.pl
@@ -15,10 +15,11 @@ sub readXML {
$::users = $xs1->XMLin( "$p/users.xml", ForceArray => 'person' );
$::xusers = $::users->{person};
$::commands = $xs1->XMLin( "$p/commands.xml", ForceArray => [qw/command/]);
+ $::mysql = $xs1->XMLin( "$p/mysql.xml", ForceArray => [] );
}
sub writeXML {
- my ( $p ) = @_;
+ my ( $p ) = $::cset; #@_;
$p = 'default' if $p eq '';
$p = "config-$p";
$xs1->XMLout($::settings, RootName => 'settings', KeyAttr => ['id'],
@@ -31,6 +32,20 @@ sub writeXML {
$xs1->XMLout($::commands, RootName => 'commands', KeyAttr => ['id']) > io("$p/commands.xml");
}
+sub writeChannels {
+ my ( $p ) = $::cset; #@_;
+ $p = 'default' if $p eq '';
+ $p = "config-$p";
+ $xs1->XMLout($::channels, RootName => 'channels', KeyAttr => ['id']) > io("$p/channels.xml");
+}
+
+sub writeUsers {
+ my ( $p ) = $::cset; #@_;
+ $p = 'default' if $p eq '';
+ $p = "config-$p";
+ $xs1->XMLout($::users, RootName => 'people', KeyAttr => ['id']) > io("$p/users.xml");
+}
+
sub Xml::killsub {
undef &readXML;
undef &writeXML;