Ignore:
Timestamp:
Nov 11, 2006, 3:42:55 PM (15 years ago)
Author:
nick
Message:

Add ping support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides.pm

    r872 r874  
    4848    $self->{wiki} = $wiki;
    4949    $self->{config} = $args{config};
     50
    5051    my $geo_handler = $self->config->geo_handler;
    5152    my $locator;
     
    6263    $wiki->register_plugin( plugin => $locator );
    6364    $self->{locator} = $locator;
     65
    6466    my $differ = Wiki::Toolkit::Plugin::Diff->new;
    6567    $wiki->register_plugin( plugin => $differ );
    6668    $self->{differ} = $differ;
     69
     70    if($self->config->ping_services) {
     71        use Wiki::Toolkit::Plugin::Ping;
     72
     73        my @ws = split(/\s*,\s*/, $self->config->ping_services);
     74        my %well_known = Wiki::Toolkit::Plugin::Ping->well_known;
     75        my %services;
     76        foreach my $s (@ws) {
     77            if($well_known{$s}) {
     78                $services{$s} = $well_known{$s};
     79            } else {
     80                warn("Ignoring unknown ping service '$s'");
     81            }
     82        }
     83        my $ping = Wiki::Toolkit::Plugin::Ping->new(
     84            node_to_url => $self->{config}->script_name . '?$node',
     85            services => \%services
     86        );
     87        $wiki->register_plugin( plugin => $ping );
     88    }
     89
    6790    return $self;
    6891}
Note: See TracChangeset for help on using the changeset viewer.