bool isAdmin (HTTP::Port const& port, Json::Value const& params, beast::IP::Address const& remoteIp) { return ipAllowed (remoteIp, port.admin_ip) && passwordUnrequiredOrSentCorrect (port, params); }
bool AuxClientThread::init() { Core::PolLock lock; struct sockaddr ConnectingIP = _sck.peer_address(); if ( ipAllowed( ConnectingIP ) ) { _auxconnection.set( new AuxConnection( this, _sck.getpeername() ) ); Module::UOExecutorModule* uoemod; if ( _auxservice ) uoemod = Core::start_script( _auxservice->scriptdef(), _auxconnection.get() ); else uoemod = Core::start_script( _scriptdef, _auxconnection.get() ); _uoexec = uoemod->uoexec.weakptr; return true; } else { return false; } }