From 03cea82b0a5431513d64e6d22555713b2fe7cfcd Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 19 Jan 2003 06:28:04 +0000 Subject: [PATCH] * Minimum required Citadel version 6.05 --- webcit/ChangeLog | 5 ++++- webcit/event.c | 4 ---- webcit/summary.c | 38 +++++++++----------------------------- webcit/webcit.c | 14 ++++++++++++++ webcit/webcit.h | 3 ++- 5 files changed, 29 insertions(+), 35 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index aa0dcdbea..dbfb53b46 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 400.86 2003/01/19 06:28:04 ajc +* Minimum required Citadel version 6.05 + Revision 400.85 2003/01/16 04:41:26 ajc * When displaying edit controls for time of day in the calendar, only show minutes that are multiples of 5 ... unless the existing value is not a @@ -12,7 +15,7 @@ Revision 400.83 2003/01/14 04:21:27 ajc * Only offer views which make sense for the default view of a room Revision 400.82 2003/01/13 03:34:33 ajc -* Get ready for the 6.10 release +* Get ready for the 4.10 release Revision 400.81 2003/01/12 23:22:53 ajc * configure.in: check for libical v0.24 or newer diff --git a/webcit/event.c b/webcit/event.c index 2767a20fa..72bd74dba 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -500,19 +500,15 @@ void save_individual_event(icalcomponent *supplied_vevent, long msgnum) { /* See if transparency is indicated */ if (strlen(bstr("transp")) > 0) { - lprintf(9, "FORM VALUE: <%s>\n", bstr("transp")); if (!strcasecmp(bstr("transp"), "opaque")) { formtransp = ICAL_TRANSP_OPAQUE; - lprintf(9, "setting to opaque\n"); } else if (!strcasecmp(bstr("transp"), "transparent")) { formtransp = ICAL_TRANSP_TRANSPARENT; - lprintf(9, "setting to transparent\n"); } while (prop = icalcomponent_get_first_property(vevent, ICAL_TRANSP_PROPERTY), (prop != NULL)) { - lprintf(9, "removing existing property\n"); icalcomponent_remove_property(vevent, prop); icalproperty_free(prop); } diff --git a/webcit/summary.c b/webcit/summary.c index 46bed8fde..30a253a34 100644 --- a/webcit/summary.c +++ b/webcit/summary.c @@ -190,37 +190,17 @@ void calendar_section(void) { * Server info section (fluff, really) */ void server_info_section(void) { - char buf[SIZ]; - int i = 0; - section_title("About this server"); - serv_puts("INFO"); - serv_gets(buf); - if (buf[0] == '1') while(serv_gets(buf), strcmp(buf, "000")) { - switch(i) { - case 2: - wprintf("You are connected to "); - escputs(buf); - wprintf(", "); - break; - case 4: wprintf("running "); - escputs(buf); - wprintf(", "); - break; - case 6: wprintf("and located in "); - escputs(buf); - wprintf(".
\n"); - break; - case 7: wprintf("Your system administrator is "); - escputs(buf); - wprintf(".\n"); - break; - } - ++i; - } + wprintf("You are connected to "); + escputs(serv_info.serv_humannode); + wprintf(", running "); + escputs(serv_info.serv_software); + wprintf(", and located in "); + escputs(serv_info.serv_bbs_city); + wprintf(".
\nYour system administrator is "); + escputs(serv_info.serv_sysadm); + wprintf(".\n"); } - - /* diff --git a/webcit/webcit.c b/webcit/webcit.c index 257ba8d0d..0f971ffef 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -906,6 +906,20 @@ void session_loop(struct httprequest *req) serv_gets(buf); /* get the server welcome message */ locate_host(browser_host, WC->http_sock); get_serv_info(browser_host, user_agent); + if (serv_info.serv_rev_level < MINIMUM_CIT_VERSION) { + wprintf("You are connected to a Citadel " + "server running Citadel %d.%02d;\nin " + "order to run this version of WebCit " + "you must also have Citadel %d.%02d or" + " newer.\n\n\n", + serv_info.serv_rev_level / 100, + serv_info.serv_rev_level % 100, + MINIMUM_CIT_VERSION / 100, + MINIMUM_CIT_VERSION % 100 + ); + end_webcit_session(); + goto SKIP_ALL_THIS_CRAP; + } } } diff --git a/webcit/webcit.h b/webcit/webcit.h index a4a592be3..411ec9aca 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -27,7 +27,8 @@ #define SERVER "WebCit v4.10" /* who's in da house */ #define DEVELOPER_ID 0 #define CLIENT_ID 4 -#define CLIENT_VERSION 410 +#define CLIENT_VERSION 410 /* This version of WebCit */ +#define MINIMUM_CIT_VERSION 605 /* min required Citadel vers */ #define DEFAULT_HOST "localhost" /* Default Citadel server */ #define DEFAULT_PORT "504" #define LB (1) /* Internal escape chars */ -- 2.39.2