Skip to content
Snippets Groups Projects
js_msgbase.c 68.2 KiB
Newer Older
  inetmail_sem = '\0' <repeats 63 times>, echomail_dir = '\0' <repeats 63 times>, 
  fidofile_dir = "/synchronet/sbbs/fido/inbsecure/", '\0' <repeats 31 times>, 
  netmail_sem = "%jfidoout.now", '\0' <repeats 50 times>, 
  echomail_sem = "%jfidoout.now", '\0' <repeats 50 times>, origline = '\0' <repeats 50 times>, 
  qnet_tagline = "My Brand-New BBS (All the cool SysOps run STOCK!)", '\0' <repeats 78 times>, uq = 151027, 
---Type <return> to continue, or q <return> to quit---
  mail_maxcrcs = 0, mail_maxage = 0, dflt_faddr = {zone = 0, net = 0, node = 0, point = 0}, 
  logon_mod = "logon\000\000\000", logoff_mod = "\000\000\000\000\000\000\000\000", newuser_mod = "newuser\000", 
  login_mod = "login\000\000\000", logout_mod = "\000\000\000\000\000\000\000\000", 
  sync_mod = "\000\000\000\000\000\000\000\000", expire_mod = "\000\000\000\000\000\000\000\000", 
  scfg_cmd = "%!scfg %k /t%w", '\0' <repeats 49 times>, smb_retry_time = 30 '\036', sec_warn = 180, 
  sec_hangup = 300, color = 0x0, total_colors = 0, ctrlkey_passthru = 0, wfc_cmd = {'\0' <repeats 63 times>, 
    "%!list ..\\data\\error.log", '\0' <repeats 39 times>, "%!list ..\\data\\guru.log", '\0' <repeats 40 times>, 
    "%!list ..\\data\\logons.lst", '\0' <repeats 38 times>, '\0' <repeats 63 times>, '\0' <repeats 63 times>, 
    '\0' <repeats 63 times>, '\0' <repeats 63 times>, '\0' <repeats 63 times>, '\0' <repeats 63 times>}, 
  wfc_scmd = {"%!qnet", '\0' <repeats 57 times>, "%!pnet", '\0' <repeats 57 times>, '\0' <repeats 63 times>, 
    '\0' <repeats 63 times>, '\0' <repeats 63 times>, '\0' <repeats 63 times>, '\0' <repeats 63 times>, 
    '\0' <repeats 63 times>, '\0' <repeats 63 times>, '\0' <repeats 63 times>, '\0' <repeats 63 times>, 
    '\0' <repeats 63 times>}, user_backup_level = 5, mail_backup_level = 5}
*/
		if(p->smb.subnum<scfg->total_subs) {
			cfgobj=JS_NewObject(cx,NULL,NULL,obj);
rswindell's avatar
rswindell committed

#ifdef BUILD_JSDOCS	
			/* needed for property description alignment */
rswindell's avatar
rswindell committed
			JS_DefineProperty(cx,cfgobj,"index",JSVAL_VOID
				,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY);
rswindell's avatar
rswindell committed
			JS_DefineProperty(cx,cfgobj,"grp_index",JSVAL_VOID
				,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY);
#endif

rswindell's avatar
rswindell committed
			js_CreateMsgAreaProperties(cx, scfg, cfgobj, p->smb.subnum);
				,"Configuration parameters for this message area (<i>sub-boards only</i>) "
#endif
			JS_DefineProperty(cx,obj,"cfg",OBJECT_TO_JSVAL(cfgobj)
				,NULL,NULL,JSPROP_ENUMERATE|JSPROP_READONLY);
			snprintf(p->smb.file,sizeof(p->smb.file),"%s%s"
				,scfg->sub[p->smb.subnum]->data_dir,scfg->sub[p->smb.subnum]->code);
		} else { /* unknown code */
			SAFECOPY(p->smb.file,base);
			p->smb.subnum=INVALID_SUB;

JSObject* DLLCALL js_CreateMsgBaseClass(JSContext* cx, JSObject* parent, scfg_t* cfg)
{
	JSObject*	obj;

	scfg = cfg;
	obj = JS_InitClass(cx, parent, NULL
		,&js_msgbase_class
		,js_msgbase_constructor
		,1	/* number of constructor args */
		,NULL /* js_msgbase_properties */
		,NULL /* js_msgbase_functions */
#endif	/* JAVSCRIPT */