mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-12 07:27:57 +00:00
Support new option '-m' to show sysop mail address.
PR: ports/68107 Submitted by: maintainer
This commit is contained in:
parent
3fd24b3e84
commit
2ec170b414
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=111839
@ -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
|
||||
|
48
comms/bforce-kst/files/patch-nlookup.c
Normal file
48
comms/bforce-kst/files/patch-nlookup.c
Normal file
@ -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] <address>\n"
|
||||
+ "usage: nlookup [-rmh] <address>\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, "<none>") )
|
||||
+ {
|
||||
+ 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user