-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreference player join deny code.cs
31 lines (31 loc) · 1.08 KB
/
reference player join deny code.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package NoNerdsAllowed
{
function servAuthTCPObj::onLine(%this, %line)
{
%word = getWord(%line, 0);
if(%word $= "YES")
{
%cl = %this.client;
if(%cl.hasSpawnedOnce)
return parent::onLine(%this, %line);
%blid = getWord(%line, 1);
%found = 0;
for (%i = 0; %i < getWordCount($Pref::Server::Whitelist); %i++)
{
%whitelisted = getWord($Pref::Server::Whitelist, %i);
if (%whitelisted $= %blid)
{
%found = 1;
talk("found:" SPC %found);
}
}
if(!%found)
{
talk(%cl.name SPC "tried joining the server");
%cl.delete("You cannot connect to the selected server, because it is running in VAC (Valve Anti-Cheat) secure mode.<br><br>This Steam account has been banned from secure servers due to a cheating infraction.");
}
}
return parent::onLine(%this, %line);
}
};
activatePackage(NoNerdsAllowed);