Subj : filter.pl
To   : Avon
From : Al
Date : Sun Apr 25 2021 01:05 am

Hello Avon,

Av> Can someone point me to a basic example if this?

Av> Trying to figure out how to add the PING function in.

Av> PING docs say use it by

Av> sub filter{
Av>        if ( !defined( $area ) ) {
Av>          ping_pong( $fromname, $fromaddr, $toname, $toaddr, $subject,
Av> $text );
Av>        }
Av>       }

Av> so do I just add that to the filter.pl file?

Yes, just for a look here is my filter.pl that I placed beside hpt and pingpong.pm in /usr/local/bin.


==== Begin: "filter.pl"  ====
 use pingpong;

 sub filter{
  if ( !defined( $area ) ) {
    ping_pong( $fromname, $fromaddr, $toname, $toaddr, $subject, $text );
  }
 }

 sub route{
    return route_to();
  }
==== End: "filter.pl" ====

Av> I can see a filter.pl in the hpt repo so would I be best to copy that
Av> in and enable it?

I have not, it is vastly to complex for me but it is full of goodies.

Av> I'm trying to figure out how to enable something without turning on
Av> stuff or opening stuff up that I don't realise what I am doing  /
Av> risking issues.

You also need this is your main fido config file.

hptperlfile /usr/local/bin/filter.pl

At this point your hpt will look for messages to ping when you run hpt toss and reply to them.

Ttyl :-),
        Al

--- GoldED+/LNX 1.1.5-b20180707
* Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)