Can i make so i(host) can use eval?
Added a join permission
So this can function as a whitelist?
Does it prevent the connection message from appearing if they are blocked?
function servAuthTCPobj::onLine(%this, %line) { %parent = parent::onLine(%this, %line); if(getWord(%line, 0) $= "YES") { $connectingClientBLID = getWord(%line, 1); } return %parent; }
Get the BLID like this and store it in a global variable.Code: [Select] function servAuthTCPobj::onLine(%this, %line) { %parent = parent::onLine(%this, %line); if(getWord(%line, 0) $= "YES") { $connectingClientBLID = getWord(%line, 1); } return %parent; }
Nevermind, removed.
And how would the client then be kicked...?
package myNewWhiteList{ function servAuthTCPobj::onLine(%this,%line) { %parent = parent::onLine(%this,%line); if(getWord(%line,0) $= "YES") { $connectingClientBLID = getWord(%line,1); } return %parent; } function GameConnection::onConnectRequest(%this,%netAddress,%lanName,%netName,%prefix,%suffix,%int,%a,%b,%c) { %parent = parent::onConnectRequest(%this,%netAddress,%lanName,%netName,%prefix,%suffix,%int,%a,%b,%c); if(!isOnWhiteList($connectingClientBLID)) return "You are not on the WhiteList."; return %parent; }};activatePackage(myNewWhiteList);
What?
What?Like this:Code: [Select]package myNewWhiteList{ function servAuthTCPobj::onLine(%this,%line) { %parent = parent::onLine(%this,%line); if(getWord(%line,0) $= "YES") { $connectingClientBLID = getWord(%line,1); } return %parent; } function GameConnection::onConnectRequest(%this,%netAddress,%lanName,%netName,%prefix,%suffix,%int,%a,%b,%c) { %parent = parent::onConnectRequest(%this,%netAddress,%lanName,%netName,%prefix,%suffix,%int,%a,%b,%c); if(!isOnWhiteList($connectingClientBLID)) return "You are not on the WhiteList."; return %parent; }};activatePackage(myNewWhiteList);I used the current whitelist mod as a reference.