comparison src/configfile.c @ 195:76460d98b2fb noffle

[svn] * noffle.conf.example,docs/noffle.conf.5,src/configfile.h,src/configfile.c, src/protocol.c: Add new config item 'hostname' to specify the part after the @ in message IDs generated by Noffle. Patch submitted by Mirko Liss.
author bears
date Tue, 30 Oct 2001 13:16:40 +0000
parents a4e9a20e50e5
children 24d4cd032da5
comparison
equal deleted inserted replaced
194:a4e9a20e50e5 195:76460d98b2fb
4 The following macros must be set, when compiling this file: 4 The following macros must be set, when compiling this file:
5 CONFIGFILE 5 CONFIGFILE
6 SPOOLDIR 6 SPOOLDIR
7 VERSION 7 VERSION
8 8
9 $Id: configfile.c 313 2001-10-30 12:42:13Z bears $ 9 $Id: configfile.c 314 2001-10-30 13:16:40Z bears $
10 */ 10 */
11 11
12 #if HAVE_CONFIG_H 12 #if HAVE_CONFIG_H
13 #include <config.h> 13 #include <config.h>
14 #endif 14 #endif
75 int connectTimeout; 75 int connectTimeout;
76 Bool autoSubscribe; 76 Bool autoSubscribe;
77 Bool autoUnsubscribe; 77 Bool autoUnsubscribe;
78 Bool infoAlways; 78 Bool infoAlways;
79 Bool replaceMsgId; 79 Bool replaceMsgId;
80 Str hostnameMsgId;
80 Bool postLocal; 81 Bool postLocal;
81 Str defaultAutoSubscribeMode; 82 Str defaultAutoSubscribeMode;
82 Str mailTo; 83 Str mailTo;
83 int defaultExpire; 84 int defaultExpire;
84 int numServ; 85 int numServ;
104 30, /* connectTimeout */ 105 30, /* connectTimeout */
105 FALSE, /* autoSubscribe */ 106 FALSE, /* autoSubscribe */
106 FALSE, /* autoUnsubscribe */ 107 FALSE, /* autoUnsubscribe */
107 TRUE, /* infoAlways */ 108 TRUE, /* infoAlways */
108 TRUE, /* replaceMsgId */ 109 TRUE, /* replaceMsgId */
110 "", /* hostnameMsgId */
109 FALSE, /* postLocal */ 111 FALSE, /* postLocal */
110 "over", /* defaultAutoSubscribeMode */ 112 "over", /* defaultAutoSubscribeMode */
111 "", /* mailTo */ 113 "", /* mailTo */
112 14, /* defaultExpire */ 114 14, /* defaultExpire */
113 0, /* numServ */ 115 0, /* numServ */
134 int Cfg_connectTimeout( void ) { return config.connectTimeout; } 136 int Cfg_connectTimeout( void ) { return config.connectTimeout; }
135 Bool Cfg_autoUnsubscribe( void ) { return config.autoUnsubscribe; } 137 Bool Cfg_autoUnsubscribe( void ) { return config.autoUnsubscribe; }
136 Bool Cfg_autoSubscribe( void ) { return config.autoSubscribe; } 138 Bool Cfg_autoSubscribe( void ) { return config.autoSubscribe; }
137 Bool Cfg_infoAlways( void ) { return config.infoAlways; } 139 Bool Cfg_infoAlways( void ) { return config.infoAlways; }
138 Bool Cfg_replaceMsgId( void ) { return config.replaceMsgId; } 140 Bool Cfg_replaceMsgId( void ) { return config.replaceMsgId; }
141 const char * Cfg_hostnameMsgId( void ) { return config.hostnameMsgId; }
139 Bool Cfg_postLocal( void ) { return config.postLocal; } 142 Bool Cfg_postLocal( void ) { return config.postLocal; }
140 const char * Cfg_defaultAutoSubscribeMode( void ) { 143 const char * Cfg_defaultAutoSubscribeMode( void ) {
141 return config.defaultAutoSubscribeMode; } 144 return config.defaultAutoSubscribeMode; }
142 const char * Cfg_mailTo( void ) { return config.mailTo; } 145 const char * Cfg_mailTo( void ) { return config.mailTo; }
143 int Cfg_defaultExpire( void ) { return config.defaultExpire; } 146 int Cfg_defaultExpire( void ) { return config.defaultExpire; }
867 getBool( &config.autoUnsubscribe, p ); 870 getBool( &config.autoUnsubscribe, p );
868 else if ( strcmp( "info-always-unread", name ) == 0 ) 871 else if ( strcmp( "info-always-unread", name ) == 0 )
869 getBool( &config.infoAlways, p ); 872 getBool( &config.infoAlways, p );
870 else if ( strcmp( "replace-messageid", name ) == 0 ) 873 else if ( strcmp( "replace-messageid", name ) == 0 )
871 getBool( &config.replaceMsgId, p ); 874 getBool( &config.replaceMsgId, p );
875 else if ( strcmp( "hostname", name ) == 0 )
876 /* use line, do not change to lowercase */
877 getStr( config.hostnameMsgId, line );
872 else if ( strcmp( "post-locally", name ) == 0 ) 878 else if ( strcmp( "post-locally", name ) == 0 )
873 getBool( &config.postLocal, p ); 879 getBool( &config.postLocal, p );
874 else if ( strcmp( "default-auto-subscribe-mode", name ) == 0 ) 880 else if ( strcmp( "default-auto-subscribe-mode", name ) == 0 )
875 { 881 {
876 getStr( s, p ); 882 getStr( s, p );