Can someone point me to a basic example if this?
Trying to figure out how to add the PING function in.
PING docs say use it by
sub filter{
if ( !defined( $area ) ) {
ping_pong( $fromname, $fromaddr, $toname, $toaddr, $subject, $text );
}
}
so do I just add that to the filter.pl file?
I can see a filter.pl in the hpt repo so would I be best to copy that
in and enable it?
I'm trying to figure out how to enable something without turning on
stuff or opening stuff up that I don't realise what I am doing /
risking issues.
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.
You also need this is your main fido config file.
hptperlfile /usr/local/bin/filter.pl
I can see a filter.pl in the hpt repo so would I be best to copy that in and enable it?
I have not, it is vastly to complex for me but it is full of goodies.
At this point your hpt will look for messages to ping when you run hpt toss and reply to them.
At this point your hpt will look for messages to ping when you run hpt toss and reply to them.
OK so by the looks of it I need to become root and copy the
pingpong.pm over to the same path here
In my case I have filter.pl in another directory
This I will change but point to the location of the filter.pl I am
using. Do I need to set execute privs for the filter.pl file? Guessing yes?
OK thanks. I'll start small (which is my pref) and see if I can just
build the filter.pl using the PING function first.
At this point your hpt will look for messages to ping when you
run hpt toss and reply to them.
I'm on my way now, thanks... not sure if all the bits are in place but working on it. :)
OK got it working but not happy with the %links feature and noted I
could set a level for trusted links that is at X or higher. The niggle
for me is I have a number of nodes set higher for various things but
not all I want to use as trusted for routing PING netmails.
I may ask if the feature can be updated such that a specific level can
be set as opposed to X and above.
OK so by the looks of it I need to become root and copy the pingpong.pm over to the same path here
That is where I have mine and it is working. The docs say to put it somewhere in the @INC path but I don't know what that means.
In my case I have filter.pl in another directory
That may work also, I am not sure.
This I will change but point to the location of the filter.pl I am using. Do I need to set execute privs for the filter.pl file? Guessin yes?
I am not sure. I made those files executible just to be on the safe side.
OK thanks. I'll start small (which is my pref) and see if I can just build the filter.pl using the PING function first.
That is what I have done. I had a look at Deon's filter-route.pl also
but it is over my head so we'll have to talk to him about making that work.
I'm on my way now, thanks... not sure if all the bits are in place bu working on it. :)
Yes, those are the only steps I needed. You can send netmail to 21:4/106 addressed to ping to see if it works. I've done some testing in fido and it seems to work well but no testing in zone 21 yet.
I did make a small change as Stas suggested to add the PVT flag to netmail.
I wonder if where I see >= I just set it to = ?
Hello Avon,
I wonder if where I see >= I just set it to = ?
You want to remove the help text from the ping replies?
I did make a small change as Stas suggested to add the PVT flag to netmail.
No I am thinking I modify a logical check in the code of the $m_level variable so it changes from 'greater than or equal to' which is >= to
just 'equal to' =
Doing so I think will solve my problem. I think :)
I am no programmer of any language at all, so I couldn't say. :)
so something like...
ping_pong( $fromname, $fromaddr, $toname, $toaddr, $subject,
$text, $PVT, 100 );
set PVT and access levels 100 or greater
Hello Avon,
I changed them to this..
$m_attr = $PVT unless defined $m_attr;
$m_level = 100 unless defined $m_level;
Thanks, I have taken a different route and have defined things in the filter.pl
ping_pong( $fromname, $fromaddr, $toname, $toaddr, $subject,
$text, $PVT, 123);
I am also playing with the help file as I wanted to tweak the layout
and info.
What I am unsure of is if you add route to links for different zones
how will the system behave if your netmail is from Zone 21 aka and you
ask it to route via a Zone 3 system? Hmm
That is what I have done. I had a look at Deon's filter-route.pl also but it is over my head so we'll have to talk to him about
making that work.
I have been commenting and uncommenting that text. I can't decide if I want it there or not so I have it commented out for now but the %RouteTo in the subject line is working.
I'll leave the function running... but I think the RouteTo is not working. But if you (or anyone) want's to test the feature then you should be able to get a reply out of 21:1/100 or 3:770/1 - I think :)
Let me know :)
That is what I have done. I had a look at Deon's filter-route.pl
also but it is over my head so we'll have to talk to him about
making that work.
Yeah, it is a little complex. :)
I'll leave the function running... but I think the RouteTo is not working.
But if you (or anyone) want's to test the feature then you should be able to get a reply out of 21:1/100 or 3:770/1 - I think :)
Sysop: | altere |
---|---|
Location: | Houston, TX |
Users: | 66 |
Nodes: | 4 (0 / 4) |
Uptime: | 11:39:51 |
Calls: | 728 |
Calls today: | 1 |
Files: | 7,667 |
Messages: | 295,547 |