use strict;
use warnings;
use FileHandle;
use Deans::Functions qw( skew ); #will have to hardcode this later
mk_wb_config();
sub mk_wb_config {
my ($dir,$name) = @_;
$name = 'wb.conf.xml' unless defined $name;
$dir = skew($ENV{USERPROFILE},'.irssi') unless defined $dir;
my $path = skew($dir,$name);
my $config = new FileHandle $path, '>';
defined $config or die;
print $config <<'EOC';
<config>
<settings>
<option name="case_sensitive">0</option>
<option name="use_defaults">1</option>
<option name="defaults_level">0</option>
<option name="wb_string">*WB(%N)WB* %W</option>
<option name="rotation_mode">1</option>
</settings>
</config>
EOC
undef $path;
return 1;
}