Changeset 13322
- Timestamp:
- 06/06/08 11:31:45 (5 years ago)
- Location:
- lang/perl/XIRCD/trunk
- Files:
-
- 1 added
- 1 modified
-
config.yaml.sample (added)
-
lib/XIRCD.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/XIRCD/trunk/lib/XIRCD.pm
r11891 r13322 6 6 7 7 use POE; 8 use Config::Pit;8 use POE::Component::TSTP; 9 9 use UNIVERSAL::require; 10 use Getopt::Long; 11 use YAML; 10 12 11 13 use XIRCD::Server; 14 12 15 13 16 sub bootstrap { 14 17 my $class = shift; 15 18 16 my $config = $class->_load_conf; 19 GetOptions('--config=s' => \my $conf, '--quiet' => \my $quiet); 20 $conf or die "Usage: xircd.pl --config=config.yaml\n"; 21 22 my $config = YAML::LoadFile($conf) or die $!; 23 24 if ($quiet) { 25 close STDIN; 26 close STDOUT; 27 close STDERR; 28 exit if fork; 29 } else { 30 # for Ctrl-Z 31 POE::Component::TSTP->create(); 32 } 17 33 18 34 XIRCD::Server->new( %{$config->{ircd}} ); … … 29 45 30 46 POE::Kernel->run; 31 }32 33 sub _load_conf {34 return pit_get(35 'XIRCD', require => {36 ircd => {37 port => 6667,38 server_nick => 'xircd',39 client_encoding => 'utf-8',40 no_nick_tweaks => 1,41 },42 components => [43 { module => 'Time', nick => 'timer' },44 ],45 }46 );47 47 } 48 48
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)