Skip to content

Commit d51aafe

Browse files
committed
11.92: cleaned up ircd.pm by splitting the initializing process into 8 phases. closes #129.
1 parent 60d1877 commit d51aafe

File tree

4 files changed

+616
-486
lines changed

4 files changed

+616
-486
lines changed

INDEV

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3693,3 +3693,5 @@ CHANGES:
36933693
this fixes an issue where new ban notifications were sent on TS6 burst for preexisting bans.
36943694
fixed Ban::TS6 to use the ban agent again during our own burst.
36953695
ircd and proto server keys are now always numeric. update oper notice to use link_type and ircd_name.
3696+
3697+
92. cleaned up ircd.pm by splitting the initializing process into 8 phases. closes #129.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11.91
1+
11.92

bin/ircd

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,22 @@
33
use warnings; use strict; use 5.010;
44
foreach ([qw(__WARN__ WARNING)], [qw(TERM terminate )], [qw(KILL terminate)],
55
[qw(INT terminate)], [qw(PIPE signalpipe)], [qw(HUP signalhup)]) {
6-
my ($sig, $func) = @$_; $SIG{$sig} = sub { safe_call($func, @_) } }
6+
my ($sig, $func) = @$_; $SIG{$sig} = sub { safe_call($func, @_) } }
77
our ($run_dir, $loop, $api, $pool, %v); local $0 = 'juno';
8-
98
BEGIN {
109
defined($run_dir = shift @ARGV) or die "No directory specified";
1110
die "Run directory does not exist" unless -d $run_dir;
1211
chdir $run_dir or die "Can't access run directory";
1312
foreach (map { "$run_dir/lib$_" } ('', qw(/api-engine /evented-object/lib
14-
/evented-api-engine/lib /evented-configuration/lib
15-
/evented-database/lib /evented-properties/lib))){ unshift @INC, $_ }
13+
/evented-api-engine/lib))) { unshift @INC, $_ }
1614
require Evented::API::Engine;
1715
}
1816
sub get_version { $_ = $api->_slurp(undef, undef, "$run_dir/VERSION"); chomp; $_ }
19-
sub safe_call { my $f = shift; (ircd->can($f) or return)->(@_) } # @_ is needed idk why
20-
17+
sub safe_call { my $f = shift; (ircd->can($f) or return)->(@_) }
2118
$api = Evented::API::Engine->new(
2219
mod_inc => ['modules', 'lib/evented-api-engine/mod'],
2320
log_sub => sub { say $_[1] }
2421
);
2522
our $VERSION = get_version() or die "Can't read VERSION";
26-
2723
$api->load_module('ircd') or exit 1;
28-
ircd::loop();
24+
ircd::loop();

0 commit comments

Comments
 (0)