From 2ec170b4143082bad7631b0a2ca125e9ffbe8575 Mon Sep 17 00:00:00 2001 From: Kirill Ponomarev Date: Sun, 20 Jun 2004 07:19:39 +0000 Subject: Support new option '-m' to show sysop mail address. PR: ports/68107 Submitted by: maintainer --- comms/bforce-kst/Makefile | 2 +- comms/bforce-kst/files/patch-nlookup.c | 48 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 comms/bforce-kst/files/patch-nlookup.c diff --git a/comms/bforce-kst/Makefile b/comms/bforce-kst/Makefile index b7eea7b3600d..1a5c701e8c5d 100644 --- a/comms/bforce-kst/Makefile +++ b/comms/bforce-kst/Makefile @@ -7,7 +7,7 @@ PORTNAME= bforce PORTVERSION= 0.22.8.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= comms MASTER_SITES= http://kst.spb.ru/bforce/ PKGNAMESUFFIX= -kst diff --git a/comms/bforce-kst/files/patch-nlookup.c b/comms/bforce-kst/files/patch-nlookup.c new file mode 100644 index 000000000000..1d0478f323f8 --- /dev/null +++ b/comms/bforce-kst/files/patch-nlookup.c @@ -0,0 +1,48 @@ +--- bfutil/nlookup.c.orig Thu Aug 30 16:33:51 2001 ++++ bfutil/nlookup.c Sat Jun 19 07:05:34 2004 +@@ -28,15 +28,34 @@ + static void usage(void) + { + printf_usage("nodelist lookup utility", +- "usage: nlookup [-rh]
\n" ++ "usage: nlookup [-rmh]
\n" + "\n" + "options:\n" + " -r show nodelist string\n" ++ " -m show email address\n" + " -h show this help message\n" + "\n" + ); + } + ++void print_nodemail(const s_node *node) ++{ ++ char abuf[BF_MAXADDRSTR+1]; ++ ++ if( node->sysop && *node->sysop && strcmp(node->sysop, "") ) ++ { ++ char username[BNI_MAXSYSOP+1]; ++ ++ strnxcpy(username, node->sysop, sizeof(node->sysop)); ++ string_replchar(username, ' ', '_'); ++ ++ printf("%s@%s.fidonet.org\n", username, ++ ftn_addrstr_inet(abuf, node->addr)); ++ } ++ ++ fflush(stdout); ++} ++ + void print_nodeinfo(const s_node *node) + { + char abuf[BF_MAXADDRSTR+1]; +@@ -124,6 +143,9 @@ + } + else if( nodelist_lookup(&node, addr) == 0 ) + { ++ if( emailaddr ) ++ print_nodemail(&node); ++ else + print_nodeinfo(&node); + } + -- cgit v1.2.3