move megahal initialization so that if there is a nick collision and we
die, we at least don't leave a forked process behind. git-svn-id: svn://10.0.0.236/trunk@50631 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -138,17 +138,6 @@ $::uuid = "./uuidgen/uuidgen";
|
||||
$::uuid = (-f $::uuid) ? $::uuid : "";
|
||||
delete $pubcmds{'uuid'} if (! $::uuid);
|
||||
|
||||
$::megahal = "./megahal/megahal";
|
||||
$::megahal = (-f $::megahal) ? $::megahal : "";
|
||||
$::megahal_pid;
|
||||
|
||||
if ($::megahal) {
|
||||
$::WTR = FileHandle->new;
|
||||
$::RDR = FileHandle->new;
|
||||
$::megahal_pid = &init_megahal;
|
||||
&debug ("Initializing MEGAHAL conversation AI\n");
|
||||
}
|
||||
|
||||
my $phase;
|
||||
my $last_moon = 0;
|
||||
my $last_uuid = 0;
|
||||
@@ -209,9 +198,19 @@ foreach my $i (keys %rdfcmds) {
|
||||
$pubcmds{$i} = $rdfcmds{$i};
|
||||
}
|
||||
|
||||
|
||||
&debug ("connecting to $server $port as $nick on $channel");
|
||||
|
||||
$::megahal = "./megahal/megahal";
|
||||
$::megahal = (-f $::megahal) ? $::megahal : "";
|
||||
$::megahal_pid;
|
||||
|
||||
if ($::megahal) {
|
||||
$::WTR = FileHandle->new;
|
||||
$::RDR = FileHandle->new;
|
||||
$::megahal_pid = &init_megahal;
|
||||
&debug ("Initializing MEGAHAL conversation AI\n");
|
||||
}
|
||||
|
||||
# and done.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user