/* * binkleyforce -- unix FTN mailer project * * Copyright (c) 1998-2000 Alexander Belkin, 2:5020/1398.11 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * $Id: nlookup.c,v 1.13 2000/12/21 22:08:27 adb Exp $ */ #include "includes.h" #include "confread.h" #include "logger.h" #include "util.h" #include "nodelist.h" /* * Our fake expressions checker. Allways return FALSE (?) */ bool eventexpr(s_expr *expr) { return FALSE; } static void usage(void) { printf_usage("nodelist lookup utility", "usage: nlookup [-rh]
\n" "\n" "options:\n" " -r show nodelist string\n" " -h show this help message\n" "\n" ); } void print_nodeinfo(const s_node *node) { char abuf[BF_MAXADDRSTR+1]; printf("Address : %s\n", ftn_addrstr(abuf, node->addr)); printf("System : %s\n", node->name); printf("Phone : %s\n", node->phone); printf("Sysop : %s\n", node->sysop); printf("Location : %s\n", node->location); printf("Speed : %lu\n", node->speed); printf("Flags : %s\n", node->flags); if( node->worktime.num ) { char timebuf[80]; time_t unixtime = time(NULL); struct tm *now = localtime(&unixtime); timevec_string(timebuf, &node->worktime, sizeof(timebuf)); printf("Work time : %s (%s)\n", timebuf, timevec_check(&node->worktime, now) ? "false" : "true"); } if( node->sysop && *node->sysop && strcmp(node->sysop, "