parsav  Diff

Differences From Artifact [03b0c72484]:

To Artifact [faf7450a82]:


   297    297   
   298    298   				if dbmode.arglist.ct == 1 then
   299    299   					lib.bail('you are attempting to completely obliterate all data! make sure you have selected your target correctly. if you really want to do this, pass the confirmation string ', &cfmstr[0])
   300    300   				elseif dbmode.arglist.ct == 2 then
   301    301   					if lib.str.cmp(dbmode.arglist(1), cfmstr) == 0 then
   302    302   						lib.warn('completely obliterating all data!')
   303    303   						dlg:obliterate_everything()
          304  +					elseif lib.str.cmp(dbmode.arglist(1), 'print-confirmation-string') == 0 then
          305  +						lib.io.send(1, cfmstr, lib.str.sz(cfmstr))
   304    306   					else
   305    307   						lib.bail('you passed an incorrect confirmation string; pass ', &cfmstr[0], ' if you really want to destroy everything')
   306    308   					end
   307    309   				else goto cmderr end
   308    310   			else goto cmderr end
   309    311   		elseif lib.str.cmp(mode.arglist(0),'be') == 0 then
   310    312   			srv:setup(cnf) 
................................................................................
   329    331   			if cfmode.arglist.ct < 1 then goto cmderr end
   330    332   
   331    333   			if cfmode.arglist.ct == 1 then
   332    334   				if lib.str.cmp(cfmode.arglist(0),'chsec') == 0 then
   333    335   					var sec: int8[65] gensec(&sec[0])
   334    336   					dlg:conf_set('server-secret', &sec[0])
   335    337   					lib.report('server secret reset')
   336         -					-- FIXME notify server to reload its config
   337    338   				elseif lib.str.cmp(cfmode.arglist(0),'refresh') == 0 then
   338         -					-- TODO notify server to reload config
          339  +					cfmode.no_notify = false -- duh
   339    340   				else goto cmderr end
   340    341   			elseif cfmode.arglist.ct == 3 and
   341    342   				lib.str.cmp(cfmode.arglist(0),'set') == 0 then
   342    343   				dlg:conf_set(cfmode.arglist(1),cfmode.arglist(2))
   343    344   				lib.report('parameter set')
   344    345   			else goto cmderr end
          346  +
          347  +			-- successful commands fall through
          348  +			if not cfmode.no_notify then
          349  +				dlg:ipc_send(lib.ipc.cmd.cfgrefresh,0)
          350  +			end
   345    351   		else
   346    352   			srv:setup(cnf) 
   347    353   			srv:conprep(lib.store.prepmode.full)
   348    354   			if lib.str.cmp(mode.arglist(0),'mkroot') == 0 then
   349    355   				var cfmode: pbasic cfmode:parse(mode.arglist.ct, &mode.arglist(0))
   350    356   				if cfmode.help then
   351    357   					[ lib.emit(false, 1, 'usage: ', `argv[0], ' mkroot ', cfmode.type.helptxt.flags, ' <handle>', cfmode.type.helptxt.opts) ]
................................................................................
   364    370   					var root = lib.store.actor.mk(&kbuf[0])
   365    371   					root.handle = cfmode.arglist(0)
   366    372   					var epithets = array(
   367    373   						'root', 'god', 'regional jehovah', 'titan king',
   368    374   						'king of olympus', 'cyberpharaoh', 'electric ellimist',
   369    375   						"rampaging c'tan", 'deathless tweetlord', 'postmaster',
   370    376   						'faerie queene', 'lord of the posts', 'ruthless cybercrat',
   371         -						'general secretary', 'commissar', 'kwisatz haderach'
          377  +						'general secretary', 'commissar', 'kwisatz haderach',
          378  +						'dedicated hyperturing'
   372    379   						-- feel free to add more
   373    380   					)
   374    381   					root.epithet = epithets[lib.crypt.random(intptr,0,[epithets.type.N])]
   375    382   					root.rights.powers:fill() -- grant omnipotence
   376    383   					root.rights.rank = 1
   377    384   					var ruid = dlg:actor_create(&root)
   378    385   					dlg:conf_set('master',root.handle)