parsav  Diff

Differences From Artifact [34fad9fa1a]:

To Artifact [e0d52a1828]:


    10     10   	credmgd: bool
    11     11   	maxupsz: intptr
    12     12   	instance: lib.mem.ptr(int8)
    13     13   	overlord: &srv
    14     14   	ui_hue: uint16
    15     15   	nranks: uint16
    16     16   	maxinvites: uint16
           17  +	master: uint64
    17     18   }
    18     19   local struct srv {
    19     20   	sources: lib.mem.ptr(lib.store.source)
    20     21   	webmgr: lib.net.mg_mgr
    21     22   	webcon: &lib.net.mg_connection
    22     23   	cfg: cfgcache
    23     24   	id: rawstring
................................................................................
   800    801   		end
   801    802   		smode:free()
   802    803   	end
   803    804   
   804    805   	self.ui_hue = self:cfint('ui-accent',config.default_ui_accent)
   805    806   	self.nranks = self:cfint('user-ranks',10)
   806    807   	self.maxinvites = self:cfint('max-invites',64)
          808  +	
          809  +	var webmaster = self.overlord:conf_get('master')
          810  +	if webmaster:ref() then defer webmaster:free()
          811  +		var wma = self.overlord:actor_fetch_xid(webmaster)
          812  +		if not wma then
          813  +			lib.warn('the webmaster specified in the configuration store does not seem to exist or is not known to this instance; preceding as if no master defined. if the master is a remote user, you can rectify this with the `actor ',{webmaster.ptr,webmaster.ct},' instantiate` and `conf refresh` commands')
          814  +		else
          815  +			self.master = wma(0).id
          816  +			wma:free()
          817  +		end
          818  +	end
   807    819   end
   808    820   
   809    821   return {
   810    822   	overlord = srv;
   811    823   	convo = convo;
   812    824   	route = route;
   813    825   	secmode = secmode;
   814    826   }