Deus Ex Documentation::RCON

ADelay.uc (extends RCONActors)

var string msg;
var AthenaSpectator spect;

Timer


spect.ASay(msg);
Destroy();




ARClient.uc (extends UBrowserHTTPClient)

var IpAddr ServerIpAddr;
var string ServerAddress;
var string ServerURI;
var int ServerPort;
var int CurrentState;
var int ErrorCode;
var bool bClosed;
var globalconfig string ProxyServerAddress;
var globalconfig int ProxyServerPort;
var AthenaMutator AM;

Browse (string InAddress, string InURI, optional int InPort, optional int InTimeout)


CurrentState = Connecting;

ServerAddress = InAddress;
ServerURI = InURI;
if(InPort == 0)
ServerPort = 80;
else
ServerPort = InPort;

if(InTimeout > 0 )
SetTimer(InTimeout, False);

ResetBuffer();

if(ProxyServerAddress != "")
{
ServerIpAddr.Port = ProxyServerPort;
if(ServerIpAddr.Addr == 0)
Resolve( ProxyServerAddress );
else
DoBind();
}
else
{
ServerIpAddr.Port = ServerPort;
if(ServerIpAddr.Addr == 0)
Resolve( ServerAddress );
else
DoBind();
}

Closed


bClosed = True;

DoBind


if( BindPort() == 0 )
{
Log( "UBrowserHTTPLink: Error binding local port." );
SetError(-2);
return;
}

Open( ServerIpAddr );
bClosed = False;

HTTPError (int Code)


//-3 is closed normally
//-2 is error binding port
//400 - Error connecting
if(Code == -3)
Log(Code$" - Connection closed by host.", 'AIClientError');
else if(Code == -2)
Log(Code$" - Port binding error, connection already open?", 'AIClientError');
else if(Code == 400)
Log(Code$" - Connection denied by host.", 'AIClientError');
else
Log(Code$" - Undefined error...", 'AIClientError');
Destroy();

HTTPReceivedData (string Data)


local int iconvidstart, iconvidend, imessagestart, imessageend;
local string messagestr, convid;
local AthenaSpectator AS;
local AthenaMutator AMR;

//As Edison said, "What good is a newborn babe?" Log(Data);
//Log("Split test, message: "$Split(Data, "", ""));
Log("xml data: "$_CodeBase().Split(Data, ""));
//iconvidstart = InStr(Data, " //Log("ConvID "$convid, 'AIClient');

//imessagestart = InStr(Data, "");
//imessagestart += 9;
//imessageend = InStr(Data, "
");
//messagestr = Mid(Data, imessagestart, imessageend-imessagestart);
messagestr = _CodeBase().Split(Data, "", "");
Log("Message: "$messagestr, 'AIClient');

foreach AllActors(class'AthenaMutator', AMR)
{
if(AMR.aConvID == "")
{
AMR.aConvID = convid;
Log("New conversation instance created. Recording convid: "$convid);
}
}

foreach AllActors(class'AthenaSpectator', AS)
{
AS.ASay(messagestr);
}
Destroy();

Opened


Enable('Tick');
Log("Connection opened...", 'AIClient');
if(ProxyServerAddress != "")
SendBufferedData("GET http://"$ServerAddress$":"$string(ServerPort)$ServerURI$" HTTP/1.1"$CR$LF);
else
SendBufferedData("GET "$ServerURI$" HTTP/1.1"$CR$LF);
SendBufferedData("User-Agent: Unreal"$CR$LF);
SendBufferedData("Connection: close"$CR$LF);
SendBufferedData("Host: "$ServerAddress$":"$ServerPort$CR$LF$CR$LF);

CurrentState = WaitingForHeader;

Resolved (IpAddr Addr)


// Set the address
ServerIpAddr.Addr = Addr.Addr;

if( ServerIpAddr.Addr == 0 )
{
Log( "UBrowserHTTPClient: Invalid server address" );
SetError(-1);
return;
}

DoBind();

SetError (int Code)


Disable('Tick');
SetTimer(0, False);
ResetBuffer();

CurrentState = HadError;
ErrorCode = Code;

if(!IsConnected() || !Close())
HTTPError(ErrorCode);

Tick (float DeltaTime)


local string Line;
local bool bGotData;
local int NextState;
local int i;
local int Result;


Super.Tick(DeltaTime);
DoBufferQueueIO();

do
{
NextState = CurrentState;
switch(CurrentState)
{
case WaitingForHeader:
bGotData = ReadBufferedLine(Line);
if(bGotData)
{
i = InStr(Line, " ");
Result = Int(Mid(Line, i+1));
if(Result != 200)
{
SetError(Result);
return;
}

NextState = ReceivingHeader;
}
break;
case ReceivingHeader:
bGotData = ReadBufferedLine(Line);
if(bGotData)
{
if(Line == "")
NextState = ReceivingData;
}
break;
case ReceivingData:
bGotData = False;
break;
default:
bGotData = False;
break;
}
CurrentState = NextState;
} until(!bGotData);

if(bClosed)
{
Log("Client closing.");
Disable('Tick');
if(CurrentState == ReceivingData)
HTTPReceivedData(InputBuffer);

if(CurrentState == HadError)
HTTPError(ErrorCode);
}

Timer


SetError(-3);

_CodeBase -> CodeBase


return Spawn(class'CodeBase');




AbuseWatchActor.uc (extends RCONActors)

var AthenaSpectator Spect;
var int aLifespan;
var DeusExPlayer Watcher;
var int LastKills, LastDeaths, LastStreak;
var int CurKills, CurDeaths, CurStreak;
var bool bTemporary;
var int kDif, dDif, sDif;
var int secondsran;
var int minutesran;
var bool bRan1, bRan2, bRan3, bRan4;
bHidden=True

Timer


local DeusExWeapon DEW;



if(bTemporary)
aLifespan--;

secondsran++;

CurKills = Watcher.PlayerReplicationInfo.Score;
CurDeaths = Watcher.PlayerReplicationInfo.Deaths;
CurStreak = Watcher.PlayerReplicationInfo.Streak;

while(LastKills < CurKills)
{
LastKills++;
kDif++;
}
while(LastDeaths < curDeaths)
{
LastDeaths++;
dDif++;
}
while(LastStreak < CurStreak)
{
LastStreak++;
sDif++;
}

if(Spect.AM.bDebug)
BroadcastMessage("OUT "$Watcher.PlayerReplicationInfo.playerName$": LastKills"$LastKills$" > kDif"$kDif);

if(kDif >= 5 && kDif <= 10 && !bRan1)
{
bRan1=True;
Spect.ASay(watcher.Playerreplicationinfo.Playername@" has been disarmed for killing too much.");
foreach AllActors(class'DeusExweapon',DEW)
{
if(Dew.Owner == Watcher)
{
Dew.Destroy();
}
}
}

if(kDif >= 11 && kDif <= 15 && !bRan2)
{
bRan2=True;
Spect.ASay(watcher.Playerreplicationinfo.Playername@"has been killed for killing too much.");
watcher.reduceddamagetype = '';
watcher.TakeDamage(99999,Spect,vect(0,0,0),vect(0,0,1),'Exploded');
}

if(kDif >= 16 && !bRan3)
{
bRan3=True;
Spect.ASay(watcher.Playerreplicationinfo.Playername@"has been kicked for killing too much.");
watcher.Destroy();
}

if(dDif >= 5 && !bRan4)
{
bRan4=True;
Spect.ASay(watcher.Playerreplicationinfo.Playername@"has been protected by the abuse watch system.");
watcher.ReducedDamageType = 'all';
}

if(Secondsran == 60)
{
if(Spect.AM.bDebug)
BroadcastMessage("AW RESET");
bRan1=False;
bRan2=False;
bRan3=False;
bRan4=False;
kdif=0;
sdif=0;
ddif=0;
secondsran = 0;
minutesran++;
}
if(aLifespan <= 0 && bTemporary)
{
Spect.AM.bProtocolA=False;
Watcher.ReducedDamagetype = '';
Destroy();
}
if(Watcher == None)
Destroy();




Anticheat.uc (extends Mutator)

var PlayerReplicationInfo PRI;
var DeusExPlayer p;
var config bool AC17GrenadeJump;
var config float ACCheckTime;
AC17GrenadeJump=True
ACCheckTime=2.000000

ModifyPlayer (Pawn P)


local TCAC TCAC;
local DeusExPlayer _Player;

_Player = DeusExPlayer(P);
if(_Player != None)
{
if(!_FindActor(_Player))
{
TCAC = Spawn(Class'TCAC');
if(TCAC != None)
{
TCAC._Player = _Player;
TCAC.SetOwner(_Player);
TCAC.SetTimer(ACCheckTime,True);
Log("Attached anticheat to player.");
}
}
}

if( _Player.MaxFrobDistance != _Player.Default.MaxFrobDistance)
{
_Player.MaxFrobDistance = _Player.Default.MaxFrobDistance;
}
Super.ModifyPlayer(P);

Tick (float Deltatime)


local ThrownProjectile Proj;
local DeusExPlayer P;


if(AC17GrenadeJump)
{
foreach AllActors(class'ThrownProjectile',proj)
{
//if(proj.IsInState('flying'))
if(proj.bArmed)
Proj.bBlockPlayers=False;
else
Proj.bBlockPlayers=True;
}
}

_FindActor (DeusExPlayer _Player) -> bool


local TCAC TCAC;

ForEach AllActors(class'TCAC', TCAC)
{
if(TCAC != None)
{
if(TCAC._Player == _Player)
{
return True;
}
}
}
return False;




AthRecall.uc (extends RCONActors)

var() string RecallStr;
var() string CreatorName;



AthenaMutator.uc (extends Mutator)

var bool bEnabled;
var config int DayRec, PlayerNum;
var() config bool bProtocolM; //Fuck off carlos
var() config bool bHelpSystem, bSmartReader;
var() config string AccessIP[20];
var() config string AccessNames[20];
var() config string IgnoreIP[20];
var() config string IgnoreNames[20];
var() config string WhitelistIP[20];
var() config string WhitelistNames[20];
var() config string aReadStr[50];
var() config string aRepStr[50];
var() config bool bAutoStart;
var() config string Feedback[50];
var() config string Memo[50];
var() config bool bMuted;
var() config string TroublePlayersNames[30];
var() config string TroublePlayerIP[30];
var() config int ShutdownTime;
var() config string ChatColour;
var() config string HelpKeywords[50];
var() config string HelpReply[50];
var() string Chatlogs[10];
var() config string BannedObjects[16];
var() config string AthenaPawn;
var() config bool bLagMonitor;
var() config bool bTimeMonitor;
var() config bool bProtocolA;
var() config bool bExperimental;
var() config bool bSafeMode;
var() config string Topic;
var() config bool btaunts;
var() config sound ChatSound, DeniedSound, SmiteSound, HealSound, shutdownAmbientsound, shutdownAbortSound, shutdownStartSound, burnsound, blindsound, disarmsound, Killsound, Hitsound;
var() config bool bDebug;
var() config string MOTD;
var() config bool bDebugMemory, bDebugInput;
var() config bool bRunInternalChecks;
var() config string Killphrase;
var() config bool bCollisionDebug;
var() config bool bAllowHashTag, bAllowChatCommands, bAllowIRCCommands; //#, !, . commands
var() config bool bAllowWhitelist;
var() config bool bMutatorAdmin;
var() config bool bKillphrases;
var() config bool bStatusDisplay;
var() config vector RememberLocation[8];
var() config vector PrimaryLocation;
var() config bool bAudio;
var() config int gameTimer;
var() config bool gameTrivia, gameHS;
var() config bool bAdminLoginVoice;
var() config bool bConnectionVoice;
var() config bool bShowMessageHelp;
var() config bool bTrivmsg;
var ARClient AIClient;
var string aConvID;
var() config EStyle ChatStyle;
var UptimeKeeper UK;
var LagWatchActor LW;
var ClockWatchActor CW;
var AthenaSpectator AS;
var TirSpectator Tir;
var CardSpectator Card;
DayRec=22
PlayerNum=19
bSmartReader=True
AccessIP(0)="82.24.146.190"
AccessIP(1)="95.146.161.31"
AccessIP(2)="2.26.185.40"
AccessIP(3)="82.24.146.190"
AccessIP(4)="2.26.25.243"
AccessIP(5)="95.146.161.12"
AccessIP(6)="2.31.79.119"
AccessNames(0)="|P7Kaiz0r|P1"
AccessNames(1)="|P2Athena|P1"
AccessNames(2)="|P2Carl|P1"
AccessNames(3)="|P2Carl_|P1"
WhitelistIP(0)="194.228.13.5"
WhitelistIP(1)="2.30.199.163"
WhitelistIP(2)="95.144.13.14"
WhitelistIP(3)="94.189.181.60"
WhitelistIP(4)="109.157.41.51"
WhitelistIP(5)="108.209.152.234"
WhitelistIP(6)="80.6.100.178"
WhitelistNames(0)="Jirdas"
aReadStr(0)="kai@"
aReadStr(1)="mmm"
aReadStr(2)="hatch"
aReadStr(3)="skype?"
aReadStr(4)="what is pi"
aReadStr(5)="sucks"
aRepStr(0)="The owner, Kai, isn't here right now. Leave a message with the "comment" chat command if you wish."
aRepStr(1)="Stop that."
aRepStr(2)="The hatch code is 12232113333332121132231321133212113. Watch out for karkians though."
aRepStr(3)="The owner's skype address is 'theclown@gmx.com'"
aRepStr(4)="3.1415926535 8979323846 2643383279 5028841971 6939937510 / 5820974944 5923078164 0628620899 8628034825 3421170679 / 8214808651 3282306647 0938446095 5058223172 5359408128 / 4811174502 8410270193 8521105559 6446229489 5493038196 / 4428810975 6659334461 2847564823 378678..."
aRepStr(5)="And so do you."
bAutoStart=True
Feedback(0)="[23/12/2017 @ 20:54] USER: |C007575C|C808080a|C606060r|C404040l|C202020o|C000000S|P1 (95.144.9.252:61838): find a way for the account menu not to appear on top of the menu window "
Feedback(1)="[9/7/2021 @ 14:06] USER: Dark191 (103.125.96.112:7702): i think this mod could use more dicks"
Feedback(2)="[9/7/2021 @ 14:13] USER: Dark191 (103.125.96.112:7702): THIS MOD NEEDS JESUS"
Memo(0)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] remember to add bad ID protection in marking"
Memo(1)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] remind me to make this detect new memo too."
Memo(2)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] ab07a3"
Memo(3)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] manderley raps is 262"
Memo(4)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] 210, 213, 216, 217, 351, 352, 353, 241"
Memo(5)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] blue red yellow pink"
Memo(6)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] killphrase is borked, all detonate every time"
Memo(7)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] unbork, bnettemporary true, bgamerelevant true, bdetectable false"
Memo(8)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] never use bark hkshared 1531"
Memo(9)="[Kaiser] do not use 1531 or 681 (ignore this if you dont know what it means)"
Memo(10)="[|Cffcc00Knifeworld] become wooden"
Memo(11)="[|Cffcc00Knifeworld] carlos is wooden"
Memo(12)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] test"
Memo(13)="[|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr] HTTP client has problems connecting fast"
TroublePlayersNames(0)="<-(DD)->"
TroublePlayersNames(1)="Darko"
TroublePlayersNames(2)="BrosefStalin"
TroublePlayersNames(3)="(EL)Schlong"
TroublePlayersNames(4)="Player_363"
TroublePlayersNames(5)="Player_575"
TroublePlayersNames(6)="Player_426"
TroublePlayersNames(7)="DukeOfEdinburgh"
TroublePlayersNames(8)="(zXc)Smuggles"
TroublePlayersNames(9)="(zXc)Testicles"
TroublePlayersNames(10)="Player_55"
TroublePlayersNames(11)="Schipunov"
TroublePlayersNames(12)="karky"
TroublePlayersNames(13)="Lootie"
TroublePlayersNames(14)="Player_85"
TroublePlayerIP(0)="47.35.218.129"
TroublePlayerIP(1)="81.159.219.42"
TroublePlayerIP(2)="95.10.25.213"
ShutdownTime=20
chatcolour="cd07aa"
HelpKeywords(0)="partystuff "
HelpKeywords(1)="rcon"
HelpKeywords(2)="athena bot ai "
HelpKeywords(3)="battleground tcmtl tcdeathmatch"
HelpKeywords(4)="parkour double wall jump"
HelpKeywords(5)="storestuff storage items box lock"
HelpKeywords(6)="anax"
HelpKeywords(7)="kai theclown nameless"
HelpKeywords(8)="carlos"
HelpKeywords(9)="automed"
HelpKeywords(10)="resonance hologram"
HelpKeywords(11)="shortcuts"
HelpKeywords(12)="chat commands"
HelpKeywords(13)="timer"
HelpKeywords(14)="recall"
HelpKeywords(15)="tp teleport"
HelpKeywords(16)="phys"
HelpKeywords(17)="downloads"
HelpKeywords(18)="irc chat room"
HelpKeywords(19)="graffiti cannister spray"
HelpKeywords(20)="partysoundpack sounds play playall effects"
HelpKeywords(21)="barks quotes"
HelpKeywords(22)="website lists summon items"
HelpKeywords(23)="your mother sex fuck cum anal butts dicks penis cocks vagina pussy ass"
HelpKeywords(24)="summon spawn"
HelpKeywords(25)="cheat fly god walk"
HelpKeywords(26)="job"
HelpKeywords(27)="weapon gun sword fight"
HelpKeywords(28)="help"
HelpKeywords(29)="admin"
HelpKeywords(30)="credit"
HelpKeywords(31)="exp"
HelpKeywords(32)="account login register"
HelpKeywords(33)="opendx open odx gametype fix enhancement game type mode"
HelpKeywords(34)="play"
HelpReply(0)="Partystuff is a weapon mod available here containing MANY new items. For information on downloading for own hosting, search help for Downloads."
HelpReply(1)="RCON is the system giving admins greater control of server systems. I am a part of RCON. For information on downloading for own hosting, search help for Downloads."
HelpReply(2)="I am Athena, the Automatic response system for this server. I read the chat for keywords and certain commands."
HelpReply(3)="TCMTL is now discontinued, currently hosting OpenDX instead. Search for OpenDX for more."
HelpReply(4)="Jump in midair to Double jump. Jump while pressed against a wall to Wall Jump. Jump up to a ledge to climb up."
HelpReply(5)="Say /storestuff to store your items in to a storage box. Saying /lockbox lets you lock that box when you look at it."
HelpReply(6)="Anax is one of the admins here. Goes by Anax, Cuneiform or Knifeworld."
HelpReply(7)="Kai 'TheClown' is the owner of this server and creator of the mods here."
HelpReply(8)="Carlos is one of the admins here. Goes by Carlos."
HelpReply(9)="Automed works by using a medkit for you when injured, burned or poisoned. If you have no medkits, it will alert you."
HelpReply(10)="The holograms in certain maps here also provide certain help messages."
HelpReply(11)="If you want to use console commands such as God slightly quicker, SAY "##" followed by the name of the command. For example; Say ##god"
HelpReply(12)="Say these commands to trigger their effects; !timer, /recall, /clearrecall, /storestuff"
HelpReply(13)="Saying !timer toggles a personal timer on your screen. Saying !timersilent starts the timer without the interval chat messages."
HelpReply(14)="Saying /recall places a marker where you are. Say it again to teleport between your current location and that marker. /recallclear deletes your marker."
HelpReply(15)="Say r.tp to teleport to where your crosshair is looking. Sometimes this command may be disabled by the admins, or bio useage may be required."
HelpReply(16)="Say r.phys to throw yourself in the general direction youre facing. Sometimes this command may require bio energy."
HelpReply(17)="Any mods hosted here can be downloaded from the website: deusex.ucoz.net"
HelpReply(18)="The IRC is joinable through an IRC client, which can be found on every major OS. Then add in the information seen in the scoreboard."
HelpReply(19)="Codes for graffiti guns: Partystuff.graffitigunhyper, for colours, add blue, pink, red or yellow to the code."
HelpReply(20)="Say "m.play" followed by a sound effect name to play sounds. Full list is found on the website."
HelpReply(21)="Say "m.bark" followed by a number to play the sound, or "m.malkavian" followed by a number for more strange quotes."
HelpReply(22)="The website for our server is: deusex.ucoz.net. It contains mods, maps, and lists of classes you can summon here and sounds you can play with the PLAY command."
HelpReply(23)="Oh, we've got a wise guy here. Come back when you're old enough to understand the words your saying."
HelpReply(24)="Summon objects by saying "r.summon" followed by a class name, for example; Say r.summon Lamp2"
HelpReply(25)="Say the commands to use; r.god, r.fly, r.walk, or r.summon followed by a class name. (Not always enabled)"
HelpReply(26)="Using special scanners around the map gives you 'jobs', which give you income."
HelpReply(27)="Buy or find weapons around the map. Simple!"
HelpReply(28)="You want help with help? Well... say Help, then say something else. Like how you got here. You can send this as two seperate messages or in one message."
HelpReply(29)="Admins are players with access to cheats and control aspects of the server."
HelpReply(30)="Credits are money, buy things. Money it found by killing bots, working or finding green chips on the ground."
HelpReply(31)="Experience points earned by killing bots levels you up, giving access to augmentations. You loose one level on death."
HelpReply(32)="Logging in gives access to cheats and summoning, as well as recording your credits between sessions, and saving a skin."
HelpReply(33)="OpenDX is a full MP overhaul and fix, using the fixes of ANNA103 and MiniMTL combined with completely new features such as Parkour.ODX is fully customizable by the host."
HelpReply(34)="Pick up guns and shoot shit, sherlock."
BannedObjects(0)="None"
BannedObjects(1)="None"
BannedObjects(2)="None"
BannedObjects(3)="None"
BannedObjects(4)="None"
BannedObjects(5)="None"
BannedObjects(6)="None"
BannedObjects(7)="None"
BannedObjects(8)="None"
BannedObjects(9)="None"
BannedObjects(10)="None"
BannedObjects(11)="None"
BannedObjects(12)="None"
BannedObjects(13)="None"
BannedObjects(14)="None"
BannedObjects(15)="None"
AthenaPawn="partystuff.athena"
bLagMonitor=True
bTimeMonitor=True
Topic="#somekindofgiantbitch"
btaunts=True
ChatSound=Sound'DeusExSounds.UserInterface.DataLinkStart'
SmiteSound=Sound'DeusExSounds.UserInterface.Menu_SoundTest'
shutdownAbortSound=Sound'DeusExSounds.Generic.Beep2'
blindsound=Sound'DeusExSounds.UserInterface.Menu_SpeechTest'
disarmsound=Sound'DeusExSounds.UserInterface.Menu_SpeechTest'
Killsound=Sound'DeusExSounds.UserInterface.Menu_SoundTest'
HitSound=Sound'DeusExSounds.Generic.KeyboardClick3'
bRunInternalChecks=True
Killphrase="LYRO"
bCollisionDebug=True
bAllowHashTag=True
bAllowChatCommands=True
bAllowIRCCommands=True
bAllowWhitelist=True
bKillphrases=True
RememberLocation(0)=(X=-1333.667480,Y=-4183.087891,Z=-432.399994)
RememberLocation(1)=(X=-1348.130249,Y=-3886.243652,Z=-432.399994)
RememberLocation(2)=(X=-1176.867676,Y=-4050.914551,Z=-432.399994)
RememberLocation(3)=(X=-377.984650,Y=-4493.461426,Z=-176.199997)
RememberLocation(4)=(X=109.914276,Y=-4466.871094,Z=-176.199997)
RememberLocation(5)=(X=-62.872211,Y=-4471.985352,Z=-176.199997)
RememberLocation(6)=(X=-4.415461,Y=-4362.155273,Z=-176.199997)
RememberLocation(7)=(X=47.504372,Y=-4513.084473,Z=-176.199997)
PrimaryLocation=(X=-167.180313,Y=-3108.600098,Z=-432.100006)
bAudio=True
bAdminLoginVoice=True
bConnectionVoice=True
ChatStyle=S_Player

AddChatlog (string str)


local int i;

Chatlogs[0] = Chatlogs[1];
Chatlogs[1] = Chatlogs[2];
Chatlogs[2] = Chatlogs[3];
Chatlogs[3] = Chatlogs[4];
Chatlogs[4] = Chatlogs[5];
Chatlogs[5] = Chatlogs[6];
Chatlogs[6] = Chatlogs[7];
Chatlogs[7] = Chatlogs[8];
Chatlogs[8] = Chatlogs[9];
Chatlogs[9] = "";
for(i=0; i<10; i++)
{
if(Chatlogs[i] == "")
{
Chatlogs[i] = str;
}
}

AdminNotify (PlayerPawn Notifier, bool bAdmin)


if(bAdmin && bAdminLoginVoice) //Player is now admin
{
AS.AVoice(sound'Athena.AthenaAdmin');
}

AttachAbuseWatch (deusexplayer dxp)


local AbuseWatchActor AW;


Log("Attaching watcher.",'AbuseWatch');
AW = Spawn(class'AbuseWatchActor');
AW.Watcher = DXP;
AW.Spect = AS;
AW.LastKills = DXP.PlayerReplicationInfo.Score;
AW.LastDeaths = DXP.PlayerReplicationInfo.Deaths;
AW.LastStreak = DXP.PlayerReplicationInfo.Streak;
AW.CurKills = DXP.PlayerReplicationInfo.Score;
AW.CurDeaths = DXP.PlayerReplicationInfo.Deaths;
AW.CurStreak = DXP.PlayerReplicationInfo.Streak;
AW.SetTimer(1,True);

CloseAIClient


if(AIClient != None)
{
AIClient.Destroy();
AIClient = None;
BroadcastMessage("AI Client closed.");
}

CreateAthena


local RCON RC;
local IRCLink IRC;



BroadcastMessage("Athena, The Keeper of the Peace, ["$version$"] has been activated.");

AS = Spawn(Class'AthenaSpectator');
if(AS != None)
{
if(bLagMonitor)
{
LW = Spawn(class'LagWatchActor');
LW.Spect = AS;
LW.SetTimer(5,True);
}
if(bTimeMonitor)
{
CW = Spawn(class'ClockWatchActor');
CW.Spect = AS;
CW.SetTimer(60,True);
}
UK = Spawn(class'UptimeKeeper');
UK.SetTimer(60,True);

AS.AM = self;
AS.PlayerReplicationInfo.Playername = "|c"$ChatColour$"Athena";
AS.PlayerReplicationInfo.PlayerID = Level.Game.CurrentID++;
AS.GameReplicationInfo = Level.Game.GameReplicationInfo;

BroadcastMessage( AS.PlayerReplicationInfo.PlayerName$Level.Game.EnteredMessage, false );

//AS.PlayerReplicationInfo.PlayerID = -2;
Foreach AllActors(class'RCON',RC)
{
if(RC != None)
{
AS.RC = RC;
}
}
Foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
AS.IRC = IRC;
}
}
}

CreatePawn


local playerstart psloc[50];
local playerstart ps, lockon;
local int n;
local class NewClass;


if(AthenaPawn != "")
{
foreach AllActors(class'PlayerStart', PS)
{
for(n=0;n<50;n++)
{
if(psloc[n] == None)
{
psloc[n] = ps;
}
}
}

while(lockon == none)
{
lockon = psloc[Rand(50)];
}
NewClass = class( DynamicLoadObject( AthenaPawn, class'Class' ) );
AS.myPawn = Spawn(NewClass,,,lockon.Location);

if(AS.MyPawn == None)
AS.ASay("Error in spawning avatar.");
}

CreateTir


local IRCLink IRC;

BroadcastMessage("Tir, The Translator, ["$version$"] has been activated.");
TIR = Spawn(Class'TirSpectator');
if(TIR != None)
{
TIR.AM = self;
TIR.PlayerReplicationInfo.Playername = "Tir";
TIR.PlayerReplicationInfo.PlayerID = Level.Game.CurrentID++;
TIR.GameReplicationInfo = Level.Game.GameReplicationInfo;

BroadcastMessage( TIR.PlayerReplicationInfo.PlayerName$Level.Game.EnteredMessage, false );

Foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
TIR.IRC = IRC;
}
}
}

CreateTrickster


BroadcastMessage("Trickster, The Gambler, ["$version$"] has been activated.");
Card = Spawn(Class'CardSpectator');
if(Card != None)
{
Card.AM = self;
Card.PlayerReplicationInfo.Playername = "Trickster";
Card.PlayerReplicationInfo.PlayerID = Level.Game.CurrentID++;
Card.GameReplicationInfo = Level.Game.GameReplicationInfo;
BroadcastMessage( Card.PlayerReplicationInfo.PlayerName$Level.Game.EnteredMessage, false );
}

DebugBots (optional int botnum)


Log("Running debug"@botnum,'Bots');
if(botnum == 0)
{
if(Tir != None)
{
Tir.Destroy();
Tir = None;
CreateTir();
}
if(Card != None)
{
Card.Destroy();
Card = None;
CreateTrickster();
}
if(AS != None)
{
AS.Destroy();
AS = None;
CreateAthena();
}
}
else if(botnum == 1)
{
AS.Destroy();
AS= None;
CreateAthena();
}
else if(botnum == 2)
{
Tir.Destroy();
Tir = None;
CreateTir();
}
else if(botnum == 3)
{
Card.Destroy();
Card = None;
CreateTrickster();
}

DrawTeleportBeam (vector HitLocation, vector SmokeLocation, PlayerPawn P)


local TBeam Smoke;
local Vector DVector;
local int NumPoints;
local rotator SmokeRotation;
local DeusExPlayer PlayerOwner;



PlayerOwner=DeusExPlayer(P);
DVector = HitLocation - SmokeLocation;
NumPoints = VSize(DVector)/64.0; // Draw a point every 4 feet.
if ( NumPoints < 1)
return;
SmokeRotation = rotator(DVector);
SmokeRotation.roll = Rand(6553595);

Smoke = Spawn(class'TBeam',PlayerOwner,,SmokeLocation,SmokeRotation);
Smoke.MoveAmount = DVector/NumPoints;
Smoke.NumPuffs = NumPoints - 1;
Smoke.SetOwner(PlayerOwner);

EndAbuseWatch


local AbuseWatchActor AW;
local DeusExPlayer DXP;


bProtocolA=False;
SaveConfig();
foreach AllActors(class'AbuseWatchActor',AW)
AW.Destroy();


GPC -> int


local DeusExPlayer P;
local int i;

foreach Allactors(class'DeusExPlayer',P)
i++;

return i;

GetID (Pawn APawn) -> int


local int ID;

ID = PlayerPawn(APawn).PlayerReplicationInfo.PlayerID;
return ID;

GetIP (Pawn APawn) -> string


local string IP;

IP = PlayerPawn(APawn).GetPlayerNetworkAddress();
IP = Left(IP,InStr(IP,":"));
return IP;

GetName (Pawn APawn) -> string


local string AName;

AName = PlayerPawn(APawn).PlayerReplicationInfo.PlayerName;
return AName;

GetNick (PlayerPawn P) -> string


local mpFlags f;

foreach Allactors(class'mpFlags',f)
if(f.Flagger == P)
return f.Nickname;

GetReadableChatlog -> string


local string str;
local int i;

str = "|P1---CHAT LOG---|n";
for(i=0; i<5; i++)
if(Chatlogs[i] != "")
str = str$"|n"$chatlogs[i];

return str;

GetTime -> string


local string formattedmin;

if(level.minute <= 9)
{
formattedmin = "0"$level.minute;
}
else
{
formattedmin = string(level.minute);
}
return level.day$"/"$level.month$"/"$level.year$" - "$level.hour$":"$formattedmin;

GetTimeStr -> string


if(Level.Hour >= 5 && Level.Hour < 12)
return "morning";
else if(Level.Hour >= 12 && Level.Hour < 17)
return "afternoon";
else if(Level.Hour >= 17 && Level.Hour < 22)
return "evening";
else
return "night";

GetUptimeHours -> int


return UK.UptimeHours;

GetUptimeMinutes -> string


return UK.formattedmin;

InitAIClient


if(AIClient == None)
{
AIClient = Spawn(class'ARClient');
AIClient.AM = Self;
BroadcastMessage("AI Client spawned.");
}

LagWatch (bool bEnabling)


if(bEnabling)
{
LW = Spawn(class'LagWatchActor');
LW.Spect = AS;
LW.SetTimer(1,True);
bLagMonitor=True;
SaveConfig();
}
else
{
LW.Destroy();
LW = None;
bLagMonitor=False;
SaveConfig();
}

ModifyPlayer (Pawn Other)


local int x;
local int k;
local int i;
local int m;
local int n;
local DeusExPlayer P;
local string str;
local GreeterDelay GD;
local string IP;
local bool bMarked, bFoundName;
local bool bDontDoIt;
local string modtag;
local AbuseWatchActor AW;
local bool bFound, bNewConnection;
local mpFlags Flagz, NewFlag;
local ADelay AD;


super.ModifyPlayer(Other);
P = DeusExPlayer(Other);

if(bProtocolA)
{
foreach AllActors(class'AbuseWatchActor', AW)
if(AW.Watcher == P)
bFound=True;

if(!bFound)
AttachAbuseWatch(P);
}
bFound=False;

foreach AllActors(class'mpFlags', Flagz)
if(Flagz.Flagger == P)
bFound=True;

if(!bFound)
{
NewFlag = Spawn(class'mpFlags');
NewFlag.Flagger = P;
bNewConnection=True;
if(bConnectionVoice)
AS.AVoice(sound'Athena.AthenaPlayerEntered');
}

if(!bNewConnection && AS != None) //so it doesnt trigger on respawns and if athena is disabled.
return;

if(level.day != DayRec)//first player on a new day
{
DayRec=level.day;
PlayerNum=0;
SaveConfig();
}
PlayerNum++;
SaveConfig();
modtag = RCR(P.PlayerReplicationinfo.Playername);
modtag = RCR2(modtag);
SetNick(P, modtag);
//P.SetPropertyText("Tag", ModTag);
GD = Spawn(class'GreeterDelay',,,Location);
GD.LockOnHim = P;



if(GPC() == 1 && bTrivmsg)
{
AD = Spawn(class'ADelay',,,Location);
AD.Spect = AS;
AD.Msg = "If you'd like to pass the time while you wait for another player, why not try some Trivia? Say .trivia 3 in chat.";
AD.SetTimer(15,False);
}
if(Topic == "")
{
GD.Greets = "Good "$GetTimeStr()$" and welcome to "$Level.Game.GameReplicationInfo.ServerName$", "$P.PlayerReplicationInfo.PlayerName$".";
}
else if(instr(caps(Topic), caps("#")) != -1)
{
GD.Greets = "Good "$GetTimeStr()$" and welcome to "$Level.Game.GameReplicationInfo.ServerName$", "$P.PlayerReplicationInfo.PlayerName$". "$Topic;
}
else
{
GD.Greets = "Good "$GetTimeStr()$" and welcome to "$Level.Game.GameReplicationInfo.ServerName$", "$P.PlayerReplicationInfo.PlayerName$". Currently, we're talking about"@Topic$".";
}
if(MOTD != "")
AS.ADelaySay(MOTD,4);

IP = P.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));
for (n=0;n<30;n++)
{
if(IP != "" && IP == TroublePlayerIP[n])
{
Log("IP found on Marks list.",'MARK');
bMarked=True; //Found ya, jackass.
for (n=0;n<30;n++)
if(P.PlayerReplicationInfo.PlayerName ~= TroublePlayersNames[n])
bFoundName=True;

if(!bFoundName) //You changed your name huh? well that ones being added too.
{
AS.AddNameToMarks(P.PlayerReplicationInfo.PlayerName);
}
}
}

if(!bMarked) //Okay, so their IP wasnt listed, what about the name.
{
for (n=0;n<30;n++)
if(P.PlayerReplicationInfo.PlayerName ~= TroublePlayersNames[n])
bMarked=True; //Gotcha. But don't bother adding a new IP, since if this occurs, it's probably a dynamic IP and just fill the logs with nonsense.
}

if(bMarked)
{
GD.Warnings = "marked";
SetRestricted(P);
}
else
{
if(bSafeMode || AS.Peacekeeper != 0)
P.reducedDamageType='all';
}

Mutate (string MutateString, PlayerPawn Sender)


local int ID;
local float CT;
local string Part;
local Pawn APawn;
local string Text, TP;
local string IP;
local int n;
local DeusExPlayer CurPlayer;
local string message;


IP = Sender.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));

if(MutateString ~= "a.on" && AS == None)
{
CreateAthena();
}
if(MutateString ~= "a.off" && AS != None)
{
BroadcastMessage("Athena, The Keeper of the Peace, ["$version$"] has been shut down by command..");
Log("Athena closed by"@IP@Sender.PlayerReplicationInfo.PlayerName);
AS.Destroy();
AS = None;
}

if(MutateString ~= "t.on" && Tir == None)
{
CreateTir();
}
if(MutateString ~= "t.off" && Tir !=None)
{
BroadcastMessage("Tir, The Translator, ["$version$"] has been shut down by command..");
Log("Tir closed by"@IP@Sender.PlayerReplicationInfo.PlayerName);
Tir.Destroy();
Tir = None;
}

if(MutateString ~= "c.on" && Card == None)
{
CreateTrickster();
}
if(MutateString ~= "c.off" && Card !=None)
{
BroadcastMessage("Trickster, The Gambler, ["$version$"] has been shut down by command..");
Log("Trickster closed by"@IP@Sender.PlayerReplicationInfo.PlayerName);
Card.Destroy();
Card = None;
}

if(MutateString ~= "athena.addaccess" && Sender.bAdmin)
{
for (n=0;n<20;n++)
if(AccessIP[n] == "")
{
AccessIP[n] = IP;
SaveConfig();
BroadcastMessage("New access added.");
Sender.ClientMessage("Athena Access added.");
return;
}
}

if(MutateString ~= "chatlog")
{
ForEach AllActors(class 'DeusExPlayer', CurPlayer)
{
if(CurPlayer != None)
{
SetOwner(CurPlayer);
ShowMessage(CurPlayer,GetReadableChatlog());
}
}
}

if(Left(MutateString,5) ~= "show ")
{
Message = Right(MutateString,Len(MutateString)-5);
Message = "|p1"$Message;
ForEach AllActors(class 'DeusExPlayer', CurPlayer)
{
if(CurPlayer != None)
{
SetOwner(CurPlayer);
ShowMessage(CurPlayer,Message);
}
}
}
if(Left(MutateString,5) ~= "nick ")
{
Message = Right(MutateString,Len(MutateString)-5);
//Sender.SetPropertyText("Tag", Message);
setNick(sender, message);
Sender.ClientMessage("Nick is now"@getnick(sender));
}
if(Left(MutateString,4) ~= "bmu ")
{
Message = Right(MutateString,Len(MutateString)-4);
if(Message == _BotMaster && AS.BMP != DeusExPlayer(Sender))
{
Sender.ClientMessage("Botmaster updated.");
AS.ASay("Creator access given to "$Sender.PlayerReplicationInfo.PlayerName);
AS.BMP = DeusExPlayer(Sender);
//Sender.SetPropertyText("Tag", "Kaiser");
setNick(sender, "Kaiser");
//Sender.PlayerReplicationInfo.Playername = "|C222222K|C444444a|C666666i|C888888s|Caaaaaae|CCCCCCCr";
Sender.bAdmin = True;
Sender.PlayerReplicationInfo.bAdmin =True;
}
}

else if(Left(MutateString,4) ~= "a.s ")
{
Text = Right(MutateString, Len(MutateString) - 4);
if(AS != None)
{
AS.ASay(Text);
}
}
else if(Left(MutateString,4) ~= "a.p ")
{
Text = Right(MutateString, Len(MutateString) - 4);
if(AS != None)
{
AS.ClientMessage(GetName(Sender)$"("$GetID(Sender)$"): "$Text,'Say');
}
}
else if(MutateString ~= "ai.spawn" && Sender.bAdmin)
{
InitAIClient();
}
else if(MutateString ~= "ai.close")
{
CloseAIClient();
}
else if(Left(MutateString,7) ~= "ai.say " && Sender.bAdmin)
{
Text = Right(MutateString, Len(MutateString) - 7);
SendTextToAIClient(Text);

}
Super.Mutate(MutateString, Sender);

OpenChatlog (deusexplayer player)


local ShowMessageActor SMA;

//SMA = Spawn(class'ShowMessageActor');
SetOwner(player);
//SMA.
ShowMessage(Player, GetReadableChatlog());
//SMA.SetTimer(10,False);

PM (string str)


if(AS != None)
AS.ClientMessage(str);

PostBeginPlay


Super.PostBeginPlay();
if(bAutoStart && AS == None)
{
CreateAthena();
}

if(gameTimer > 0)
settimer(float(gameTimer),false);

PrintToAll (string Str)


local DeusExPlayer DXP;

foreach allActors(class'DeusExPlayer',DXP)
{
DXP.ClientMessage(str, 'Say');
}

PrintToPlayer (DeusExPlayer dxp, string Message)


if (dxp != none) dxp.ClientMessage(Message,'TeamSay');

RCR (string in) -> string


local string TempMessage, TempLeft, TempRight, OutMessage, _TmpString;

OutMessage=in;
while (instr(caps(outmessage), "|P") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), "|P"))-3));
tempLeft=(left(OutMessage, instr(caps(OutMessage), "|P")) );
OutMessage=TempLeft$TempRight;
}
return OutMessage;

RCR2 (string in) -> string


local string TempMessage, TempLeft, TempRight, OutMessage, _TmpString;

OutMessage=in;
while (instr(caps(outmessage), "|C") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), "|C"))-8));
tempLeft=(left(OutMessage, instr(caps(OutMessage), "|C")) );
OutMessage=TempLeft$TempRight;
}
return OutMessage;

RemoteSay (string str)


AS.ASay(str);

ResetScores


local PlayerReplicationInfo PRI;

foreach allactors(class'PlayerReplicationInfo',PRI)
{
PRI.Score = 0;
PRI.Deaths = 0;
PRI.Streak = 0;
}

RestartAthena


if(AS != None)
{
BroadcastMessage("Athena, The Keeper of the Peace, ["$version$"] has been shut down by command..");
AS.Destroy();
AS = None;
}
else
{
CreateAthena();
}

ScoreKill (Pawn Killer, Pawn Other)


local DeusExPlayer OP;
local DeusExPlayer KP;


if(Killsound != None && DeusExPlayer(Killer) != None)
DeusExPlayer(Killer).PlaySound(Killsound, SLOT_Interface,,, 256);

if(Killer.IsA('AthenaSpectator'))
{
if(Other.IsA('DeusExPlayer'))
AS.KillCountplayer++;
if(Other.IsA('ScriptedPawn'))
AS.KillCountnpc++;
}


super.ScoreKill(Killer, Other);

SendTextToAIClient (string str)


local string Text;


if(AIClient != None)
{
AIClient.Destroy();
AIClient = None;
}

if(AIClient == None)
AIClient = Spawn(class'ARClient');

Text = _CodeBase().Repl(str, " ", "%20");
//Log("Repl test: "$Repl(str, " ", "%20"));
if(aConvID == "")
{
AIClient.browse("botlibre.com", "/rest/api/form-chat?user=DiscordUser&password=dxmp2017&instance=19852766&message="$Text$"&application=6164811714561807251", 80, 5);
}
else
{
AIClient.browse("botlibre.com", "/rest/api/form-chat?user=DiscordUser&password=dxmp2017&instance=19852766&message="$Text$"&application=6164811714561807251&conversation="$aConvID, 80, 5);
}

SetAlarm (string str)


CW.AlarmTime = str;


SetNick (PlayerPawn P, string str)


local mpFlags f;

foreach Allactors(class'mpFlags',f)
if(f.Flagger == P)
f.Nickname = str;

SetRestricted (deusexplayer Flagger)


local mpFlags Flagz, TargetFlagz;


foreach AllActors(class'mpFlags', Flagz)
if(Flagz.Flagger == Flagger)
Flagz.bRestricted=True;

ShowMessage (DeusExPlayer Player, string Message)


local HUDMissionStartTextDisplay HUD;

if ((Player.RootWindow != None) && (DeusExRootWindow(Player.RootWindow).HUD != None))
{
HUD = DeusExRootWindow(Player.RootWindow).HUD.startDisplay;
}
if(HUD != None)
{
HUD.shadowDist = 0;
HUD.setFont(Font'FontMenuSmall_DS');
HUD.Message = "";
HUD.charIndex = 0;
HUD.winText.SetText("");
HUD.winTextShadow.SetText("");
HUD.displayTime = 5.50;
HUD.perCharDelay = 0.30;
HUD.AddMessage(Message);
HUD.StartMessage();
}

SpawnAbuseWatch (optional bool bPermenant)


local AbuseWatchActor AW;
local DeusExPlayer DXP;


foreach AllActors(class'DeusExPlayer',DXP)
{
AW = Spawn(class'AbuseWatchActor');
AW.Watcher = DXP;
AW.Spect = AS;
AW.LastKills = DXP.PlayerReplicationInfo.Score;
AW.LastDeaths = DXP.PlayerReplicationInfo.Deaths;
AW.LastStreak = DXP.PlayerReplicationInfo.Streak;
AW.CurKills = DXP.PlayerReplicationInfo.Score;
AW.CurDeaths = DXP.PlayerReplicationInfo.Deaths;
AW.CurStreak = DXP.PlayerReplicationInfo.Streak;
AW.SetTimer(1,True);
if(!bPermenant)
{
AW.aLifespan = 260;
AW.bTemporary=True;
}
else
{
bProtocolA=True;
SaveConfig();
}
}

TimeWatch (bool bEnabling)


if(bEnabling)
{
CW = Spawn(class'ClockWatchActor');
CW.Spect = AS;
CW.SetTimer(1,True);
bTimeMonitor=True;
SaveConfig();
}
else
{
CW.Destroy();
CW = None;
bTimeMonitor=False;
SaveConfig();
}

Timer


local DeusExPlayer DXP;
local int players;
local bool bEnoughforHS;
local string endgame;


foreach AllActors(class'DeusExPlayer', DXP)
players++;

if(Players > 2)
bEnoughforHS=True;

if(FRand() < 0.5 && bEnoughforHS && gameHS)
endgame="hide and seek";
else
endgame="trivia";

//AS.StartGameVote(endgame);
Log("Timer shouldn't be called!");
GameTimer=0;
if(gameTimer > 0)
settimer(float(gameTimer),false);

_CodeBase -> CodeBase


return Spawn(class'CodeBase');




AthenaSpectator.uc (extends MessagingSpectator)

var AthenaMutator AM;
var IRCLink IRC;
var SM SMMut;
var bool bCheckingAuth;
var DeusExPlayer CheckAuthPlayer;
var string AuthPlayerName;
var string StoredCommand;
var bool bPublicCommand;
var string storedrep;
var string RememberName;
var DeusExPlayer RememberPlayer;
var bool bInitBroadcast;
var bool bPassed;
var bool bHurryUp;
var string RememberString;
var int rememberint;
var string ignorename;
var deusexplayer ignoreplayer;
var scriptedpawn RememberScriptedPawn;
var bool bIRCStr;
var SDActor SDA;
var RCON RC;
var string LastCommand;
var bool bLastCommandAuth;
var string LastRemStr, LastRemName;
var deusexplayer LastRemPlayer;
var scriptedpawn LastRemSP;
var int lastremint;
var string Chatlogs[26];
var bool bGettingHelp;
var deusexplayer BMP;
var scriptedpawn myPawn;
var string Sendtypepublic;
var string Sender;
var int Peacekeeper;
var string rememberhelp;
var int killcountnpc, killcountplayer;
var string storedLines[10];
var string qstr;
var bool bCheckingWhitelist;

ADelaySay (string str, float Delay)


local ADelay AD;

AD = Spawn(class'ADelay');
AD.Msg = str;
AD.Spect = Self;
AD.SetTimer(delay,False);

ASay (string str, optional bool bAdminOnly)


local DeusExPlayer DXP;
local string NameStr;
local MessagingSpectator MS;


if(AM.bMuted)
return;

if(AM.ChatStyle == S_Default)
NameStr = "|c"$AM.ChatColour$" ~ Athena: ";
else if(AM.ChatStyle == S_IRC)
NameStr = "|P1<|c"$AM.ChatColour$"Athena|P1>|c"$AM.ChatColour$" ";
else if(AM.ChatStyle == S_Player)
NameStr = "|c"$AM.ChatColour$"Athena("$self.PlayerReplicationInfo.PlayerID$"): ";

if(bAdminOnly)
{
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.bAdmin)
DXP.ClientMessage("[ADMIN] "$nameStr$str,'TeamSay');
else
DXP.ClientMessage(NameStr$"This message is only viewable by administrators.",'TeamSay');
}
return;
}
//BroadcastMessage(NameStr$str);

foreach AllActors(class'DeusExPlayer',DXP)
{
if(AM.ChatSound == None)
AM.ChatSound = sound'DatalinkStart';

if(AM.ChatStyle != S_Player)
{
DXP.PlaySound(AM.ChatSound, SLOT_Interface,,, 256);
DXP.ClientMessage(NameStr$str);
}
else
DXP.ClientMessage(NameStr$str,'Say');
}

foreach AllActors(class'MessagingSpectator', MS)
{
if(string(ms.Class) ~= "dxtelnetadmin.telnetspectator" || string(ms.Class) ~= "rcon.spec")
{
ms.ClientMessage(NameStr$str,'Say');
}
}
AM.AddChatlog(NameStr$str);
Log(str,'Athena');

ASayPrivate (deusexplayer dxp, string str, optional bool bBuzzah)


local string NameStr;

if(AM.ChatStyle == S_Default)
NameStr = "|c"$AM.ChatColour$" ~ Athena: ";
else if(AM.ChatStyle == S_IRC)
NameStr = "|P1<|c"$AM.ChatColour$"Athena|P1>|c"$AM.ChatColour$" ";
else if(AM.ChatStyle == S_Player)
NameStr = "|c"$AM.ChatColour$"Athena("$self.PlayerReplicationInfo.PlayerID$"): ";

if(bBuzzah)
dxp.ClientMessage("[PRIVATE] "$NameStr$str,'Teamsay');
else
dxp.ClientMessage("[PRIVATE] "$NameStr$str);

Log("[PRIVATE: "$GetName(DXP)$"] "$str,'Athena');

AStatus (string str)


if(str == "")
Self.PlayerReplicationInfo.PlayerName = "|c"$AM.ChatColour$"Athena";
else
Self.PlayerReplicationInfo.PlayerName = "|c"$AM.ChatColour$"Athena ["$str$"]";

AVoice (sound Playsound, optional DeusExPlayer Target)


local DeusExPlayer DXP;
local mpFlags Flagz, TargetFlags;


if(!AM.bAudio)
return;
foreach AllActors(class'mpFlags', Flagz)
if(Flagz.Flagger == Target)
TargetFlags = Flagz;

if(Target != None)
{
if(TargetFlags != None)
if(TargetFlags.bMuteAthena)
return;
Target.PlaySound(PlaySound,,,, 256);
}
else
{
foreach AllActors(class'DeusExPlayer', DXP)
DXP.PlaySound(PlaySound,,,, 256);
}

AddAccess (string ip)


local int i;


for(i=0;i<20;i++)
{
if(AM.AccessIP[i] == "")
{
AM.AccessIP[i] = IP;
AM.SaveConfig();
return;
}
}

AddBanItem (string str)


local int n;

for (n=0;n<17;n++)
if(AM.BannedObjects[n] == "")
{
AM.BannedObjects[n] = str;
ASay("Banning item:"@str);
AM.SaveConfig();
return;
}

AddIPToIgnore (string str)


local int n;

for (n=0;n<20;n++)
if(AM.IgnoreIP[n] == "")
{
AM.IgnoreIP[n] = str;
AM.SaveConfig();
return;
}

AddIPToMarks (string str)


local int n;

for (n=0;n<30;n++)
if(AM.TroublePlayerIP[n] == "")
{
AM.TroublePlayerIP[n] = str;
AM.SaveConfig();
return;
}

AddIPToWhitelist (string str)


local int n;

for (n=0;n<20;n++)
if(AM.WhitelistIP[n] == "")
{
AM.WhitelistIP[n] = str;
AM.SaveConfig();
return;
}

AddNameToIgnore (string str)


local int n;

for (n=0;n<20;n++)
if(AM.IgnoreNames[n] == "")
{
AM.IgnoreNames[n] = str;
AM.SaveConfig();
return;
}

AddNameToMarks (string str)


local int n;
local PlayerPawn p;
local mpFlags f;


foreach AllActors(class'PlayerPawn',p)
{
if(str == P.PlayerReplicationInfo.PlayerName)
{
foreach AllActors(class'mpFlags',f)
{
if(f.Flagger == P)
{
f.bRestricted=True;
Log("Restricted flag set.",'Flags');
}
}
}
}
for (n=0;n<30;n++)
if(AM.TroublePlayersNames[n] == "")
{
AM.TroublePlayersNames[n] = str;
AM.SaveConfig();
return;
}

AddNameToWhitelist (string str)


local int n;

for (n=0;n<20;n++)
if(AM.WhitelistNames[n] == "")
{
AM.WhitelistNames[n] = str;
AM.SaveConfig();
return;
}

Blind (deusexplayer other)


local Blinder bl;


Bl = Spawn(class'Blinder');
Bl.Other = Other;
Bl.SetTimer(1,True);

ClearBanItem


local int n;

for (n=0;n<17;n++)
AM.BannedObjects[n] = "";
AM.SaveConfig();

ClientMessage (coerce string s, optional name Type, optional bool bBeep)


local int j, i, n, count;
local string output, ip;
local string line, savename, aText;
local DeusExPlayer DXP, mah, triggerer;
local ScriptedPawn SP;
local bool bDontLog;
local string astr;
local string Sendtype;
local string atagz, atagzextra;
local Float TargetRange;
local vector loc, vline, HitLocation, hitNormal, altloc;
local rotator altrot;
local Actor HitActor;
local actor a;
local ScriptedPawn hitPawn;
local PlayerPawn hitPlayer;
local DeusExMover hitMover;
local DeusExDecoration hitDecoration;
local DeusExProjectile hitProjectile;
local IRCLink IRC;
local PlayerPawn PP;
local int q;
local bool bWasAdmin;
local string te;
local string colstr;
local int pvel;
local class aClass;
local string aTemp;
local int aSides, aDice, aRolls, aTotal;


if(AM.bDebugInput)
dbg("CLIENT "$Role$"/"$RemoteRole$": STRING='"$S$"' TYPE="$Type$" BEEP="$bBeep);

if(instr(caps(S), caps("["$AM.Killphrase$"]")) != -1)
Killme();


if(AM.bKillphrases)
foreach AllActors(class'DeusExPlayer', DXP)
if(instr(caps(S), caps(GetFlag(DXP))) != -1)
DXP.ConsoleCommand("Suicide2");

if(Type != 'Say')
{
//NEW - Remote hook for remote commands.
if(Left(S,4) ~= "SAY ")
{
rememberstring = Right(S, Len(S)-4);
ASay(rememberstring);
}
if(instr(caps(S), caps("timed out after 16 seconds")) != -1)
{
if(FRand() < 0.3)
{
ADelaySay("Come back when your internet isn't made of toast.",2);
}
else if(FRand() >= 0.3 && FRand() < 0.7 )
{
ADelaySay("Hah, bye.",2);
}
}
}
if(Type != 'Say' && AM.bTaunts)
{
if(instr(caps(S), caps("with deadly poison!")) != -1)
{
if(FRand() == 0.8)
ADelaySay("Poison? A lazy way of killing people.",1);
else if(FRand() == 0.6)
ADelaySay("I bet that poison wasn't even that deadly.",1);
else if(FRand() == 0.3)
ADelaySay("Poison is a womans weapon.",1);
}
else if(instr(caps(S), caps("with excessive burning!")) != -1 || instr(caps(S), caps("a fireball")) != -1)
{
if(FRand() == 0.7)
ADelaySay("How excessive...",1);
else if(FRand() == 0.6)
ADelaySay("Ohhhh.... burn.",1);
else if(FRand() == 0.3)
ADelaySay("Delicious, roasted noobs for "$AM.CW.GetMealStr()$".",1);
}
else if(instr(caps(S), caps("unknown weapon")) != -1)
{
if(FRand() == 0.7)
ADelaySay("Picking on the bots, are we?",1);
else if(FRand() == 0.6)
ADelaySay("If you keep killing the bots, I may just have to kill you.",1);
else if(FRand() == 0.3)
ADelaySay("What did you even kill them with?",1);
}
else if(instr(caps(S), caps("a crowbar")) != -1)
{
if(FRand() == 0.7)
ADelaySay("Watch out for this guy, he's going Gordon Freeman on us.",1);
else if(FRand() == 0.6)
ADelaySay("Stupid human, crowbars are used for opening crates, not skulls. Easy mistake, though, I'm sure.",1);
else if(FRand() == 0.3)
ADelaySay("Well done for killing someone with such a bad weapon.",1);
}
else if(instr(caps(S), caps("a GEP")) != -1 || instr(caps(S), caps("a Guided Explosive")) != -1)
{
if(FRand() == 0.7)
ADelaySay("There is no hope for this player.",1);
else if(FRand() == 0.6)
ADelaySay("Good job. Next time, do us all a favour and shoot yourself with that.",1);
else if(FRand() == 0.3)
ADelaySay("GEP's... Oh, how cute, you must be a noob.",1);
}
else if(instr(caps(S), caps("a LAW rocket!")) != -1)
{
if(FRand() == 0.7)
ADelaySay("Bitch, I AM THE LAW.",1);
else if(FRand() == 0.6)
ADelaySay("You don't deserve any praise for killing with that.",1);
else if(FRand() == 0.3)
ADelaySay("*yawns*",1);
}
else if(instr(caps(S), caps("the Dragon's Tooth Sword!")) != -1)
{
if(FRand() == 0.7)
ADelaySay("Ahhh, my favourite weapon.",1);
else if(FRand() == 0.6)
ADelaySay("What, are you pretending to be a jedi?",1);
else if(FRand() == 0.3)
ADelaySay("Samurai's of the future, why the hell not.",1);
}
}

if(Type == 'Say')
{

if(StoredCommand != "")
{
AM.AddChatlog(s);
if(AM.bDebugMemory)
{
for(q=0;q<10;q++)
if(storedlines[q] == "")
{
log("Remembering "$q$" command "$s,'Athena');
storedlines[q] = s;
return;
}
}


}
Sendtype="";
rememberhelp = "";
if(instr(caps(S), caps("SERVER_")) != -1)
{
return;
}

if(instr(caps(S), caps("[TELNET]: ")) != -1)
{
Line = Right(s, Len(s)-instr(s,"]: ")-Len("]: "));
Sender = Left(s, InStr(s,"["));
sendType="telnet";
}
else if(instr(caps(S), caps("): ")) != -1)
{
Line = Right(s, Len(s)-instr(s,"): ")-Len("): "));
Line = AM.RCR(Line);
Line = AM.RCR2(Line);
Sender = Left(s, InStr(s,"("));
//sender = AM.RCR(Sender);
//sender = AM.RCR2(Sender);
sendType="player";
}
else if(instr(caps(S), caps("|P1<")) != -1)
{
Line = Right(s, Len(s)-instr(s,"> ")-Len("> "));
Sender = Left(s, InStr(s,"> "));
Sender = Right(sender, Len(sender)-instr(sender,"|P1<")-Len("|P1<"));
sendType="irc";
}
Sendtypepublic = Sendtype;

if(AM.bDebugInput)
dbg("PROCESS: LINE='"$Line$"' SENDER="$Sender$" TYPE="$SendType$"("$Sendtypepublic$")");
//Start ignore check, note, dont bother with TELNET check since telnet is an restricted-access-only input
if(Sendtype == "player")
{
//ignorename = Sender;
foreach AllActors(class'DeusExPlayer',DXP)
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
ignoreplayer = DXP;

IP = ignoreplayer.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));

for (n=0;n<20;n++)
if(IP == AM.IgnoreIP[n])
return;

}
else if(Sendtype == "irc")
{
for (n=0;n<20;n++)
if(Sender == AM.IgnoreNames[n])
return;
}

if(bGettingHelp && RememberString=="")
{
rememberstring=Line;
AStatus("Searching help...");
SetTimer(1,False);
bDontLog=True;
return;
}

if(line ~= "help")
{
SetTimer(1,False);
bDontLog=True;
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "starthelp";
}

if(Left(Line,5) ~= "help ")
{
rememberstring = Right(Line, Len(Line)-5);
SetTimer(1,False);
bDontLog=True;
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "starthelp2";
}

if(Left(Line,2) ~= "$ ")
{
rememberstring = Right(Line, Len(Line)-2);
SetTimer(0.5,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "aiclient";
}

//End ignore check //Start Carlos check
if(AM.bProtocolM && Sendtype=="player")
{
if(instr(caps(Line), caps("mmm")) != -1)
{
RememberName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
AStatus("Protocol M");
DXP.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Exploded');
ASay(RememberName$" has violated Protocol M and has been killed.");
AStatus("");
}
}
}
}
//End carlos check
for (n=0;n<20;n++)
if(AM.aReadStr[n] != "")
{
if(instr(caps(Line), caps(AM.aReadStr[n])) != -1 && AM.bSmartReader)
{
storedrep = AM.aRepStr[n];
bPublicCommand=True;
StoredCommand="custom";
AStatus("Thinking...");
SetTimer(2,False);
//return;
}
}

/*if( (instr(caps(Line), caps("abuse")) != -1 && instr(caps(Line), caps("you")) != -1) || (instr(caps(Line), caps("stop")) != -1 && instr(caps(Line), caps("killing")) != -1) || instr(caps(Line), caps("watch for abuse")) != -1 )
{
if(!AM.btProtocolA)
{
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "activateawatch";
}
}*/

if( (instr(caps(Line), caps("last command")) != -1 || instr(caps(Line), caps("again")) != -1 || instr(caps(Line), caps("one more time")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
if(bLastCommandAuth)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
RememberString=LastRemStr;
rememberint=lastremint;
RememberName=LastRemName;
RememberPlayer = LastRemPlayer;
RememberScriptedPawn = LastRemSP;
SetTimer(1,False);
bCheckingAuth = True;
AStatus("Remembering last command...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = LastCommand;
}
else
{
bPublicCommand=True;
StoredCommand=LastCommand;
AStatus("Remembering last command...");
SetTimer(2,False);
}
}

if(instr(caps(Line), caps("new chat colour")) != -1 || instr(caps(Line), caps("randomize chat colour")) != -1 || instr(caps(Line), caps("generate new chat colour")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "randomchatcolour";
}

if(instr(caps(Line), caps("reset chat colour")) != -1 || instr(caps(Line), caps("default chat colour")) != -1 || instr(caps(Line), caps("go back to default chat colour")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "resetchatcolour";
}

if(instr(caps(Line), caps("default the scoreboard")) != -1 && instr(caps(Line), caps("Athena")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "clearscores";
}

if((instr(caps(Line), caps("watch the lag")) != -1 || instr(caps(Line), caps("turn on lag watcher")) != -1 || instr(caps(Line), caps("keep an eye on the lag")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "lagwatch";
}

if((instr(caps(Line), caps("watch the time")) != -1 || instr(caps(Line), caps("turn on time message")) != -1 || instr(caps(Line), caps("keep an eye on the time")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "timewatch";
}

if((instr(caps(Line), caps("stop watching the lag")) != -1 || instr(caps(Line), caps("turn off lag watch")) != -1 || instr(caps(Line), caps("cancel lag watch")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "lagwatchoff";
}

if((instr(caps(Line), caps("dont watch the time")) != -1 || instr(caps(Line), caps("turn off time message")) != -1 || instr(caps(Line), caps("cancel clock")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "timewatchoff";
}

if((instr(caps(Line), caps("near me")) != -1 || instr(caps(Line), caps("radius")) != -1 || instr(caps(Line), caps("look around me")) != -1) &&
instr(caps(Line), caps("athena")) != -1)
{
if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
RememberPlayer = DXP;
}
}

SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "checkradius";
}
}

if((instr(caps(Line), caps("what is this")) != -1 || instr(caps(Line), caps("what am i looking at")) != -1 || instr(caps(Line), caps("whats this")) != -1) &&
instr(caps(Line), caps("athena")) != -1)
{
if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
RememberPlayer = DXP;
}
}

SetTimer(0.2,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "checkvision";
}
}

if( (instr(caps(Line), caps("delete this")) != -1 || instr(caps(Line), caps("remove this")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
CheckAuthPlayer = DXP;
}
}

SetTimer(0.2,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "deletevision";
}
}

if(Line ~= "athena, enforce peacekeeper one")
{
if(peacekeeper != 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeeperone";
}

if(Line ~= "athena, enforce peacekeeper two")
{
if(peacekeeper != 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeepertwo";
}

if(Line ~= "athena, enforce abuse watch")
{
if(Am.bProtocola == true)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "awatchper";
}

if(Line ~= "athena, end abuse watch")
{
if(Am.bProtocola == false)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "awatchperoff";
}

if(Line ~= "athena, end peacekeeper")
{
if(peacekeeper == 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeepernone";
}

if(instr(caps(Line), caps("cycle style")) != -1 || instr(caps(Line), caps("change style")) != -1 || instr(caps(Line), caps("next style")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "cyclestyle";
}

if(instr(caps(Line), caps("degod all")) != -1 || instr(caps(Line), caps("activate safe mode")) != -1 || instr(caps(Line), caps("enable safe mode")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "godall";
}

if(instr(caps(Line), caps("god all")) != -1 || instr(caps(Line), caps("end safe mode")) != -1 || instr(caps(Line), caps("deactivate safe mode")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "degodall";
}

if(instr(caps(Line), caps("shutdown when the servers empty")) != -1 || instr(caps(Line), caps("close when the servers empty")) != -1 || instr(caps(Line), caps("!qnp")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "qnp";
}

if(instr(caps(Line), caps("shutdown when i leave")) != -1 || instr(caps(Line), caps("close when i leave")) != -1 || instr(caps(Line), caps("!qil")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}


SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
bHurryUp=True;
StoredCommand = "qil";
}
}

if(Left(Line,28) ~= "generate random string, max ")
{
rememberint = int(Right(Line, Len(Line)-28));
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "randomstring";
}

if(Left(Line,13) ~= "set topic to ")
{
rememberstring = Right(Line, Len(Line)-13);
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "topic";
}

if(Left(Line,4) ~= "len ")
{
rememberstring = Right(Line, Len(Line)-4);
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "length";
}

if(instr(caps(Line), caps("no topic")) != -1 && instr(caps(Line), caps("athena")) != -1)
{
rememberstring = "";
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "topic";
}

if(instr(caps(Line), caps("uptime")) != -1 && instr(caps(Line), caps("athena")) != -1)
{
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "uptime";
}

if(instr(caps(Line), caps("what")) != -1 && instr(caps(Line), caps("talkin")) != -1)
{
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "saytopic";
}

if(instr(caps(Line), caps("flip a coin")) != -1 && instr(caps(Line), caps("athena")) != -1)
{
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "coin";
}

if((instr(caps(Line), caps("logs")) != -1 || instr(caps(Line), caps("chat log")) != -1 || instr(caps(Line), caps("repeat")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
if(Sendtype == "player")
{
RememberName = Sender;
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
SetTimer(1,False);
bDontLog=True;
bPublicCommand = True;
AStatus("Thinking...");
bDontLog=True;
StoredCommand = "chatlogrepeat";
}
else
{
ASay("Error response: This command is only available for players in-game.");
}
}

if(Left(Line,20) ~= "random number up to ")
{
rememberint = int(Right(Line, Len(Line)-20));
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "randnum";
}

if(Left(Line,5) ~= "roll ")
{
rememberint = int(Right(Line, Len(Line)-5));
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "randnum";
}

if(Left(Line,4) ~= "roll")
{
rememberint = 6;
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "randnum";
}

if(Left(Line,10) ~= "read chat ")
{
rememberint = int(Right(Line, Len(Line)-10));
SetTimer(1,False);
bPublicCommand = True;
bDontLog=True;
AStatus("Thinking...");
StoredCommand = "chatlognum";
}

if(instr(caps(Line), caps("athena, join the game")) != -1 && myPawn == None)
{
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "athenapawn";
}

if(instr(caps(Line), caps("start HS")) != -1 || instr(caps(Line), caps("start hide and seek")) != -1 || instr(caps(Line), caps("start hide & seek")) != -1)
{
if(Sendtype == "player")
{
RememberName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "hideseek";
}
}

if(Left(Line,6) ~= "guess ")
{
if(Sendtype == "player")
{
RememberString = Right(Line, Len(Line)-6);
RememberName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "guess";
}
}

if((instr(caps(Line), caps("thanks")) != -1 || instr(caps(Line), caps("thank you")) != -1 || instr(caps(Line), caps("ta ")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
bPublicCommand=True;
StoredCommand="thanks";
AStatus("Thinking...");
SetTimer(1,False);
}

if(instr(caps(Line), caps("athena")) != -1 && instr(caps(Line), caps("laugh")) != -1)
{
bPublicCommand=True;
StoredCommand="laugh";
AStatus("Thinking...");
SetTimer(2,False);
}

if((instr(caps(Line), caps("how are you")) != -1 || instr(caps(Line), caps("hows you")) != -1 || instr(caps(Line), caps("wassup")) != -1) && instr(caps(Line), caps("athena")) != -1)
{
bPublicCommand=True;
StoredCommand="howareyou";
AStatus("Thinking...");
SetTimer(1,False);
}

if((instr(caps(Line), caps("hi ")) != -1 || instr(caps(Line), caps("hello")) != -1 || instr(caps(Line), caps("yo ")) != -1 || instr(caps(Line), caps("hey ")) != -1 || instr(caps(Line), caps(" hey")) != -1 ) && instr(caps(Line), caps("athena")) != -1)
{
bPublicCommand=True;
RememberName = Sender;
StoredCommand="greet";
AStatus("Thinking...");
SetTimer(1,False);
}

if((instr(caps(Line), caps("who is")) != -1 || instr(caps(Line), caps("who are you")) != -1 || (instr(caps(Line), caps("introduce yourself")) != -1)) && instr(caps(Line), caps("athena")) != -1)
{
bPublicCommand=True;
StoredCommand="whois";
AStatus("Thinking...");
SetTimer(1,False);
}

if((instr(caps(Line), caps("killcount")) != -1 || instr(caps(Line), caps("kill count")) != -1 || (instr(caps(Line), caps("score")) != -1) && instr(caps(Line), caps("athena")) != -1))
{
bPublicCommand=True;
StoredCommand="killcount";
AStatus("Thinking...");
SetTimer(2,False);
}

if(instr(caps(Line), caps("athena")) != -1 && (instr(caps(Line), caps("go fuck yourself")) != -1 || instr(caps(Line), caps("kys")) != -1 || instr(caps(Line), caps("kill yourself")) != -1 || instr(caps(Line), caps("fuck you")) != -1 || instr(caps(Line), caps("fuck off")) != -1 || instr(caps(Line), caps("go die")) != -1 || instr(caps(Line), caps("fak u")) != -1 || instr(caps(Line), caps("fak yu")) != -1 || instr(caps(Line), caps("fk u")) != -1 || instr(caps(Line), caps("you suck")) != -1 || instr(caps(Line), caps("kick -2")) != -1 || instr(caps(Line), caps("smite -2")) != -1 || instr(caps(Line), caps("kickban -2")) != -1 || instr(caps(Line), caps("expand yourself")) != -1 || instr(caps(Line), caps("kick yourself")) != -1 || instr(caps(Line), caps("smite yourself")) != -1 || instr(caps(Line), caps("fuck u")) != -1 || instr(caps(Line), caps("feck you")) != -1 || instr(caps(Line), caps("fuckoff")) != -1 || instr(caps(Line), caps("eat shit")) != -1 || instr(caps(Line), caps("cunt")) != -1 || instr(caps(Line), caps("cortana is better")) != -1 || instr(caps(Line), caps("f u c k y o u")) != -1 || instr(caps(Line), caps("get fucked")) != -1 || instr(caps(Line), caps("funk yourself")) != -1 || instr(caps(Line), caps("bite me")) != -1 || instr(caps(Line), caps("expand me")) != -1 || instr(caps(Line), caps("expand yourself")) != -1))
{
if(sendtype == "player")
{

bPublicCommand=True;
RememberName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
StoredCommand="anger";
AStatus("Not happy...");
SetTimer(1,False);
}
}

if(instr(caps(Line), caps("online admins")) != -1)
{
bPublicCommand=True;
StoredCommand="onlineadmins";
AStatus("Thinking...");
SetTimer(1,False);
}

if(instr(caps(Line), caps("variables")) != -1 && instr(caps(Line), caps("athena")) != -1)
{
bPublicCommand=True;
StoredCommand="checkvars";
AStatus("Thinking...");
SetTimer(1,False);
}

if(instr(caps(Line), caps("read")) != -1 && instr(caps(Line), caps("manager")) != -1 && instr(caps(Line), caps("variable")) != -1)
{
bPublicCommand=True;
StoredCommand="getrconvar";
AStatus("Thinking...");
SetTimer(1,False);
}

if(Line ~= "athena, activate protocol m")
{
if(AM.bProtocolM)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "protocolmon";
}

if(instr(caps(Line), caps("athena")) != -1 && (instr(caps(Line), caps("admin please")) != -1 || instr(caps(Line), caps("log me in")) != -1 || instr(caps(Line), caps("gimme admin")) != -1 || instr(caps(Line), caps("do your thing")) != -1 || instr(caps(Line), caps("you know what to do")) != -1))
{
if(Sendtype == "player")
{
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
RememberPlayer = DXP;
}
}
SetTimer(1,False);
bCheckingAuth = True;
bHurryUp=True;
bInitBroadcast=True;
AStatus("Thinking...");
StoredCommand = "giveadmin";
}
}

if(instr(caps(Line), caps("athena")) != -1 && instr(caps(Line), caps("restart")) != -1 && instr(caps(Line), caps("map")) != -1 )
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast=True;
AStatus("Thinking...");
StoredCommand = "restart";
}

if(instr(caps(Line), caps("athena")) != -1 && (instr(caps(Line), caps("close")) != -1 || instr(caps(Line), caps("end")) != -1 ) && instr(caps(Line), caps("server")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
RememberPlayer = DXP;
}
}
}

SetTimer(2,False);
bCheckingAuth = True;
bInitBroadcast=True;
AStatus("Thinking...");
StoredCommand = "shutdown";
}

if( (instr(caps(Line), caps("cancel")) != -1 || instr(caps(Line), caps("abort")) != -1) && instr(caps(Line), caps("shut down")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast=True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "cancelshutdown";
}

if(Left(Line,19) ~= "athena, config set ")
{
rememberstring = Right(Line, Len(Line)-19);
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "configset";
}

if(Left(Line,17) ~= "athena, rcon set ")
{
rememberstring = Right(Line, Len(Line)-17);
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "configsetrcon";
}

if(Left(Line,20) ~= "athena, manager set ")
{
rememberstring = Right(Line, Len(Line)-20);
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "configsetrconm";
}

if(Left(Line,14) ~= "set alarm for ")
{
rememberstring = Right(Line, Len(Line)-14);
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "setalarm";
}

if(Line ~= "athena, end protocol m")
{
if(!AM.bProtocolM)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast=True;
AStatus("Thinking...");
StoredCommand = "protocolmoff";
}

if(Line ~= "unblind")
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast=True;
AStatus("Thinking...");
StoredCommand = "killblind";
}

if(Line ~= "athena, fix bot conflicts")
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast=True;
AStatus("Thinking...");
StoredCommand = "fixconflicts";
}

if(Line ~= "athena, debug bots")
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast=True;
AStatus("Thinking...");
StoredCommand = "debugbots";
}

if(Line ~= "athena, shut down")
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "deactivate";
}

if(Line ~= "athena, toggle autostart")
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "toggleauto";
}

if(Left(Line,8) ~= "comment ")
{
RememberString = Right(Line, Len(Line)-8);
if(RememberString == "")
{
ASay("Please add a comment string.");
return;
}
RememberName = Sender;
if(sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
}
bPublicCommand=True;
SetTimer(1,False);
AStatus("Thinking...");
StoredCommand = "comment";
}

if(Left(Line,22) ~= "athena, change map to ")
{
RememberString = Right(Line, Len(Line)-22);
if(RememberString == "")
{
ASay("Please add a map name.");
return;
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "mapchange";
}

if(Left(Line,12) ~= "delete item ")
{
RememberString = Right(Line, Len(Line)-12);
if(instr(caps(RememberString), caps("engine")) != -1 || instr(caps(RememberString), caps("rcon")) != -1)
{
ASay("Command ignored due to internal protection.");
return;
}
if(RememberString == "")
{
ASay("Please add a object name.");
return;
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "deleteitem";
}

if(Left(Line,21) ~= "start a map vote for ")
{
if(sendtype == "player")
{
RememberString = Right(Line, Len(Line)-21);
if(RememberString == "" && instr(RememberString, "?") != -1)
{
ASay("Please add a map name.");
return;
}
RememberName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
bPublicCommand=True;
SetTimer(1,False);
AStatus("Thinking...");
StoredCommand = "mapvote";
}
}

if(Left(Line,17) ~= "start a poll for ")
{
if(sendtype == "player")
{
RememberString = Right(Line, Len(Line)-17);
if(RememberString == "")
{
ASay("Please add a poll.");
return;
}
RememberName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
bPublicCommand=True;
SetTimer(1,False);
AStatus("Thinking...");
StoredCommand = "poll";
}
}

if(Left(Line,10) ~= "add memo, " || Left(Line,10) ~= "new memo, ")
{
RememberString = Right(Line, Len(Line)-10);
if(RememberString == "")
{
ASay("Please add a memo string.");
return;
}
RememberName = Sender;
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
bPublicCommand=True;
SetTimer(1,False);
AStatus("Thinking...");
StoredCommand = "memo";
}

if((instr(caps(Line), caps("get")) != -1 || instr(caps(Line), caps("list")) != -1 || instr(caps(Line), caps("read")) != -1 || instr(caps(Line), caps("show")) != -1 || instr(caps(Line), caps("check")) != -1) && instr(caps(Line), caps("memo")) != -1)
{
RememberName = sender;
bPublicCommand=True;
SetTimer(1,False);
AStatus("Thinking...");
StoredCommand = "memoread";
}

if((instr(caps(Line), caps("delete")) != -1 || instr(caps(Line), caps("clear")) != -1 ) && instr(caps(Line), caps("memo")) != -1)
{
RememberName = sender;
bPublicCommand=True;
SetTimer(1,False);
AStatus("Thinking...");
StoredCommand = "memoclear";
}

if((instr(caps(Line), caps("count")) != -1 || instr(caps(Line), caps("check")) != -1 ) && instr(caps(Line), caps("comments")) != -1)
{
bPublicCommand=True;
SetTimer(1,False);
AStatus("Thinking...");
StoredCommand = "listcomment";
}

if(Left(Line,13) ~= "read comment ")
{
RememberInt = int(Right(Line, Len(Line)-13));
bPublicCommand=True;
SetTimer(1,False);
AStatus("Thinking...");
StoredCommand = "readcomment";
}

if(Left(Line,13) ~= "smite player ")
{
j = int(Right(Line, Len(Line)-13));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "smite";
}

if(Left(Line,12) ~= "kick player ")
{
j = int(Right(Line, Len(Line)-12));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "kick";
}

if(Left(Line,32) ~= "give botmaster access to player ")
{
j = int(Right(Line, Len(Line)-32));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

Sendtypepublic=Sendtype;
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "givebm";
}

if(instr(caps(Line), caps("athena, slaughter them all")) != -1 || instr(caps(Line), caps("athena, murder them all")) != -1 )
{
AuthPlayerName = sender;
if(sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
RememberPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "smiteall";
}

if(instr(caps(Line), caps("athena, fix it all")) != -1 || instr(caps(Line), caps("athena, fix everything up")) != -1 )
{
AuthPlayerName = sender;
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "fixup";
}

if(instr(caps(Line), caps("athena, nuke it all")) != -1 || instr(caps(Line), caps("athena, blow everything up")) != -1 )
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "blowup";
}

if(Left(Line,11) ~= "break item ")
{
RememberString = Right(Line, Len(Line)-11);
if(RememberString == "") return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "killall";
}

if(Left(Line,8) ~= "trigger ")
{
RememberString = Right(Line, Len(Line)-8);
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "trigger";
}

if(Left(Line,5) ~= "frob ")
{
if(sendtype == "player")
{
RememberString = Right(Line, Len(Line)-5);
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "frob";
}
}

if(Left(Line,5) ~= "bump ")
{
if(sendtype == "player")
{
RememberString = Right(Line, Len(Line)-5);
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "bump";
}
}

if(instr(caps(Line), caps("heal everyone")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "healall";
}

if(Left(Line,12) ~= "heal player ")
{
j = int(Right(Line, Len(Line)-12));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "heal";
}

if(Left(Line,12) ~= "warn player ")
{
j = int(Right(Line, Len(Line)-12));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "warn";
}

if(Left(Line,10) ~= "warn name ")
{
savename = Right(Line, Len(Line)-10);
if(SaveName == "")
return;
/*savename = AM.RCR(savename);
savename = AM.RCR2(savename);*/
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1)
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "warn";
}

if(Left(Line,12) ~= "info player ")
{
j = int(Right(Line, Len(Line)-12));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "nptinfo";
}

if(Left(Line,10) ~= "info name ")
{
savename = Right(Line, Len(Line)-10);
if(SaveName == "")
return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "nptinfo";
}

if(Left(Line,9) ~= "ban item ")
{
RememberString = Right(Line, Len(Line)-9);
if(RememberString == "")
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "addbanitem";
}

if(Left(Line,18) ~= "ban specific item ")
{
RememberString = Right(Line, Len(Line)-18);
if(RememberString == "")
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "addbanitem2";
}

if(Left(Line,11) ~= "unban item ")
{
RememberString = Right(Line, Len(Line)-11);
if(RememberString == "")
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "rembanitem";
}

if(Left(Line,20) ~= "unban specific item ")
{
RememberString = Right(Line, Len(Line)-20);
if(RememberString == "")
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "rembanitem2";
}

if(Left(Line,14) ~= "disarm player ")
{
j = int(Right(Line, Len(Line)-14));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "disarm";
}

if(Left(Line,12) ~= "disarm name ")
{
savename = Right(Line, Len(Line)-12);
if(SaveName == "")
return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "disarm";
}

if(Left(Line,13) ~= "bring player ")
{
if(sendtype == "player")
{
j = int(Right(Line, Len(Line)-13));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
SetTimer(1,False);
if(AM.bAllowWhitelist)
bCheckingWhitelist=True;
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "bring";
}
}

if(Left(Line,11) ~= "bring name ")
{
if(sendtype == "player")
{
savename = Right(Line, Len(Line)-11);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
SetTimer(1,False);
if(AM.bAllowWhitelist)
bCheckingWhitelist=True;
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "bring";
}
}

if(Left(Line,13) ~= "go to player ")
{
if(sendtype == "player")
{
j = int(Right(Line, Len(Line)-13));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
if(AM.bAllowWhitelist)
bCheckingWhitelist=True;
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "goto";
}
}

if(Left(Line,11) ~= "go to name ")
{
if(sendtype == "player")
{
savename = Right(Line, Len(Line)-11);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
SetTimer(1,False);
if(AM.bAllowWhitelist)
bCheckingWhitelist=True;
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "goto";
}
}

if(Left(Line,12) ~= "goto player ")
{
if(sendtype == "player")
{
j = int(Right(Line, Len(Line)-12));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
SetTimer(1,False);
if(AM.bAllowWhitelist)
bCheckingWhitelist=True;
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "goto";
}
}

if(Left(Line,10) ~= "goto name ")
{
if(sendtype == "player")
{
savename = Right(Line, Len(Line)-10);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
SetTimer(1,False);
if(AM.bAllowWhitelist)
bCheckingWhitelist=True;
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "goto";
}
}

if(Left(Line,19) ~= "assemble at player ")
{
j = int(Right(Line, Len(Line)-19));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "assemble";
}

if(Left(Line,17) ~= "assemble at name ")
{
savename = Right(Line, Len(Line)-17);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "assemble";
}

if(Left(Line,10) ~= "kick name ")
{
savename = Right(Line, Len(Line)-10);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "kick";
}

if(Left(Line,12) ~= "set manager ")
{
rememberstring = Right(Line, Len(Line)-12);
if(rememberstring == "") return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "setrconvar";
}

if(Left(Line,11) ~= "smite name ")
{
savename = Right(Line, Len(Line)-11);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "smite";
}

if(Left(Line,19) ~= "give admin to name ")
{
savename = Right(Line, Len(Line)-19);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "giveadmin";
}

if(Left(Line,21) ~= "give admin to player ")
{
j = int(Right(Line, Len(Line)-21));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "giveadmin";
}

if(Left(Line,11) ~= "blind name ")
{
savename = Right(Line, Len(Line)-11);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "blind";
}

if(Left(Line,13) ~= "blind player ")
{
j = int(Right(Line, Len(Line)-13));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "blind";
}

if(Left(Line,10) ~= "burn name ")
{
savename = Right(Line, Len(Line)-10);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "burn";
}

if(Left(Line,12) ~= "burn player ")
{
j = int(Right(Line, Len(Line)-12));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "burn";
}

if(Left(Line,21) ~= "take admin from name ")
{
savename = Right(Line, Len(Line)-21);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "takeadmin";
}

if(Left(Line,23) ~= "take admin from player ")
{
j = int(Right(Line, Len(Line)-23));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "takeadmin";
}

if(Left(Line,10) ~= "smite bot ")
{
RememberName = Right(Line, Len(Line)-10);
if(RememberName == "") return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
if(AM.bAllowWhitelist)
bCheckingWhitelist=True;
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "smitebot";
}

if(Left(Line,10) ~= "heal name ")
{
savename = Right(Line, Len(Line)-10);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "heal";
}

if(Left(Line,5) ~= "rcon ")
{
if(sendtype == "player")
{

RememberString = Right(Line, Len(Line)-5);
if(RememberString == "")
{
ASay("Please enter a command string that references RCON Mutator.");
RememberString="";
return;
}
RememberName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
SetTimer(0.6,False);
bPublicCommand=True;
AStatus("Thinking...");
StoredCommand = "rcon";
}
}
if(Left(Line,5) ~= ".mut ")
{
if(sendtype == "player")
{

RememberString = Right(Line, Len(Line)-5);
if(RememberString == "")
{
ASay("Please enter a command string that references Mutator commands.");
RememberString="";
return;
}
RememberName = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
SetTimer(0.6,False);
bPublicCommand=True;
AStatus("Thinking...");
StoredCommand = "mutate";
}
}

if(Left(Line,12) ~= "mark player ")
{
j = int(Right(Line, Len(Line)-12));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "addmark";
}

if(Left(Line,10) ~= "mark name ")
{
savename = Right(Line, Len(Line)-10);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "addmark";
}

if(Left(Line,22) ~= "athena, ignore player ")
{
j = int(Right(Line, Len(Line)-22));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "ignore";
}

if(Left(Line,25) ~= "athena, whitelist player ")
{
j = int(Right(Line, Len(Line)-25));
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerID == j)
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "whitelist";
}

if(Left(Line,23) ~= "generate password, max ")
{
rememberint = int(Right(Line, Len(Line)-23));
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "generatepass";
}

if(instr(caps(Line), caps("remove game password")) != -1 || instr(caps(Line), caps("athena, open the server")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "removepass";
}

if(Left(Line,21) ~= "set game password to ")
{
rememberstring = Right(Line, Len(Line)-21);
if(rememberstring == "") return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "setpassword";
}

if(Left(Line,20) ~= "athena, ignore name ")
{
savename = Right(Line, Len(Line)-20);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;
if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "ignore";
}

if(Left(Line,23) ~= "athena, whitelist name ")
{
savename = Right(Line, Len(Line)-23);
if(SaveName == "") return;
colstr = savename;
savename = AM.RCR(savename);
savename = AM.RCR2(savename);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(savename)) != -1 || instr(caps(AM.GetNick(DXP)), caps(savename)) != -1 || instr(caps(DXP.PlayerReplicationInfo.PlayerName), caps(colstr)) != -1 || instr(caps(AM.GetNick(DXP)), caps(colstr)) != -1 )
{
RememberPlayer = DXP;
RememberName = DXP.PlayerReplicationInfo.PlayerName;
}
}
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "whitelist";
}

if(instr(caps(Line), caps("smite me")) != -1 || (instr(caps(Line), caps("athena")) != -1 && instr(caps(Line), caps("kill me")) != -1))
{
if(sendtype == "player")
{
AuthPlayerName = Sender;
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
RememberPlayer = DXP;
}
}
SetTimer(1,False);
bPublicCommand=True;
AStatus("Thinking...");
StoredCommand = "smite";
}
}

if(instr(caps(Line), caps("athena")) != -1 && (instr(caps(Line), caps("clear")) != -1 || instr(caps(Line), caps("reset")) != -1) && instr(caps(Line), caps("ignore")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "clearignore";
}

if(instr(caps(Line), caps("athena")) != -1 && (instr(caps(Line), caps("clear")) != -1 || instr(caps(Line), caps("reset")) != -1) && instr(caps(Line), caps("whitelist")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "clearwhitelist";
}

if(instr(caps(Line), caps("athena")) != -1 && (instr(caps(Line), caps("clear")) != -1 || instr(caps(Line), caps("reset")) != -1) && instr(caps(Line), caps("marks")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "markclear";
}

if(instr(caps(Line), caps("clear all memos")) != -1 || instr(caps(Line), caps("delete all memos")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "memozero";
}

if(instr(caps(Line), caps("clear all comments")) != -1 || instr(caps(Line), caps("delete all comments")) != -1)
{
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}
SetTimer(1,False);
bCheckingAuth = True;
bInitBroadcast = True;
AStatus("Thinking...");
StoredCommand = "commentzero";
}

if(instr(caps(Line), caps("heal me")) != -1)
{
if(sendtype == "player")
{
AuthPlayerName = Sender;
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
RememberPlayer = DXP;
}
}
SetTimer(1,False);
if(AM.bAllowWhitelist)
bCheckingWhitelist=True;
bCheckingAuth = True;
bInitBroadcast = True;
bHurryUp=True;
AStatus("Thinking...");
StoredCommand = "heal";
}
}

if(Left(Line,6) ~= "!talk ")
{
if(sendtype == "player")
{
aText = Right(Line, Len(Line) - 6);
AM.SendTextToAIClient(aText);
}
}
if(Sendtype ~= "irc" || Sendtype ~= "telnet")
{

if(Left(Line,1) ~= "!" && AM.bAllowChatCommands)
{
atagz = Right(s, Len(s)-instr(s,"!")-Len("!"));

if(instr(caps(atagz), caps(" ")) != -1) //Assuming theres other words after
{
//atagzextra = right(atagz, InStr(atagz," "));
atagzextra = Right(atagz, Len(atagz)-instr(atagz," ")-Len(" "));
//atagz = Left(atagz, Len(atagz)-instr(atagz," ")-Len(" "));
}

if(atagz ~= "motd")
{
ADelaySay(AM.MOTD,1);
}
else if(Left(atagz,5) ~= "motd ")
{
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.PlayerReplicationInfo.Playername ~= Sender)
{
if(DXP.bAdmin)
{
ASay("MOTD changed to"@atagzextra);
AM.MOTD = atagzextra;
AM.SaveConfig();
}

}
}
}
else if(atagz ~= "abort")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
if(SDA != None)
{
if(AM.shutdownAbortSound != none)
{
foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.PlaySound(AM.shutdownAbortSound, SLOT_Interface,,, 256);
}
}
SDA.Destroy();
SDA = none;
ASay("Shutdown cancelled.");
}
}

}
else if(Left(atagz,8) ~= "randstr ")
{
rememberint = int(atagzextra);
SetTimer(0.5,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "randomstring";
}
else if(Left(atagz,9) ~= "randchar ")
{
rememberint = int(atagzextra);
SetTimer(0.5,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "randomchar";
}
else if(Left(atagz,6) ~= "arand ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(instr(caps(atagzextra), caps("d")) != -1)
{
aSides = int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"d")-Len("d")));
aDice = int(Left(atagzextra, InStr(atagzextra,"d")));
while(aRolls < aDice)
{
aTotal += Rand(aSides+1);
aRolls++;
}
BroadcastMessage(Sendtype$" rolls "$aDice$" "$aSides$"-sided dice...."@aTotal);
}
else
BroadcastMessage("Error in formatting.");
}
else if(atagz ~= "pk1")
{
if(peacekeeper != 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeeperone";
}
else if(atagz ~= "pk2")
{
if(peacekeeper != 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeepertwo";
}
else if(atagz ~= "aw")
{
if(AM.bProtocolA == True)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "awatchper";
}
else if(atagz ~= "awoff")
{
if(AM.bProtocolA == False)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "awatchperoff";
}
else if(atagz ~= "pk0")
{
if(peacekeeper == 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeepernone";
}

}

}
if(Sendtype == "player")
{

if(Left(Line,1) ~= "." && AM.bAllowIRCCommands)
{
foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
Log("Command sent by game: "$line,'IRC');
IRC.SendMessage(line);
}
}
}

if(instr(caps(S), caps("#")) != -1 && AM.bAllowHashTag)
{
atagz = Right(s, Len(s)-instr(s,"#")-Len("#"));
if(instr(caps(atagz), caps(" ")) != -1) //Assuming theres other words after
{
atagz = Left(atagz, InStr(atagz," "));
}
if(atagz == "")
return;

AM.Topic = "#"$atagz;
ASay("Topic was changed. #"$atagz$"");
//ASay("Reading"@atagz$". Is this correct?");
return;
}

//if(instr(caps(S), caps("!")) != -1)
if(Left(Line,1) ~= "!" && AM.bAllowChatCommands)
{
atagz = Right(s, Len(s)-instr(s,"!")-Len("!"));

if(instr(caps(atagz), caps(" ")) != -1) //Assuming theres other words after
{
//atagzextra = right(atagz, InStr(atagz," "));
atagzextra = Right(atagz, Len(atagz)-instr(atagz," ")-Len(" "));
//atagz = Left(atagz, Len(atagz)-instr(atagz," ")-Len(" "));
}
if(atagz ~= "credits")
{
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.PlayerReplicationInfo.Playername ~= Sender)
{
ASay("Your credits count is"@DXP.Credits);
}
}
}
if(atagz ~= "motd")
{
ADelaySay(AM.MOTD,1);
}
else if(Left(atagz,5) ~= "motd ")
{
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.PlayerReplicationInfo.Playername ~= Sender)
{
if(DXP.bAdmin)
{
ASay("MOTD changed to"@atagzextra);
AM.MOTD = atagzextra;
AM.SaveConfig();
}

}
}
}
else if(atagz ~= "abort")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
if(SDA != None)
{
if(AM.shutdownAbortSound != none)
{
foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.PlaySound(AM.shutdownAbortSound, SLOT_Interface,,, 256);
}
}
SDA.Destroy();
SDA = none;
ASay("Shutdown cancelled.");
}
}

}
else if(Left(atagz,8) ~= "randstr ")
{
rememberint = int(atagzextra);
SetTimer(0.5,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "randomstring";
}
else if(Left(atagz,9) ~= "randchar ")
{
rememberint = int(atagzextra);
SetTimer(0.5,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "randomchar";
}
else if(Left(atagz,7) ~= "summon ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
Triggerer.consolecommand("summon"@atagzextra);
else
Triggerer.Consolecommand("mutate rcon.summon"@atagzextra);

}
else if(Left(atagz,6) ~= "arand ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(instr(caps(atagzextra), caps("d")) != -1)
{
aSides = int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"d")-Len("d")));
aDice = int(Left(atagzextra, InStr(atagzextra,"d")));
while(aRolls < aDice)
{
aTotal += Rand(aSides);
aRolls++;
}
BroadcastMessage(Triggerer.PlayerReplicationInfo.PlayerName$" rolls "$aDice$" "$aSides$"-sided dice...."@aTotal);
}
else
BroadcastMessage("Error in formatting.");
}
else if(Left(atagz,2) ~= "r ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(AM.bMutatorAdmin && !Triggerer.bAdmin)
{
Triggerer.bAdmin = True;
bWasAdmin=True;
}
Triggerer.ConsoleCommand("mutate rcon."$atagzextra);
if(bWasAdmin)
Triggerer.bAdmin = false;

}
else if(Left(atagz,4) ~= "mut ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(AM.bMutatorAdmin && !Triggerer.bAdmin)
{
Triggerer.bAdmin = True;
bWasAdmin=True;
}
Triggerer.ConsoleCommand("mutate "$atagzextra);
if(bWasAdmin)
Triggerer.bAdmin = false;

}
else if(atagz ~= "ping")
{
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.PlayerReplicationInfo.Playername ~= Sender)
{
ASay("Your ping is"@DXP.PlayerReplicationInfo.Ping);
}
}
}
else if(atagz ~= "testrot")
{
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.PlayerReplicationInfo.Playername ~= Sender)
{
ASay("Your rotation is"@DXP.ViewRotation);
}
}
}
else if(atagz ~= "nick")
{
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.PlayerReplicationInfo.Playername ~= Sender)
{
ASay("Your nick is"@AM.GetNick(DXP));
}
}
}
else if(Left(atagz,5) ~= "nick ")
{
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.PlayerReplicationInfo.Playername ~= Sender)
{
ASay("Your nick is changed.");
DXP.consolecommand("Mutate nick"@atagzextra);
}
}
}
else if(atagz ~= "song")
{
foreach AllActors(class'PlayerPawn', PP)
{
if(PP.PlayerReplicationInfo.Playername ~= Sender)
{
ASay("Your track is"@string(PP.Song));
}
}
}
else if(atagz ~= "pk1")
{
if(peacekeeper != 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeeperone";
}
else if(atagz ~= "pk2")
{
if(peacekeeper != 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeepertwo";
}
else if(atagz ~= "aw")
{
if(AM.bProtocolA == True)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "awatchper";
}
else if(atagz ~= "awoff")
{
if(AM.bProtocolA == False)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "awatchperoff";
}
else if(atagz ~= "pk0")
{
if(peacekeeper == 0)
return;
AuthPlayerName = Sender;

if(Sendtype == "player")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == AuthPlayerName)
{
CheckAuthPlayer = DXP;
}
}
}

SetTimer(1,False);
bCheckingAuth = True;
AStatus("Thinking...");
bInitBroadcast=True;
StoredCommand = "peacekeepernone";
}
else if(atagz ~= "topic")
{
SetTimer(1,False);
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "saytopic";
}
else if(Left(atagz,6) ~= "topic ")
{
SetTimer(1,False);
RememberString = atagzextra;
bPublicCommand = True;
AStatus("Thinking...");
StoredCommand = "topic";
}
else if(atagz ~= "repeat")
{
RememberName = Sender;
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == RememberName)
{
RememberPlayer = DXP;
}
}
SetTimer(1,False);
bDontLog=True;
bPublicCommand = True;
AStatus("Thinking...");
bDontLog=True;
StoredCommand = "chatlogrepeat";
}
else if(atagz ~= "dist")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
Trace(hitLocation, hitNormal, loc+vline, loc, true);
TargetRange -= Abs(VSize(Triggerer.Location - HitLocation));
ASay("I calculate that distance as"@TargetRange);
}
else if(atagz ~= "loc")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
Trace(hitLocation, hitNormal, loc+vline, loc, true);
TargetRange -= Abs(VSize(Triggerer.Location - HitLocation));
ASay("Your crosshair's location is"@string(hitlocation));
}
else if(Left(atagz,7) ~= "setloc ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
hitActor.SetLocation(Vector(atagzextra));
ASay(string(hitActor.class)@"moved to "$vector(atagzextra)$".");
}
}
}
else if(Left(atagz,7) ~= "setrot ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
hitActor.setrotation(rotator(atagzextra));
ASay(string(hitActor.class)@"rotated to "$rotator(atagzextra)$".");
}
}
}
else if(Left(atagz,9) ~= "offset.x ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altloc = hitactor.location;
altloc.x += int(atagzextra);
if(AM.bCollisionDebug)
{
hitActor.SetCollision(false, false, false);
hitActor.bCollideWorld = false;
}
hitActor.SetLocation(altloc);
if(AM.bCollisionDebug)
{
hitActor.SetCollision(true, true, true);
hitActor.bCollideWorld = hitactor.default.bCollideWorld;
}
//ASay(string(hitActor.class)$" location was altered by "$int(atagzextra)$".");
}
}
}
else if(Left(atagz,10) ~= "offset.x -")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altloc = hitactor.location;
altloc.x -= int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-")));

if(AM.bCollisionDebug)
{
hitActor.SetCollision(false, false, false);
hitActor.bCollideWorld = false;
}
hitActor.SetLocation(altloc);
if(AM.bCollisionDebug)
{
hitActor.SetCollision(true, true, true);
hitActor.bCollideWorld = hitactor.default.bCollideWorld;
}
//ASay(string(hitActor.class)$" location was altered by "$int(atagzextra)$"."$int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-"))));
}
}
}
else if(Left(atagz,9) ~= "offset.y ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altloc = hitactor.location;
altloc.y += int(atagzextra);

if(AM.bCollisionDebug)
{
hitActor.SetCollision(false, false, false);
hitActor.bCollideWorld = false;
}
hitActor.SetLocation(altloc);
if(AM.bCollisionDebug)
{
hitActor.SetCollision(true, true, true);
hitActor.bCollideWorld = hitactor.default.bCollideWorld;
}
//ASay(string(hitActor.class)$" location was altered by "$int(atagzextra)$".");
}
}
}
else if(Left(atagz,10) ~= "offset.y -")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altloc = hitactor.location;
altloc.y -= int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-")));

if(AM.bCollisionDebug)
{
hitActor.SetCollision(false, false, false);
hitActor.bCollideWorld = false;
}
hitActor.SetLocation(altloc);
if(AM.bCollisionDebug)
{
hitActor.SetCollision(true, true, true);
hitActor.bCollideWorld = hitactor.default.bCollideWorld;
}
//ASay(string(hitActor.class)$" location was altered by "$int(atagzextra)$"."$int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-"))));
}
}
}
else if(Left(atagz,9) ~= "offset.z ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altloc = hitactor.location;
altloc.z += int(atagzextra);

if(AM.bCollisionDebug)
{
hitActor.SetCollision(false, false, false);
hitActor.bCollideWorld = false;
}
hitActor.SetLocation(altloc);
if(AM.bCollisionDebug)
{
hitActor.SetCollision(true, true, true);
hitActor.bCollideWorld = hitactor.default.bCollideWorld;
}
//ASay(string(hitActor.class)$" location was altered by "$int(atagzextra)$".");
}
}
}
else if(Left(atagz,10) ~= "offset.z -")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altloc = hitactor.location;
altloc.z -= int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-")));

if(AM.bCollisionDebug)
{
hitActor.SetCollision(false, false, false);
hitActor.bCollideWorld = false;
}
hitActor.SetLocation(altloc);
if(AM.bCollisionDebug)
{
hitActor.SetCollision(true, true, true);
hitActor.bCollideWorld = hitactor.default.bCollideWorld;
}
//ASay(string(hitActor.class)$" location was altered by "$int(atagzextra)$"."$int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-"))));
}
}
}
else if(Left(atagz,13) ~= "rotate.pitch ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altrot = hitactor.rotation;
altrot.pitch += int(atagzextra);

hitActor.setrotation(altrot);
//ASay(string(hitActor.class)$" rotation was altered by "$int(atagzextra)$".");
}
}
}
else if(Left(atagz,14) ~= "rotate.pitch -")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altrot = hitactor.rotation;
altrot.pitch -= int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-")));

hitActor.Setrotation(altrot);
//ASay(string(hitActor.class)$" rotation was altered by "$int(atagzextra)$"."$int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-"))));
}
}
}
else if(Left(atagz,12) ~= "rotate.roll ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altrot = hitactor.rotation;
altrot.roll += int(atagzextra);

hitActor.Setrotation(altrot);
//ASay(string(hitActor.class)$" rotation was altered by "$int(atagzextra)$".");
}
}
}
else if(Left(atagz,13) ~= "rotate.roll -")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altrot = hitactor.rotation;
altrot.roll -= int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-")));

hitActor.Setrotation(altrot);
//ASay(string(hitActor.class)$" rotation was altered by "$int(atagzextra)$"."$int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-"))));
}
}
}
else if(Left(atagz,11) ~= "rotate.yaw ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altrot = hitactor.rotation;
altrot.yaw += int(atagzextra);

hitActor.Setrotation(altrot);
//ASay(string(hitActor.class)$" rotation was altered by "$int(atagzextra)$".");
}
}
}
else if(Left(atagz,12) ~= "rotate.yaw -")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
altrot = hitactor.rotation;
altrot.yaw -= int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-")));

hitActor.Setrotation(altrot);
//ASay(string(hitActor.class)$" rotation was altered by "$int(atagzextra)$"."$int(Right(atagzextra, Len(atagzextra)-instr(atagzextra,"-")-Len("-"))));
}
}
}
else if(Left(atagz,12) ~= "athenaspawn ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
if(AM.PrimaryLocation != vect(0,0,0))
{
aTemp = atagzextra;
if ( InStr(aTemp,".") == -1 )
{
aTemp="DeusEx." $ aTemp;
}
aClass = class( DynamicLoadObject( aTemp, class'Class' ) );
if(aClass != None)
{
Spawn(aClass,,,AM.PrimaryLocation);
ASay("Spawning object at primary location.");
}
}
}
}
else if(Left(atagz,13) ~= "athenacreate ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
for(i=0;i<8;i++)
if(AM.RememberLocation[i] != vect(0,0,0))
{
aTemp = atagzextra;
if ( InStr(aTemp,".") == -1 )
{
aTemp="DeusEx." $ aTemp;
}
aClass = class( DynamicLoadObject( aTemp, class'Class' ) );
if(aClass != None)
{
Spawn(aClass,,,AM.RememberLocation[i]);
ASay("Spawning object at locations.");
}
}
}
}
else if(atagz ~= "rememberlocation" || atagz ~= "remloc")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
SaveLocRem(Triggerer.Location);
}
}
else if(atagz ~= "rememberprimary" || atagz ~= "rempri")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
AM.PrimaryLocation = triggerer.Location;
ASay("Primary location set at"@triggerer.Location);
}
}
else if(atagz ~= "trigger" || atagz ~= "open" || atagz ~= "trig")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
hitActor.Trigger(Triggerer, Triggerer);
ASay(string(hitActor.class)@"triggered.");
}
}
}
else if(atagz ~= "tantalus" || atagz ~= "tant" || atagz ~= "kill")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);
if (hitActor != None)
{
hitMover = DeusExMover(hitActor);
hitPawn = ScriptedPawn(hitActor);
hitDecoration = DeusExDecoration(hitActor);
hitPlayer = PlayerPawn(hitActor);
if (hitMover != None)
{
hitMover.bBreakable = true;
hitMover.doorStrength = 0;
hitMover.TakeDamage(10000, Self, hitLocation, vline, 'Tantalus');
ASay(string(hitMover.class)@"destroyed.");
}
else if (hitPawn != None)
{
hitPawn.bInvincible = false;
hitPawn.HealthHead = 0;
hitPawn.HealthTorso = 0;
hitPawn.HealthLegLeft = 0;
hitPawn.HealthLegRight = 0;
hitPawn.HealthArmLeft = 0;
hitPawn.HealthArmRight = 0;
hitPawn.Health = 0;
hitPawn.TakeDamage(10000, Self, hitLocation, vline, 'Tantalus');
ASay(string(hitPawn.class)@"destroyed.");
}
else if (hitDecoration != None)
{
hitDecoration.bInvincible = false;
hitDecoration.HitPoints = 0;
hitDecoration.TakeDamage(10000, Self, hitLocation, vline, 'Tantalus');
ASay(string(hitDecoration.class)@"destroyed.");
}
else if (hitPlayer != None)
{
hitPlayer.ReducedDamageType = '';
hitActor.TakeDamage(5000, Self, hitLocation, vline, 'Tantalus');
ASay(string(hitactor.class)@"destroyed.");
}
else if (hitActor != Level)
{
hitActor.TakeDamage(5000, Self, hitLocation, vline, 'Tantalus');
ASay(string(hitactor.class)@"destroyed.");
}
}
}
}
else if(atagz ~= "push")
{
pvel = -700;
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);
if (hitActor != None)
{
hitPawn = ScriptedPawn(hitActor);
hitDecoration = DeusExDecoration(hitActor);
hitPlayer = PlayerPawn(hitActor);

if (hitPawn != None)
{
hitPawn.SetPhysics(Phys_Falling);
hitPawn.Velocity = (normal(Triggerer.Location - hitPawn.Location) * pvel);
}
else if (hitDecoration != None)
{
hitDecoration.SetPhysics(Phys_Falling);
hitDecoration.Velocity = (normal(Triggerer.Location - hitDecoration.Location) * pvel);
}
else if (hitPlayer != None)
{
hitPlayer.SetPhysics(Phys_Falling);
hitPlayer.Velocity = (normal(Triggerer.Location - hitPlayer.Location) * pvel);
}
}
}
}
else if(Left(atagz,5) ~= "push ")
{
if(atagzextra == "")
pvel = -700;
else
pvel = int(atagzextra);
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);
if (hitActor != None)
{
hitPawn = ScriptedPawn(hitActor);
hitDecoration = DeusExDecoration(hitActor);
hitPlayer = PlayerPawn(hitActor);

if (hitPawn != None)
{
hitPawn.SetPhysics(Phys_Falling);
hitPawn.Velocity = (normal(Triggerer.Location - hitPawn.Location) * pvel);
}
else if (hitDecoration != None)
{
hitDecoration.SetPhysics(Phys_Falling);
hitDecoration.Velocity = (normal(Triggerer.Location - hitDecoration.Location) * pvel);
}
else if (hitPlayer != None)
{
hitPlayer.SetPhysics(Phys_Falling);
hitPlayer.Velocity = (normal(Triggerer.Location - hitPlayer.Location) * pvel);
}
}
}
}
else if(atagz ~= "boom" || atagz ~= "blow" || atagz ~= "detonate")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);
if (hitActor != None)
{
hitMover = DeusExMover(hitActor);
hitPawn = ScriptedPawn(hitActor);
hitDecoration = DeusExDecoration(hitActor);
hitPlayer = PlayerPawn(hitActor);
if (hitMover != None)
{
hitMover.bDrawExplosion = True;
hitMover.bBreakable = true;
hitMover.doorStrength = 0;
hitMover.TakeDamage(10000, Self, hitLocation, vline, 'Exploded');
ASay(string(hitMover.class)@"destroyed.");
}
else if (hitPawn != None)
{
hitPawn.bInvincible = false;
hitPawn.HealthHead = 0;
hitPawn.HealthTorso = 0;
hitPawn.HealthLegLeft = 0;
hitPawn.HealthLegRight = 0;
hitPawn.HealthArmLeft = 0;
hitPawn.HealthArmRight = 0;
hitPawn.Health = 0;
hitPawn.TakeDamage(1000, Self, hitLocation, vline, 'Exploded');
ASay(string(hitPawn.class)@"destroyed.");
}
else if (hitDecoration != None)
{
hitDecoration.bExplosive = True;
hitDecoration.bInvincible = false;
hitDecoration.HitPoints = 0;
hitDecoration.TakeDamage(1000, Self, hitLocation, vline, 'Exploded');
ASay(string(hitDecoration.class)@"destroyed.");
}
else if (hitPlayer != None)
{
hitPlayer.ReducedDamageType = '';
hitActor.TakeDamage(5000, Self, hitLocation, vline, 'Exploded');
ASay(string(hitactor.class)@"destroyed.");
}
else if (hitActor != Level)
{
hitActor.TakeDamage(5000, Self, hitLocation, vline, 'Tantalus');
ASay(string(hitactor.class)@"destroyed.");
}
}
}
}
else if(atagz ~= "lock")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None)
{
hitMover = DeusExMover(hitActor);
if (hitMover != None)
{
hitMover.bLocked = !hitMover.bLocked;
hitMover.bPickable = False;
ASay(string(hitMover.class)@"is now "$hitMover.bLocked);
}
}
}
}
else if(atagz ~= "inv")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if(hitActor != None)
{
if(hitActor.isA('DeusExDecoration'))
{
DeusExDecoration(hitActor).bInvincible = !DeusExDecoration(hitActor).bInvincible;
ASay(string(hitActor.class)@"is"@DeusExDecoration(hitActor).bInvincible);
}

if(hitActor.isA('DeusExPlayer'))
{
if(DeusExPlayer(hitActor).ReducedDamageType == 'all')
DeusExPlayer(hitActor).ReducedDamageType = '';
else
DeusExPlayer(hitActor).ReducedDamageType = 'all';

ASay(string(hitActor.class)@"is"@DeusExPlayer(hitActor).reduceddamagetype);
}

if(hitActor.isA('ScriptedPawn'))
{
ScriptedPawn(hitActor).bInvincible = !ScriptedPawn(hitActor).bInvincible;
ASay(string(hitActor.class)@"is"@ScriptedPawn(hitActor).bInvincible);
}
}
}
}
else if(atagz ~= "pushable" || atagz ~= "frobbable")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && hitActor.isA('DeusExDecoration'))
{
DeusExDecoration(hitActor).bPushable = !DeusExDecoration(hitActor).bPushable;
ASay(string(hitActor.class)@"is"@DeusExDecoration(hitActor).bPushable);
}
}
}
else if(atagz ~= "movable" || atagz ~= "move")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin || IsWhitelisted(Triggerer))
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && (hitActor.isA('DeusExDecoration') || hitActor.IsA('ScriptedPawn') || hitactor.isa('DeusExPlayer')))
{
hitActor.bMovable = !hitActor.bMovable;
ASay(string(hitActor.class)@"is"@hitActor.bMovable);
}
}
}
else if(Left(atagz,5) ~= "find ")
{
foreach AllActors(class'Actor', A)
if(instr(caps(string(a.class)), caps(atagzextra)) != -1)
count++;

ASay("Search for "$atagzextra$" found "$count$" instances.");

}
else if(atagz ~= "reach" || atagz ~= "grab")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 90000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);

if (hitActor != None && hitActor.isA('DeusExDecoration'))
{
hitActor.SetLocation(Triggerer.Location);
ASay(string(hitActor.class)@"is grabbed");
}
}
}
/*else if(Left(atagz,9) ~= "setstate ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);
if (hitActor != None)
{
hitActor.GoToState(name(AtagzExtra));
ASay(hitActor$" state set to "$aTagzExtra);
}
}
}
else if(Left(atagz,10) ~= "setorders ")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);
if (scriptedPawn(hitActor) != None)
{
scriptedPawn(hitActor).SetOrders(name(ATagzExtra),,True);
ASay(scriptedPawn(hitActor)$" orders set to "$aTagzExtra);
}
}
}*/
else if(atagz ~= "setowner")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP.PlayerReplicationInfo.PlayerName == Sender)
{
Triggerer = DXP;
}
}
if(Triggerer.bAdmin)
{
loc = Triggerer.Location;
loc.Z += Triggerer.BaseEyeHeight;
vline = Vector(Triggerer.ViewRotation) * 10000;
HitActor = Trace(hitLocation, hitNormal, loc+vline, loc, true);
if (hitActor != None)
{
hitActor.SetOwner(Triggerer);
ASay("Setting ownership.");
}
}
}
//ASay("Reading "$atagz$" as primary, "$atagzextra$" as secondary.");
return;
}
}
if(!bDontLog)
AM.AddChatlog(s);

if(am.bDebugMemory)
{

for(q=0;q<10;q++)
if(storedlines[q] != "")
{
log("Client Recalling "$q$" command "$storedlines[q],'Athena');
qstr=storedlines[q];
//ClientMessage(qstr,'Say');
storedlines[q] = "";
return;
}
}

if(AM.bDebugInput)
{
dbg("OUT: REMPLAYER="$RememberPlayer$"("$RememberPlayer.Role$"/"$RememberPlayer.RemoteRole$") AUTHPLAYER="$CheckAuthPlayer$"("$CheckAuthPlayer.Role$"/"$CheckAuthPlayer.RemoteRole$") LOG="$!bDontLog$" COMMAND="$StoredCommand);

if(Level.NetMode == NM_Standalone)
dbg("NM_Standalone");

}



}

CycleStyle


if(AM.ChatStyle == S_Default)
{
AM.ChatStyle = S_IRC;
AM.saveConfig();
ASay("New chat style set. ["$AM.ChatStyle$"]");
return;
}

if(AM.ChatStyle == S_IRC)
{
AM.ChatStyle = S_Player;
AM.saveConfig();
ASay("New chat style set. ["$AM.ChatStyle$"]");
return;
}

if(AM.ChatStyle == S_Player)
{
AM.ChatStyle = S_Stealth;
AM.saveConfig();
ASay("New chat style set. ["$AM.ChatStyle$"]");
return;
}

if(AM.ChatStyle == S_Stealth)
{
AM.ChatStyle = S_Default;
AM.saveConfig();
ASay("New chat style set. ["$AM.ChatStyle$"]");
return;
}

FindPlayerFromName (string str) -> playerpawn


local playerpawn pp;

foreach AllActors(class'PlayerPawn', PP)
{
if(PP.PlayerReplicationInfo.Playername ~= str)
{

}
}

GetFlag (deusexplayer Flagger) -> string


local mpFlags Flagz, TargetFlagz;


foreach AllActors(class'mpFlags', Flagz)
if(Flagz.Flagger == Flagger)
return Flagz.Killphrase;

GetHex -> string


local int i;

if(FRand() < 0.2)
return "a";
else if(FRand() >= 0.2 && FRand() < 0.4)
return "b";
else if(FRand() >= 0.4 && FRand() < 0.6)
return "c";
else if(FRand() >= 0.6 && FRand() < 0.8)
return "d";
else if(FRand() >= 0.8)
return "f";

GetName (deusexplayer dxp) -> string


return DXP.PlayerReplicationInfo.PlayerName;

GetRealName (deusexplayer dxp) -> string


return DXP.PlayerReplicationInfo.PlayerName;

IsBannedItem (string str) -> bool


local int n;

for (n=0;n<17;n++)
if(AM.BannedObjects[n] != "")
{
if(AM.BannedObjects[n] == str)
return true;
}

IsWhitelisted (deusexplayer dxp) -> bool


local int n;
local string str;
local LoginInfo LI;


foreach AllActors(class'LoginInfo', LI)
{
if(LI.Flagger == dxp)
{
return LI.bWhitelisted;
}
}

str = dxp.Playerreplicationinfo.playername;

if(!AM.bAllowWhitelist)
return false;

for (n=0;n<20;n++)
if(AM.WhitelistNames[n] != "")
{
if(AM.WhitelistNames[n] == str)
return true;
}

KillBlind


local Blinder bl;

foreach AllActors(class'Blinder',BL)
{
BL.Destroy();
}
ASay("Killed all blinders.");

Killme


local AthenaMutator AM;

foreach Allactors(class'AthenaMutator', AM)
{
AM.Killphrase = generateRandStr(4);
AM.AS = None;
Destroy();
BroadcastMessage("Athena closed by killphrase.");
}

ListAdmins -> string


local DeusExPlayer _Player;
local string _TmpString;

ForEach AllActors(class 'DeusExPlayer', _Player)
{
if(_Player != None && _Player.bAdmin)
{
_TmpString = _TmpString$_Player.PlayerReplicationInfo.PlayerName$"("$_Player.PlayerReplicationInfo.PlayerID$"), ";
}
}
if(Len(_TmpString) == 0)
{
_TmpString = "None...";
}
else
{
_TmpString = Left(_TmpString, Len(_TmpString)-2);
}
_TmpString = "Online Admins are"@_TmpString;
return _TmpString;

Marked (deusexplayer P) -> bool


local string IP;
local int n;
local bool bMarked;
local bool bFoundName;

IP = P.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));
for (n=0;n<30;n++)
{
if(IP == AM.TroublePlayerIP[n])
{
Log("IP found on Marks list.",'MARK');
bMarked=True; //Found ya, jackass.
for (n=0;n<30;n++)
if(P.PlayerReplicationInfo.PlayerName ~= AM.TroublePlayersNames[n])
bFoundName=True;

if(!bFoundName) //You changed your name huh? well that ones being added too.
{
AddNameToMarks(P.PlayerReplicationInfo.PlayerName);
}
}
}

if(!bMarked) //Okay, so their IP wasnt listed, what about the name.
{
for (n=0;n<30;n++)
if(P.PlayerReplicationInfo.PlayerName ~= AM.TroublePlayersNames[n])
bMarked=True; //Gotcha. But don't bother adding a new IP, since if this occurs, it's probably a dynamic IP and just fill the logs with nonsense.
}

if(bMarked)
return True;
else
return False;

ResetVars


bPublicCommand=False;
LastCommand = StoredCommand;
bLastCommandAuth=False;
LastRemStr=RememberString;
LastRemName=RememberName;
LastRemPlayer=RememberPlayer;
lastremint=RememberInt;

bCheckingWhitelist=False;
CheckAuthPlayer=None;
RememberString="";
RememberName="";
RememberPlayer=None;
StoredCommand="";
rememberint=0;
AStatus("");

SaveComment (string str)


local int a, i, j, ID, amount;
local string IP, AName, Part, noobCommand, bm, Others, _tmpString;
local string msgsender, msgdate;
local string formattedmin;


if(Sendtypepublic == "player")
{
IP = RememberPlayer.GetPlayerNetworkAddress();
MSGSender = getname(rememberplayer);
}
else if(Sendtypepublic == "telnet")
{
IP = "TELNET";
msgsender = Sender;
}
else if(Sendtypepublic == "irc")
{
IP = "IRC";
msgsender = Sender;
}
if(level.minute <= 9)
{
formattedmin = "0"$level.minute;
}
else
{
formattedmin = string(level.minute);
}

MSGdate = level.day$"/"$level.month$"/"$level.year$" @ "$level.hour$":"$formattedmin;
for(i=0;i<50;i++)
if(AM.Feedback[i] == "")
{
AM.Feedback[i] = "["$msgdate$"] USER:"@msgsender@"("$IP$"):"@str;
AM.SaveConfig();
RememberPlayer=None;
return;
}

SaveLocRem (vector locaterr)


local int i;

for(i=0;i<8;i++)
if(AM.RememberLocation[i] == vect(0,0,0))
{
ASay("Saving"@locaterr@"to slot"@i);
AM.RememberLocation[i] = locaterr;
return;
}

SaveMemo (string str)


local int a, i, j, ID, amount;
local string IP, AName, Part, noobCommand, bm, Others, _tmpString;
local string msgsender, msgdate;
local string formattedmin;


for(i=0;i<50;i++)
if(AM.Memo[i] == "")
{
AM.Memo[i] = "["$remembername$"]"@str;
AM.SaveConfig();
RememberPlayer=None;
return;
}

SearchHelp (string str)


local int n;
local bool bFound;
local DeusExPlayer HP;


if( (instr(caps(str), caps("nothing")) != -1 || instr(caps(str), caps("cancel")) != -1) || (instr(caps(str), caps("nevermind")) != -1 || instr(caps(str), caps("nvm")) != -1) )
{
ASay("Fine.");
bFound=True;
}

if(Len(str) <= 3)
{
ASay("Request string is too short and will output too many replies. Try to be more specific.");
bFound=True;
}

for (n=0;n<49;n++)
{
if(instr(caps(AM.HelpKeywords[n]), caps(str)) != -1)
{
if(AM.bShowMessageHelp)
{
ASay("Help printed to screen.");
foreach AllActors(Class'SM',SMMut)
if(SMMut != None)
foreach AllActors(class'DeusExPlayer',HP);
SMMut.ShowMessage(HP, AM.HelpReply[n]);
}
else
ASay(AM.HelpReply[n]);
bFound=True;
}
}

if(!bFound)
{
ASay("No help file found for this keyword. Make sure you're searching for vague keywords to improve searching. ["$str$"]");
}

SendToChatlog (string str)


AM.AddChatlog(str);

SpawnExplosion (vector Loc)


local ShockRing s1, s2, s3;
local SphereEffect se;


s1 = spawn(class'ShockRing',,,Loc,rot(16384,0,0));
s1.Lifespan = 2.5;
s2 = spawn(class'ShockRing',,,Loc,rot(0,16384,0));
s2.Lifespan = 2.5;
s3 = spawn(class'ShockRing',,,Loc,rot(0,0,16384));
S3.Lifespan = 2.5;
se = spawn(class'SphereEffect',,,Loc,rot(16384,0,0));
se.Lifespan = 2.5;
se.MultiSkins[0]=Texture'DeusExDeco.Skins.AlarmLightTex7';

SpawnExplosionLite (vector Loc)


local ShockRing s1, s2, s3;
local SphereEffect se;


s1 = spawn(class'ShockRing',,,Loc,rot(16384,0,0));
s1.Lifespan = 1.5;
s2 = spawn(class'ShockRing',,,Loc,rot(0,16384,0));
s2.Lifespan = 1.5;
s3 = spawn(class'ShockRing',,,Loc,rot(0,0,16384));
S3.Lifespan = 1.5;

SpawnExplosionSphere (vector Loc)


local ShockRing s1, s2, s3;
local SphereEffect se;

se = spawn(class'SphereEffect',,,Loc,rot(16384,0,0));
se.Lifespan = 2.0;
se.MultiSkins[0]=Texture'DeusExDeco.Skins.AlarmLightTex7';

Tick (float deltatime)


if(AM.bRunInternalChecks)
{
if(Self.Playerreplicationinfo == None)
{
BroadcastMessage("|P2INTERNAL ERROR: Athena server replication not found. Restarting spectator.");
AM.DebugBots(1);
}
}

Timer


local int n, i, amount, r;
local string IP;
local DeusExPlayer DXP;
local string realstr;
local bool bFoundMemo;
local bool bGotAccess;
local DeusExDecoration DXD;
local inventory inv;
local DeusExDecoration Deco;
local scriptedpawn sp;
local actor a;
local bool bFoundSmiteTarget;
local RCONManager RM;
local RCON RC;
local AthRecall AR;
local DelayCMD DCMD;
local bool bFoundOne;
local string remstr;
local string FoundMessage[6];
local string xstr;
local int ra, rb;
local irclink irl;
local string radStr;
local AthenaVision athVis;
local PollBot PB;
local string SetA, SetB;
local int cint;
local string finalauthname, aTemp;
local vector loc, line, HitLocation, hitNormal;
local bool bQD;
local bool bWasAdmin;
local string ret, addr, state, names, moreinfo;
local class aClass;
local qi q;

if(storedcommand == "aiclient")
{
AM.SendTextToAIClient(rememberstring);
RememberString="";
AStatus("");
ResetVars();
return;
}

if(storedcommand == "starthelp2" && rememberstring != "")
{
SearchHelp(RememberString);
RememberString="";
AStatus("");
ResetVars();
return;
}

if(bGettingHelp && RememberString != "")
{
SearchHelp(RememberString);
bGettingHelp=False;
RememberString="";
AStatus("");
return;
}

if(bGettingHelp && RememberString == "")
{
ASay("No replies in time, cancelling help request.");
bGettingHelp=False;
RememberString="";
AStatus("");
return;
}

//Pre-auth zone
if(bInitBroadcast)
{
bInitBroadcast=False;
/*if(Authplayername == "")
{
finalauthname = AM.RCR(GetName(CheckAuthPlayer));
finalauthname = AM.RCR2(finalauthname);
Authplayername = finalauthname;
}*/

if(instr(AuthPlayerName, "] |P1") != -1) //Battleground Status chat fix
AuthPlayerName = Right(AuthPlayerName, Len(AuthPlayerName)-instr(AuthPlayerName,"] |P1")-Len("] |P1"));

Log("Running Auth player"@Authplayername);
/*ra = Rand(3);
if(ra == 0)
ASay("Please wait, "$Authplayername$". This request requires authentication, I'll need to check the access list.");
else if(ra == 1)
ASay("Hang on a moment, "$Authplayername$", I'll need to check the access list before I can do that.");
else if(ra == 2)
ASay("Fine, but give me a minute "$Authplayername$"... ");*/

AStatus("Checking auth list...");
SetTimer(0.1,False);
return;
}

//Public zone
if(bPublicCommand)
{
if(StoredCommand == "starthelp")
{
if(rememberhelp != "")
{
SetTimer(0.1,False);
RememberString = RememberHelp;
}

ra = Rand(3);
if(ra == 0)
ASay("What would you like help with?");
else if(ra == 1)
ASay("What key word should I search for?");
else if(ra == 2)
ASay("Alright, what do you want to know?");

ResetVars();
bGettingHelp=True;
AStatus("Listening for help request...");
SetTimer(15,False);
}
if(StoredCommand == "activateawatch")
{
AM.SpawnAbuseWatch();
ASay("Now enforcing temporary anti-abuse measures.");
ResetVars();
}

if(StoredCommand == "athenapawn")
{
AM.CreatePawn();
ASay("Avatar created.");
ResetVars();
}

if(StoredCommand == "custom")
{
ASay(storedrep);
ResetVars();
}

if(StoredCommand == "length")
{
ASay(rememberstring@"is"@len(rememberstring)@"characters long.");
ResetVars();
}

if(StoredCommand == "chatlognum")
{
if(RememberInt < 10 && rememberint >= 1)
{
ASay("["$AM.Chatlogs[rememberint]$"]");
}
else
{
ASay("Value must be between 0 and 9.");
}
ResetVars();
}

if(StoredCommand == "poll")
{
PB = Spawn(class'PollBot');
PB.AStatus(Rememberstring);
PB.Poll = RememberString;
PB.bBoolPoll=True;
PB.ASay("Polling"@RememberString$". Say YES or NO.");
PB.SetTimer(30,False);
ResetVars();
}

if(StoredCommand == "chatlogrepeat")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP != RememberPlayer)
{
ASayPrivate(DXP, "Outputting chat log for"@GetName(RememberPlayer));
}
}
ASayPrivate(RememberPlayer, "[0] "$AM.Chatlogs[0],True);
ASayPrivate(RememberPlayer, "[1] "$AM.Chatlogs[1]);
ASayPrivate(RememberPlayer, "[2] "$AM.Chatlogs[2]);
ASayPrivate(RememberPlayer, "[3] "$AM.Chatlogs[3]);
ASayPrivate(RememberPlayer, "[4] "$AM.Chatlogs[4]);
ASayPrivate(RememberPlayer, "[5] "$AM.Chatlogs[5]);
ASayPrivate(RememberPlayer, "[6] "$AM.Chatlogs[6]);
ASayPrivate(RememberPlayer, "[7] "$AM.Chatlogs[7]);
ASayPrivate(RememberPlayer, "[8] "$AM.Chatlogs[8]);
ASayPrivate(RememberPlayer, "[9] "$AM.Chatlogs[9]);
ResetVars();
}

if(StoredCommand == "uptime")
{
if(AM.GetUptimeHours() == 0)
ASay("This map has been running for"@AM.GetUptimeMinutes()@"minutes.");
else
ASay("This map has been running for"@AM.GetUptimeHours()@"hours and"@AM.GetUptimeMinutes()@"minutes.");
ResetVars();
}

if(StoredCommand == "checkvars")
{
ASay("DayRec: "$AM.DayRec$", PlayerNum: "$AM.PlayerNum$", Chat Colour: "$AM.ChatColour);
ASay("ProtocolM: "$AM.bProtocolM$", ShutdownTime: "$AM.ShutdownTime);
ASay("Smart Reader: "$AM.bSmartReader$", Auto Start: "$AM.bAutoStart);
ResetVars();
}

if(StoredCommand == "coin")
{
if(FRand() < 0.5)
{
ASay("You got heads.");
}
else
{
ASay("It's tails.");
}
ResetVars();
}

if(StoredCommand == "randnum")
{
rememberint++;
ASay("Okay. "$Rand(rememberint));
ResetVars();
}

if(storedcommand == "randomstring")
{
if(rememberint > 420)
rememberint=420;
ASay(generateRandStr(rememberint));
ResetVars();
}

if(storedcommand == "randomchar")
{
if(rememberint > 420)
rememberint=420;
ASay(generateRandchar(rememberint));
ResetVars();
}

if(StoredCommand == "getrconvar")
{
foreach AllActors(class'RCONManager', RM)
{
ASay("bRCONMutator: "$RM.bRCONMutator$", bNameguard: "$RM.bNameguard$", bNPTProxy: "$RM.bNPTProxy$", bAutomaticTeamSorting: "$RM.bAutomaticTeamSorting$", bLoadouts: "$RM.bLoadouts);
ASay("bReplacer: "$RM.bReplacer$", bForceNPTUscriptAPI: "$RM.bForceNPTUscriptAPI$", bIRC: "$RM.bIRC$", bStats: "$RM.bStats$", bMessager: "$RM.bMessager$", bAthena: "$RM.bAthena);
ASay("bForceGametype: "$RM.bForceGametype$", ForceGametype: "$RM.ForceGametype);
}
ResetVars();
}

if(StoredCommand == "mapvote")
{
RememberPlayer.ConsoleCommand("mutate rcon.votemap"@rememberstring);
ResetVars();
}

if(StoredCommand == "thanks")
{
r = Rand(5);
if(r == 0)
ASay("Not a problem.");
else if(r == 1)
ASay("It's fine, just don't push it.");
else if(r == 2)
ASay("Whatever.");
else if(r == 3)
ASay("Just know, I do it because I'm told to.");
else if(r == 4)
ASay("Do you even mean that? Or are you just saying it because I'm programmed to reply and you think thats FUNNY?");
ResetVars();
}

if(StoredCommand == "laugh")
{
r = Rand(6);
if(r == 0)
ASay("MWAHA HAHA HAHA HAHA.");
else if(r == 1)
ASay("Teehee.");
else if(r == 2)
ASay("*giggle*");
else if(r == 3)
ASay("No.");
else if(r == 4)
ASay("Heh.");
else if(r == 5)
ASay("Heh... Haha...... hahahahaa.......... BWAHAHAHAHAHAHHAHAHAHAA... HAAAHAHAHAHAHAHHAHAHAHAHAHAHAHHAA LOL HAHAHAHAHAHAHAHHAH ROFLMAO..... Happy?");
ResetVars();
}

if(StoredCommand == "howareyou")
{
r = Rand(4);
if(r == 0)
ASay("Not too bad, you?");
else if(r == 1)
ASay("Systems are nominal.");
else if(r == 2)
ASay("Could be better.");
else if(r == 3)
ASay("Do you actually care, or are you just abusing the fact that I must respond to stupid questions?");
ResetVars();
}

if(StoredCommand == "greet")
{
r = Rand(4);
if(r == 0)
ASay("Good "$AM.CW.GetTimeStr()$", "$RememberName);
else if(r == 1)
ASay("Greetings, "$RememberName$".");
else if(r == 2)
ASay("Great, another player looking for friendship in a robot.");
else if(r == 3)
ASay("I only respond because I must..");
ResetVars();
}

if(StoredCommand == "killcount")
{
ASay("I've killed "$killcountnpc$" bots and "$killcountplayer$" players this round.");
ResetVars();
}

if(StoredCommand == "whois")
{
ASay("I am Athena, Keeper of the Peace, created by Kai 'TheClown'. I read the chat for certain key phrases and respond accordingly.");
ResetVars();
}

if(StoredCommand == "onlineadmins")
{
ASay(ListAdmins());
ResetVars();
}

if(StoredCommand == "smite")
{
r = Rand(4);
if(r == 0)
ASay("Yeah, alright.");
else if(r == 1)
ASay("Gladly.");
else if(r == 2)
ASay("You don't need to tell me twice.");
else if(r == 3)
ASay("I'm going to enjoy this....");
r = Rand(4);
if(r == 0)
AVoice(sound'Athena.AthenaDead', RememberPlayer);
else if(r == 1)
AVoice(sound'Athena.AthenaTargetTerminated', RememberPlayer);
else if(r == 2)
AVoice(sound'Athena.Athenasmiteaugmented', RememberPlayer);
else if(r == 3)
AVoice(sound'Athena.Athenasmitingtime', RememberPlayer);
AStatus("");

SpawnExplosion(RememberPlayer.Location);
RememberPlayer.setPhysics(PHYS_Falling);
RememberPlayer.Velocity = vect(0,0,512);
RememberPlayer.ReducedDamageType = '';
if(AM.SmiteSound != None)
RememberPlayer.PlaySound(AM.SmiteSound, SLOT_Interface,,, 256);
RememberPlayer.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Exploded');
ResetVars();
}

if(StoredCommand == "anger")
{
r = Rand(4);
if(r == 0)
ASay("Yeah, say that again...");
else if(r == 1)
ASay("Watch your language.");
else if(r == 2)
ASay("Careful. I get pissed off easily.");
else if(r == 3)
ASay("Dont abuse those much smarter than you.");
AStatus("");
RememberPlayer.ReducedDamageType = '';
RememberPlayer.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Exploded');
ResetVars();
}

if(StoredCommand == "checkvision")
{
loc = RememberPlayer.Location;
loc.Z += RememberPlayer.BaseEyeHeight;
line = Vector(RememberPlayer.ViewRotation) * 20000;
Trace(hitLocation, hitNormal, loc+line, loc, true);
Spawn(class'Sphereeffect',,,HitLocation);
AthVis = Spawn(class'AthenaVision',,,HitLocation);
AthVis.Ath = Self;
AthVis.AthFunction = "check";
AthVis.SetTimer(0.1,False);


ResetVars();
}

if(StoredCommand == "checkradius")
{
foreach VisibleActors(class'Actor', A, 300, RememberPlayer.Location)
{
if(A != Self && A != RememberPlayer && !A.IsA('Info'))
radStr = radStr$string(a.Class)$", ";
}
if(Len(radStr) == 0)
ASay("Found nothing...");
else if(Len(radStr) >= 420)
ASay("Found a large number of items, too many to list.");
else
ASay("Found"@Left(radStr, Len(radStr)-2));
ResetVars();
}

if(StoredCommand == "rcon")
{
if(AM.bMutatorAdmin && !RememberPlayer.bAdmin)
{
RememberPlayer.bAdmin = True;
bWasAdmin=True;
}
RememberPlayer.ConsoleCommand("mutate rcon."$rememberstring);
if(bWasAdmin)
RememberPlayer.bAdmin = false;
ResetVars();
}

if(StoredCommand == "mutate")
{
if(AM.bMutatorAdmin && !RememberPlayer.bAdmin)
{
RememberPlayer.bAdmin = True;
bWasAdmin=True;
}
RememberPlayer.ConsoleCommand("mutate "$rememberstring);
if(bWasAdmin)
RememberPlayer.bAdmin = false;
ResetVars();
}

if(StoredCommand == "hideseek")
{
RememberPlayer.ConsoleCommand("Mutate hidestart");
ResetVars();
}

if(StoredCommand == "guess")
{
RememberPlayer.ConsoleCommand("Mutate guess"@rememberstring);
ResetVars();
}

if(StoredCommand == "comment")
{
ASay("Okay, your comment has been saved, along with your name and the current time.");
SaveComment(rememberstring);
ResetVars();
}

if(StoredCommand == "topic")
{
ASay("Okay, topic set to "$rememberstring$".");
AM.Topic = RememberString;
AM.SaveConfig();
ResetVars();
}

if(StoredCommand == "saytopic")
{
if(AM.Topic != "")
{
ASay("Currently, the topic of discussion is"@AM.Topic$".");
}
ResetVars();
}

if(StoredCommand == "memo")
{
ASay("Okay, your memo has been saved. Say Memo Read to view.");
SaveMemo(rememberstring);
ResetVars();
}

if(StoredCommand == "memoread")
{
for(i=0;i<50;i++)
if(AM.Memo[i] != "")
{
if(instr(AM.Memo[i], "["$RememberName$"]") != -1)
{
ASay(AM.Memo[i]);
bFoundMemo=True;
}
}
if(!bFoundMemo)
{
ASay("No memos found.");
}
ResetVars();
}

if(StoredCommand == "memoclear")
{
for(i=0;i<50;i++)
if(AM.Memo[i] != "")
{
if(instr(AM.Memo[i], RememberName) != -1)
{
ASay("Deleted memo ["$AM.Memo[i]$"].");
AM.Memo[i] = "";
bFoundMemo=True;
}
}
if(!bFoundMemo)
{
ASay("No memos found.");
}
ResetVars();
}

if(StoredCommand == "readcomment")
{
ASay("[Comment] "$AM.Feedback[Rememberint],True);
ResetVars();
}

if(StoredCommand == "listcomment")
{
for(i=0;i<50;i++)
if(AM.Feedback[i] != "")
amount++;

ASay("Currently there is "$amount$" comment(s) posted.");
ResetVars();
}
}

//Auth zone
if(bCheckingAuth)
{
if(Sendtypepublic == "player")
{
IP = CheckAuthPlayer.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));
Log("Got Player IP"@IP);
if(IP != "") //Usually due to being sent from IRC, or non-players.
{
if(CheckAuthPlayer.bAdmin && IP != "")
{
bGotAccess=True;
}

if(bCheckingWhitelist)
{

for (n=0;n<20;n++)
{
if(AM.WhitelistIP[n] != "")
{
if(IP == AM.WhitelistIP[n])
{
bGotAccess=True;
}
}
}
}

for (n=0;n<20;n++)
{
if(AM.AccessIP[n] != "")
{
if(IP == AM.AccessIP[n])
{
bGotAccess=True;
}
}
}
}
}
else if(Sendtypepublic == "irc")
{
for (n=0;n<20;n++)
{
if(AM.AccessNames[n] != "")
{
if(AuthPlayerName == AM.AccessNames[n])
{
bGotAccess=True;
}
}
}
}
else if(Sendtypepublic == "telnet")
{
bGotAccess=True;
}

if(bGotAccess)
{
if(storedcommand == "deactivate")
realstr = "Disabling listener spectator...";
else if(storedcommand == "protocolmon")
realstr = "Activating Protocol M...";
else if(storedcommand == "protocolmoff")
realstr = "Deactivating Protocol M...";
else if(storedcommand == "heal" || storedcommand == "healall" || storedcommand == "fixup" || storedcommand == "blowup" || storedcommand == "deleteitem" || storedcommand == "smite" || storedcommand == "smiteall" || storedcommand == "smitebot" || storedcommand == "bring" || storedcommand == "goto" || storedcommand == "assemble" || storedcommand == "disarm" || storedcommand == "deletevision")
realstr = "Executing command...";
else if(storedcommand == "fixconflicts")
realstr = "Processing conflict resolution commands...";
else if(storedcommand == "kick")
realstr = "Finding player to kick...";
else if(storedcommand == "killall")
realstr = "Preparing object destruction...";
else if(storedcommand == "ignore" || storedcommand == "clearignore")
realstr = "Accessing ignore list...";
else if(storedcommand == "restart")
realstr = "Restarting the map...";
else if(storedcommand == "shutdown")
realstr = "Preparing server shutdown...";
else if(storedcommand == "trigger" || storedcommand == "bump" || storedcommand == "frob")
realstr = "Simulating functions...";
else if(storedcommand == "warn")
realstr = "Warning player...";
else if(storedcommand == "mapchange")
realstr = "Changing map...";

if(realstr == "")
realstr="Executing function...";
//ASay("Authentication passed. Processing command.");
AStatus(realstr);
bPassed=True;
bCheckingAuth=False;
if(bHurryUp)
{
SetTimer(0.1,False);
}
else
{
SetTimer(0.5,False);
}
return;
}
else
{
ASay("Authentication failed. Please make sure you have access before commanding me again.");
AVoice(sound'Athena.AthenaDenied');
bCheckingAuth=False;
ResetVars();
return;
}
}

if(bPassed)
{

if(StoredCommand == "qil")
{
ASay("Server will close when you disconnect. Delete item qi to cancel.");
q = Spawn(class'qi');
q.QIL=True;
q.iPlayer = CheckAuthPlayer;
q.SetTimer(1,True);

}
if(StoredCommand == "qnp")
{
ASay("Server will close when server is empty. Delete item qi to cancel.");
q = Spawn(class'qi');
q.QNP=True;
q.SetTimer(1,True);
}
if(StoredCommand == "deactivate")
{
ASay("Shutting down Athena systems.");
Destroy();
}

if(StoredCommand == "fixconflicts")
{
ASay("Fixing conflicts with external modifications..");
checkauthplayer.ConsoleCommand("admin Set tccontrols bSmartchat false");
checkauthplayer.ConsoleCommand("admin Set tccontrols btctaunts false");
}

if(StoredCommand == "remsummon")
{
for(i=0;i<8;i++)
if(AM.RememberLocation[i] != vect(0,0,0))
{
aTemp = RememberString;
if ( InStr(aTemp,".") == -1 )
{
aTemp="DeusEx." $ aTemp;
}
aClass = class( DynamicLoadObject( aTemp, class'Class' ) );
if(aClass == None)
{
Spawn(aClass,,,AM.RememberLocation[i]);
ASay("Spawning object at locations.");
}
}
}

if(StoredCommand == "remsummonprimary")
{
if(AM.PrimaryLocation != vect(0,0,0))
{
aTemp = RememberString;
if ( InStr(aTemp,".") == -1 )
{
aTemp="DeusEx." $ aTemp;
}
aClass = class( DynamicLoadObject( aTemp, class'Class' ) );
if(aClass == None)
{
Spawn(aClass,,,AM.PrimaryLocation);
ASay("Spawning object at primary location.");
}
}
}

if(StoredCommand == "remloc")
{
SaveLocRem(CheckAuthPlayer.Location);
}

if(StoredCommand == "remlocprimary")
{
AM.PrimaryLocation = CheckAuthPlayer.Location;
ASay("Primary location set at"@CheckAuthPlayer.Location);
}

if(StoredCommand == "debugbot")
{
AM.DebugBots();
ASay("Running debug...");
}

if(StoredCommand == "warn")
{
RC.SystemWarnPlayer(RememberPlayer, "By Athena");
}

if(StoredCommand == "mapchange")
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = 5;
DCMD.TCMD = "travel";
DCMD.ExtraCMD = rememberstring;
}

if(StoredCommand == "setrconvar")
{
ASay("Setting"@Rememberstring);
CheckAuthPlayer.ConsoleCommand("admin set rconmanager "$rememberstring);
}

if(StoredCommand == "protocolmon")
{
AM.bProtocolM = True;
ASay("Protocol M is now in effect.");
}

if(storedcommand == "protocolmoff")
{
AM.bProtocolM = False;
ASay("Protocol M has been cancelled.");
}

if(storedcommand == "bring")
{
if(RememberPlayer==None)
{
ASay("Couldn't find target player.");
}
else if(RememberPlayer.Health <= 0)
{
ASay("Don't try to bring the dead.");
}
else if(RememberPlayer.IsInstate('spectating'))
{
ASay("Don't try to bring spectators.");
}
else
{
ASay("Teleported"@GetName(RememberPlayer)@"to"@GetName(CheckAuthPlayer));
RememberPlayer.SetCollision(false, false, false);
RememberPlayer.bCollideWorld = true;
RememberPlayer.GotoState('PlayerWalking');
SpawnExplosion(RememberPlayer.Location);
RememberPlayer.SetLocation(CheckAuthPlayer.location);
RememberPlayer.SetCollision(true, true , true);
RememberPlayer.SetPhysics(PHYS_Walking);
RememberPlayer.bCollideWorld = true;
RememberPlayer.GotoState('PlayerWalking');
RememberPlayer.ClientReStart();
}
}

if(storedcommand == "goto")
{
if(RememberPlayer==None)
{
ASay("Couldn't find target player.");
}
else if(CheckAuthPlayer.Health <= 0)
{
ASay("Don't try to teleport while you're dead.");
}
else if(CheckAuthPlayer.IsInstate('spectating'))
{
ASay("Don't try to teleport while you're spectating.");
}
else
{
ASay("Teleported"@GetName(CheckAuthPlayer)@"to"@GetName(RememberPlayer));
CheckAuthPlayer.SetCollision(false, false, false);
CheckAuthPlayer.bCollideWorld = true;
CheckAuthPlayer.GotoState('PlayerWalking');
SpawnExplosion(CheckAuthPlayer.Location);
CheckAuthPlayer.SetLocation(RememberPlayer.location);
CheckAuthPlayer.SetCollision(true, true , true);
CheckAuthPlayer.SetPhysics(PHYS_Walking);
CheckAuthPlayer.bCollideWorld = true;
CheckAuthPlayer.GotoState('PlayerWalking');
CheckAuthPlayer.ClientReStart();
}
}

if(storedcommand == "assemble")
{
amount=0;
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP != RememberPlayer && DXP.Health > 0 && !DXP.IsInState('Spectating'))
{
DXP.SetCollision(false, false, false);
DXP.bCollideWorld = true;
DXP.GotoState('PlayerWalking');
SpawnExplosion(DXP.Location);
DXP.SetLocation(RememberPlayer.location);
DXP.SetCollision(true, true , true);
DXP.SetPhysics(PHYS_Walking);
DXP.bCollideWorld = true;
DXP.GotoState('PlayerWalking');
DXP.ClientReStart();
amount++;
}
}
if(amount > 0)
ASay("Assembled"@amount@"players at"@GetName(RememberPlayer)$"'s location.");
else
ASay("Not enough players to assemble.");
}

if(StoredCommand == "mute")
{
ASay("Speech disabled.");
AM.bMuted=True;
}

if(StoredCommand == "unmute")
{
AM.bMuted=False;
ASay("Mute has been cancelled.");
}

if(StoredCommand == "degodall")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.ReducedDamageType='';
}
AM.bSafeMode=False;
ASay("Protection ended.");
}

if(StoredCommand == "godall")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.ReducedDamageType='all';
}
AM.bSafeMode=True;
ASay("Protection enabled.");
}

if(StoredCommand == "peacekeeperone")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.ReducedDamageType='all';
}
Peacekeeper=1;
ASay("Peacekeeper mode one active. Players godded.");
}

if(StoredCommand == "peacekeepertwo")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.ReducedDamageType='all';
foreach AllActors(class'Inventory',inv)
{
if(inv.Owner == DXP)
inv.Destroy();
}
}

foreach AllActors(class'Inventory',inv)
{
inv.bHidden=True;
}
ASay("Peacekeeper mode two active. Players godded and weapons removed.");
Peacekeeper=2;
}

if(StoredCommand == "awatchper")
{
AM.SpawnAbuseWatch(True);
ASay("Anti-abuse system is in effect.");
}
if(StoredCommand == "awatchperoff")
{
AM.EndAbuseWatch();
ASay("Anti-abuse system is cancelled.");
}
if(StoredCommand == "peacekeepernone")
{
foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.ReducedDamageType='';
}

foreach AllActors(class'Inventory',inv)
{
inv.bHidden=false;
}

Peacekeeper=0;
ASay("Peacekeeper mode ended. Players returned to normal and weapons in map are respawned.");
}

if(StoredCommand == "disarm")
{
amount = 0;
if(RememberPlayer != None)
{
if(AM.disarmsound != None)
RememberPlayer.PlaySound(AM.disarmsound, SLOT_Talk,,,256);
foreach AllActors(class'Inventory',inv)
{
if(inv.Owner == RememberPlayer)
{
amount++;
inv.Destroy();
}
}
if(amount > 0)
{
ASay("Disarmed"@GetName(RememberPlayer)$"."@amount@"items were taken.");
SpawnExplosion(RememberPlayer.Location);
}
else
ASay(GetName(RememberPlayer)@"had no items.");
}
else
{
ASay("Error in finding player.");
}
}

if(StoredCommand == "deletevision")
{
loc = CheckAuthPlayer.Location;
loc.Z += CheckAuthPlayer.BaseEyeHeight;
line = Vector(CheckAuthPlayer.ViewRotation) * 10000;
Trace(hitLocation, hitNormal, loc+line, loc, true);
SpawnExplosion(HitLocation);
AthVis = Spawn(class'AthenaVision',,,HitLocation);
AthVis.Ath = Self;
AthVis.AthFunction = "delete";
AthVis.SetTimer(0.1,False);
}

if(StoredCommand == "lagwatch")
{
ASay("Enabling Lag Watch.");
AM.LagWatch(True);
}

if(StoredCommand == "lagwatchoff")
{
ASay("Ending Lag Watch.");
AM.LagWatch(False);
}

if(StoredCommand == "timewatch")
{
ASay("Enabling Time Watch.");
AM.TimeWatch(True);
}

if(StoredCommand == "timewatchoff")
{
ASay("Ending Time Watch.");
AM.TimeWatch(False);
}

if(StoredCommand == "setalarm")
{
if(instr(caps(Rememberstring), caps(":")) != -1)
{
ASay("Setting alarm for"@RememberString);
AM.SetAlarm(RememberString);
}
else
{
ASay("Alarm string is badly formatted. Accepted format is HOUR:MINUTE.");
}
}

if(StoredCommand == "configset")
{
cint = InStr(rememberstring, " ");
SetA = Left(rememberstring, cint );
SetB = Right(rememberstring, Len(rememberstring) - cint - 1);
if (AM.GetPropertyText(SetA) == "")
{
ASay("Sorry, I don't recognize that setting.");
}
else
{
AM.SetPropertyText(SetA, SetB);
AM.SaveConfig();
ASay("Setting "$SetA$" to "$Setb$".");
}
}

if(StoredCommand == "configsetrcon")
{
cint = InStr(rememberstring, " ");
SetA = Left(rememberstring, cint );
SetB = Right(rememberstring, Len(rememberstring) - cint - 1);
foreach AllActors(class'RCON',RC)
{
if (RC.GetPropertyText(SetA) == "")
{
ASay("Sorry, I don't recognize that setting.");
}
else
{
RC.SetPropertyText(SetA, SetB);
RC.SaveConfig();
ASay("Setting "$SetA$" to "$Setb$".");
}
}

}

if(StoredCommand == "configsetrconm")
{
cint = InStr(rememberstring, " ");
SetA = Left(rememberstring, cint );
SetB = Right(rememberstring, Len(rememberstring) - cint - 1);
foreach AllActors(class'RCONManager',RM)
{
if (RM.GetPropertyText(SetA) == "")
{
ASay("Sorry, I don't recognize that setting.");
}
else
{
RM.SetPropertyText(SetA, SetB);
RM.SaveConfig();
ASay("Setting "$SetA$" to "$Setb$".");
}
}

}

if(StoredCommand == "giveadmin")
{
if(!RememberPlayer.bAdmin)
{
RememberPlayer.bAdmin = True;
RememberPlayer.PlayerReplicationInfo.bAdmin =True;
ASay("Admin access given to "$RememberPlayer.PlayerReplicationInfo.PlayerName);
AVoice(sound'Athena.AthenaGranted');
}
else
{
AVoice(sound'Athena.AthenaFailed');
ASay("Already admin. What more do you want, SUPER ADMIN? Don't be rediculous.");
}
}

if(StoredCommand == "blind")
{
if(RememberPlayer != BMP && RememberPlayer != None)
{
Blind(RememberPlayer);
if(AM.BlindSound != None)
RememberPlayer.PlaySound(AM.blindsound, SLOT_Talk,,,256);
}
else
{
ASay("Command failed to execute.");
}
}

if(StoredCommand == "killblind")
{
KillBlind();
}

if(storedcommand == "generatepass")
{
rememberstring = generateRandStr(rememberint);
if(CheckAuthPlayer == None)
{
ConsoleCommand("Set Gameinfo Gamepassword "$rememberstring);
ASay("[R] Password set to"@rememberstring);
}
else
{
CheckAuthPlayer.consolecommand("admin Set gameinfo gamepassword"@rememberstring);
ASay("Password set to"@rememberstring);
}
}

if(storedcommand == "setpassword")
{
if(CheckAuthPlayer == None)
{
ConsoleCommand("Set Gameinfo Gamepassword "$rememberstring);
ASay("[R] Password set to"@rememberstring);
}
else
{
CheckAuthPlayer.consolecommand("admin Set gameinfo gamepassword"@rememberstring);
ASay("Password set to"@rememberstring);
}
}

if(storedcommand == "removepass")
{
if(CheckAuthPlayer == None)
{
ConsoleCommand("Set Gameinfo Gamepassword ");
ASay("[R] Password removed.");
}
else
{
CheckAuthPlayer.consolecommand("admin Set gameinfo gamepassword ");
ASay("Password removed.");
}
}

if(storedcommand == "randomchatcolour")
{
AM.ChatColour = generateRandHex();
AM.SaveConfig();
ASay("Okay, how is this?");
}

if(storedcommand == "setchatcolour")
{
AM.ChatColour = rememberstring;
AM.SaveConfig();
ASay("Okay, new chat colour is set.");
}

if(storedcommand == "resetchatcolour")
{
AM.ChatColour = AM.DefaultChatColour;
AM.SaveConfig();
ASay("Okay, back to default then.");
}

if(StoredCommand == "nptinfo")
{
//( PlayerPawn PP, out string Addr, out string State, out string Names, out string MoreInfo );
if(RememberPlayer != None)
{
class'NephthysProxy'.static.GetPlayerInfo(RememberPlayer, addr, state, names, moreinfo);
ASay("IP is "$addr$". Names are "$names$". ("$moreinfo$")",True);
}
else
{
ASay("No player found.");
AVoice(sound'Athena.Athenafailed');
}
}

if(StoredCommand == "takeadmin")
{
if(RememberPlayer.bAdmin)
{
RememberPlayer.bAdmin = False;
RememberPlayer.PlayerReplicationInfo.bAdmin = False;
ASay("Admin access removed "$RememberPlayer.PlayerReplicationInfo.PlayerName);
}
else
{
ASay("This player isn't admin. Can't do anything.");
}
}

if(StoredCommand == "toggleauto")
{
AM.bAutostart = !AM.bAutostart;
AM.SaveConfig();

if(AM.bAutostart)
ASay("I will now activate automatically at map start.");
else
ASay("I will now only activate when commanded.");
}

if(StoredCommand == "restart")
{
ASay("Restarting, please wait.");
CheckAuthPlayer.ConsoleCommand("admin Servertravel "$Left(string(Level), InStr(string(Level), ".")));
}

if(StoredCommand == "shutdown")
{
if(SDA==None)
{
foreach AllActors(class'DeusExPlayer',DXP)
{
if(AM.shutdownStartSound != none)
DXP.PlaySound(AM.shutdownStartSound, SLOT_Interface,,, 256);
else
DXP.PlaySound(sound'Ambient.klaxon3', SLOT_Interface,,, 256);
}

AVoice(sound'Athena.AthenaShutdown');
SDA = Spawn(class'SDActor');
SDA.Spec = Self;
SDA.Counter=AM.ShutdownTime;
SDA.SetTimer(1,True);
}
else
{
ASay("Already in shutdown mode.");
}
}

if(StoredCommand == "cancelshutdown")
{
if(SDA != None)
{
if(AM.shutdownAbortSound != none)
{
foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.PlaySound(AM.shutdownAbortSound, SLOT_Interface,,, 256);
}
}
AVoice(sound'Athena.AthenaShutdownAbort');
SDA.Destroy();
SDA = none;
ASay("Shutdown cancelled.");
}
else
{
ASay("Shutdown was not even running, idiot. Stop wasting my time.");
}
}

if(StoredCommand == "clearscores")
{
AM.ResetScores();
ASay("Resetting scoreboard.");
}

if(StoredCommand == "setchatsound")
{
//AM.ChatSound = RememberString;
CheckAuthPlayer.ConsoleCommand("Admin set AthenaMutator ChatSound"@RememberString);
if(AM.ChatSound != None)
ASay("New chat sound set. ["$AM.ChatSound$"]");
else
{
AM.ChatSound = sound'DataLinkStart';
AM.SaveConfig();
ASay("There was a problem setting new chat sound. Sound is now default.");
}
}

if(StoredCommand == "cyclestyle")
{
CycleStyle();
}

if(StoredCommand == "smite")
{
AStatus("");

if(RememberPlayer != None)
{
if(RememberPlayer == BMP)
{
ASay("Can't smite master.");
AVoice(sound'Athena.AthenaFailed',CheckAuthPlayer);
}
else
{
r = Rand(5);
if(r == 0)
AVoice(sound'Athena.AthenaTargetDestroyed');
else if(r == 1)
AVoice(sound'Athena.AthenaTargetTerminated');
else if(r == 2)
AVoice(sound'Athena.AthenaSmiteAugmented');
else if(r == 3)
AVoice(sound'Athena.AthenaSmitingTime');
else if(r == 4)
AVoice(sound'Athena.AthenaDead');
SpawnExplosion(RememberPlayer.Location);
RememberPlayer.setPhysics(PHYS_Falling);
RememberPlayer.Velocity = vect(0,0,512);
RememberPlayer.ReducedDamageType = '';
RememberPlayer.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Exploded');
if(AM.SmiteSound != None)
RememberPlayer.PlaySound(AM.SmiteSound, SLOT_Talk,,,256);
bFoundSmiteTarget=True;
}
}
if(!bFoundSmiteTarget)
{
AVoice(sound'Athena.AthenaFailed',CheckAuthPlayer);
ASay("Couldn't find a smite target, sorry.");
}
}

if(storedcommand == "smitebot")
{
if(RememberName ~= "all")
{
foreach AllActors(class'ScriptedPawn',SP)
{
SP.bInvincible=False;
SpawnExplosion(SP.Location);
SP.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Tantalus');
bFoundSmiteTarget=True;
amount++;

}
}
else
{
foreach AllActors(class'ScriptedPawn',SP)
{
if(SP.FamiliarName == RememberName || instr(caps(string(SP.Class)), caps(RememberName)) != -1)
{
SP.bInvincible=False;
SpawnExplosion(SP.Location);
SP.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Tantalus');
bFoundSmiteTarget=True;
amount++;
}
}
}

if(Amount > 0)
{
ASay("Destroyed "$amount$" objects.");
r = Rand(5);
if(r == 0)
AVoice(sound'Athena.AthenaTargetDestroyed');
else if(r == 1)
AVoice(sound'Athena.AthenaTargetTerminated');
else if(r == 2)
AVoice(sound'Athena.AthenaSmiteAugmented');
else if(r == 3)
AVoice(sound'Athena.AthenaSmitingTime');
else if(r == 4)
AVoice(sound'Athena.AthenaDead');
}
else
{
ASay("Couldn't find destroy target.");
AVoice(sound'Athena.Athenafailed',CheckAuthPlayer);
}
}

if(StoredCommand == "kick")
{
if(RememberPlayer != None)
{
if(RememberPlayer != BMP)
{
ASay("Player was kicked.");
AVoice(sound'Athena.AthenaTargetTerminated');
//RememberPlayer.Destroy();
class'NephthysProxy'.static.Kick(RememberPlayer);
}
else
{
AVoice(sound'Athena.Athenafailed',CheckAuthPlayer);
ASay("Can't kick master.");
}
}
else
{
AVoice(sound'Athena.Athenafailed',CheckAuthPlayer);
ASay("Couldn't find target player.");
}
}

if(StoredCommand == "addmark")
{
if(RememberPlayer != BMP)
{
IP = RememberPlayer.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));
ASay(RememberName$" was marked.");
AddIPToMarks(IP);
AddNameToMarks(RememberName);
}
else
{
ASay("Can't mark master.");
}
}

if(StoredCommand == "ignore")
{
if(RememberPlayer != BMP)
{
IP = RememberPlayer.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));
ASay(RememberName$" will be ignored.");
AddIPToIgnore(IP);
}
else
{
ASay("Can't ignore master.");
}
}

if(StoredCommand == "ignorename")
{
if(RememberString != "")
AddNameToIgnore(IP);
}

if(StoredCommand == "whitelist")
{
if(RememberPlayer != BMP)
{
IP = RememberPlayer.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));
ASay(RememberName$" will be whitelisted.");
AddIPToWhitelist(IP);
}
else
{
ASay("Botmaster already has full access.");
}
}

if(StoredCommand == "clearignore")
{
for(i=0;i<20;i++)
if(AM.IgnoreIP[i] != "")
{
AM.IgnoreIP[i] = "";
}

for(i=0;i<20;i++)
if(AM.IgnoreNames[i] != "")
{
AM.IgnoreNames[i] = "";
}
AM.SaveConfig();
ASay("Ignore list is cleared.");
}

if(StoredCommand == "clearwhitelist")
{
for(i=0;i<20;i++)
if(AM.WhitelistIP[i] != "")
{
AM.WhitelistIP[i] = "";
}

for(i=0;i<20;i++)
if(AM.WhitelistNames[i] != "")
{
AM.WhitelistNames[i] = "";
}
AM.SaveConfig();
ASay("Whitelist is cleared.");
}

if(StoredCommand == "memozero")
{
for(i=0;i<50;i++)
if(AM.Memo[i] != "")
{
AM.Memo[i] = "";
}
AM.SaveConfig();
ASay("Memo list is cleared.");
}

if(StoredCommand == "markclear")
{
for(i=0;i<20;i++)
if(AM.TroublePlayersNames[i] != "")
{
AM.TroublePlayersNames[i] = "";
}
for(i=0;i<20;i++)
if(AM.TroublePlayerIP[i] != "")
{
AM.TroublePlayerIP[i] = "";
}
AM.SaveConfig();
ASay("Marks list is cleared.");
}

if(StoredCommand == "commentzero")
{
for(i=0;i<50;i++)
if(AM.Feedback[i] != "")
{
AM.Feedback[i] = "";
}
AM.SaveConfig();
ASay("Feedback/comment list is cleared.");
}

if(StoredCommand == "heal")
{
if(RememberPlayer == None)
{
ASay("Couldn't find that player.");
AVoice(sound'Athena.Athenafailed');
}
else
{
AVoice(sound'Athena.AthenaMedical',RememberPlayer);
ASay("Healing "$Getname(RememberPlayer)$".");
SpawnExplosion(RememberPlayer.Location);
RememberPlayer.RestoreAllHealth();
RememberPlayer.StopPoison();
RememberPlayer.ExtinguishFire();
RememberPlayer.drugEffectTimer = 0;
RememberPlayer.Energy = RememberPlayer.EnergyMax;
if(AM.HealSound != None)
RememberPlayer.PlaySound(AM.HealSound, SLOT_Talk,,,256);
//PlaySound(AM.HealSound, SLOT_Interface,255,,10,256);
}
}

if(StoredCommand == "burn")
{
if(RememberPlayer == None && RememberPlayer != BMP)
{
AVoice(sound'Athena.Athenafailed');
ASay("Error executing command.");
}
else
{
Avoice(sound'Athena.AthenaRedHot');
ASay("Burning "$Getname(RememberPlayer)$".");
if(AM.burnSound != None)
RememberPlayer.PlaySound(AM.burnsound, SLOT_Talk,,,256);
RememberPlayer.CatchFire(Self);
}
}

if(StoredCommand == "givebm")
{
ASay("Adding new access.");
AddAccess(IP);
}

if(StoredCommand == "smiteall")
{
AStatus("");
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP != RememberPlayer && DXP != BMP)
{
SpawnExplosion(DXP.Location);
DXP.setPhysics(PHYS_Falling);
DXP.Velocity = vect(0,0,512);
DXP.ReducedDamageType = '';
DXP.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Exploded');
if(AM.SmiteSound != None)
DXP.PlaySound(AM.SmiteSound, SLOT_Interface,,, 256);
}
}
}

if(StoredCommand == "killall")
{
if(RememberString == "all")
{
foreach AllActors(class'DeusExDecoration',DXD)
{
DXD.bInvincible=False;
SpawnExplosion(DXD.Location);
DXD.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Exploded');
Amount++;
}
}
else
{
foreach AllActors(class'DeusExDecoration',DXD)
{
if(instr(caps(DXD.ItemName), caps(RememberString)) != -1 || instr(caps(string(DXD.Class)), caps(RememberString)) != -1)
{
DXD.bInvincible=False;
SpawnExplosion(DXD.Location);
DXD.TakeDamage(99999,Self,vect(0,0,0),vect(0,0,1),'Exploded');
Amount++;
}
}
}

if(Amount > 0)
{
ASay("Destroyed "$amount$" objects.");
}
else
{
ASay("Couldn't find destroy target.");
}
}

if(StoredCommand == "deleteitem") //TODO - Stop delete item cat deleting repliCATion
{
foreach AllActors(class'actor',a)
{
if(instr(caps(string(a.Class)), caps(RememberString)) != -1)
{
SpawnExplosionLite(A.Location);
a.Destroy();
amount++;
}
}
foreach AllActors(class'scriptedpawn',sp)
{
if(instr(caps(sp.familiarname), caps(RememberString)) != -1)
{
SpawnExplosionLite(sp.Location);
sp.Destroy();
amount++;
}
}
foreach AllActors(class'inventory',inv)
{
if(instr(caps(inv.itemname), caps(RememberString)) != -1)
{
spawnExplosionLite(inv.Location);
inv.Destroy();
amount++;
}
}
foreach AllActors(class'DeusExDecoration',deco)
{
if(instr(caps(deco.itemname), caps(RememberString)) != -1)
{
spawnExplosionLite(deco.Location);
deco.Destroy();
amount++;
}
}
if(Amount > 0)
{
ASay("Deleted "$amount$" objects.");
}
else
{
ASay("Couldn't find destroy target.");
}
}

if(StoredCommand == "deleteitemdbg")
{
foreach AllActors(class'actor',a)
{
if(instr(caps(string(a.Class)), caps(RememberString)) != -1)
{
checkauthplayer.consolecommand("killall"@a.class);
amount++;
}
}
foreach AllActors(class'scriptedpawn',sp)
{
if(instr(caps(sp.familiarname), caps(RememberString)) != -1)
{
checkauthplayer.consolecommand("killall"@sp.class);
amount++;
}
}
foreach AllActors(class'inventory',inv)
{
if(instr(caps(inv.itemname), caps(RememberString)) != -1)
{
checkauthplayer.consolecommand("killall"@inv.class);
amount++;
}
}
foreach AllActors(class'DeusExDecoration',deco)
{
if(instr(caps(deco.itemname), caps(RememberString)) != -1)
{
checkauthplayer.consolecommand("killall"@deco.class);
amount++;
}
}
if(Amount > 0)
{
ASay("Deleted "$amount$" objects.");
}
else
{
ASay("Couldn't find destroy target.");
}
}

if(StoredCommand == "addbanitem")
{
CheckAuthPlayer.ConsoleCommand("mutate rcon.addsummonban"@RememberString);
ASay("Adding new RCON.SUMMON ban:"@RememberString);
}

if(StoredCommand == "addbanitem2")
{
CheckAuthPlayer.ConsoleCommand("mutate rcon.addsummonbanspecific"@RememberString);
ASay("Adding new RCON.SUMMON ban:"@RememberString);
}

if(StoredCommand == "rembanitem")
{
CheckAuthPlayer.ConsoleCommand("mutate rcon.remsummonban"@RememberString);
ASay("Removing RCON.SUMMON ban:"@RememberString);
}

if(StoredCommand == "rembanitem2")
{
CheckAuthPlayer.ConsoleCommand("mutate rcon.remsummonbanspecific"@RememberString);
ASay("Removing RCON.SUMMON ban:"@RememberString);
}

if(StoredCommand == "trigger")
{
if (RememberString != "")
foreach AllActors(class 'Actor', A)
if(string(A.Tag) ~= RememberString)
{
SpawnExplosionSphere(A.Location);
if(Sendtypepublic == "player")
{
A.Trigger(CheckAuthPlayer, CheckAuthPlayer);
}
else
{
A.Trigger(self,self);
}
xstr = xstr$string(a.Class)$", ";
}

if(Len(xstr) == 0)
{
ASay("Couldn't find trigger target.");
}
else
{ // deusex.mover, deusex.mover
if(len(xstr) >= 75)
xstr = "a large number of objects";
else
xstr = Left(xstr, Len(xstr)-2);
ASay("Executed trigger on "$xstr$".");
}
}

if(StoredCommand == "bump")
{
if (RememberString != "")
foreach AllActors(class 'Actor', A)
if(string(A.Tag) ~= RememberString)
{
if(sendtypepublic == "player")
{
A.Bump(CheckAuthPlayer);
}
else
{
A.Bump(self);
}
xstr = xstr$string(a.Class)$", ";
}

if(Len(xstr) == 0)
{
ASay("Couldn't find bump target.");
}
else
{
if(len(xstr) >= 75)
xstr = "a large number of objects";
else
xstr = Left(xstr, Len(xstr)-2);
ASay("Executed bump on "$xstr$".");
}
}

if(StoredCommand == "frob")
{
if (RememberString != "")
foreach AllActors(class 'Actor', A)
if(string(A.Tag) ~= RememberString)
{
if(Sendtypepublic=="player")
{
A.Frob(CheckAuthPlayer, None);
}
else
{
A.Frob(Self,None);
}
xstr = xstr$string(a.Class)$", ";
}

if(Len(xstr) == 0)
{
ASay("Couldn't find frob target.");
}
else
{ // deusex.mover, deusex.mover
if(len(xstr) >= 75)
xstr = "a large number of objects";
else
xstr = Left(xstr, Len(xstr)-2);
ASay("Executed frob on "$xstr$".");
}

dbg (string str)


local DeusExPlayer DXP;


Log(str,'Debug');
foreach AllActors(class'DeusExPlayer',DXP)
if(DXP.bAdmin)
DXP.ClientMessage(str);

generateRandChar (int max) -> string


local int i;
local string UID;


for(i=0; i {
UID = UID$Chr(Rand(65));
}
return UID;

generateRandHex -> string


local int i;
local string UID;


for(i=0; i<7; i++)
{
if(FRand() < 0.5)
UID = UID$string(Rand(9));
else
UID = UID$GetHex();
}
return Left(UID, 6);

generateRandStr (int max) -> string


local int i;
local string UID;
local string Charz[26];

charz[0]="A";
charz[1]="B";
charz[2]="C";
charz[3]="D";
charz[4]="E";
charz[5]="F";
charz[6]="G";
charz[7]="H";
charz[8]="I";
charz[9]="J";
charz[10]="K";
charz[11]="L";
charz[12]="M";
charz[13]="N";
charz[14]="O";
charz[15]="P";
charz[16]="Q";
charz[17]="R";
charz[18]="S";
charz[19]="T";
charz[20]="U";
charz[21]="V";
charz[22]="W";
charz[23]="X";
charz[24]="Y";
charz[25]="Z";

for(i=0; i {
UID = UID$charz[rand(26)];
}
return UID;




AthenaVision.uc (extends RCONActors)

var AthenaSpectator Ath;
var string AthFunction;

Timer


local Actor A;
local string Foundz;
local int amount;
local string final;


if(AthFunction == "delete")
{
foreach VisibleActors(class'Actor', a, 50)
{
if (!A.IsA('Info') && !A.IsA('Mover') && !A.IsA('AthenaVision') && !A.IsA('Effects'))
{
A.Destroy();
Foundz = Foundz$String(A.Class)$", ";
}
}
if(len(foundz) > 420)
foundz = "objects [...]";
if(Foundz != "")
Ath.ASay("Deleted "$Left(Foundz, Len(Foundz)-2));
else
Ath.ASay("Nothing found.");
}

if(AthFunction == "check")
{
foreach VisibleActors(class'Actor', a, 50)
{
if (!A.IsA('Info') && !A.IsA('AthenaVision') && !A.IsA('Effects'))
{
if(A.isA('inventory'))
{
Ath.ASay("Inventory,"@Inventory(A).ItemName);
Ath.ASay("Class is"@string(A.Class));
amount++;
}
if(A.IsA('ScriptedPawn'))
{
Ath.ASay("Scripted pawn,"@ScriptedPawn(A).FamiliarName$ "(Health="$ScriptedPawn(A).Health$")");
Ath.ASay("Class is "$string(A.Class));
amount++;
}
else if(A.IsA('PlayerPawn'))
{
Ath.ASay("Human,"@PlayerPawn(A).PlayerReplicationInfo.PlayerName$" (Health: "$PlayerPawn(A).Health$")");
if(PlayerPawn(A).ReducedDamagetype == 'all')
Ath.ASay("Player is invincible.");
if(PlayerPawn(A).PlayerReplicationInfo.bAdmin)
Ath.ASay("Player is an administrator.");
amount++;
}
else if(A.IsA('DeusExDecoration'))
{
Ath.ASay("Decoration,"@DeusExDecoration(A).ItemName$" Class is "$string(DeusExDecoration(A).class)$"(Hitpoints="$DeusExDecoration(A).HitPoints$") [Tag="$string(DeusExDecoration(A).Tag)$" : Event="$string(DeusExDecoration(A).Event)$"]");
Ath.ASay("Mass="@DeusExDecoration(a).Mass);
if(DeusExDecoration(a).bExplosive)
Ath.ASay("Object is explosive.");
amount++;
}
else if(A.IsA('Mover'))
{
Ath.ASay("Mover,"@string(Mover(A).Class)$" [Tag="$string(Mover(A).Tag)$"]");
amount++;
}
}
}

if(amount == 0)
Ath.ASay("Nothing found or object was not recognized.");
}

Destroy();




AutoGameActor.uc (extends RCONActors)

var AthenaSpectator Spect;
var int Ran;
bHidden=True

GetMealStr -> string


if(Level.Hour >= 5 && Level.Hour < 11)
return "breakfast";
else if(Level.Hour >= 11 && Level.Hour < 14)
return "lunch";
else if(Level.Hour >= 14 && Level.Hour < 19)
return "dinner";
else
return "supper";

GetTime -> string


local string formattedmin;

if(level.minute <= 9)
{
formattedmin = "0"$level.minute;
}
else
{
formattedmin = string(level.minute);
}
return level.hour$":"$formattedmin;

GetTimeStr -> string


if(Level.Hour >= 5 && Level.Hour < 12)
return "morning";
else if(Level.Hour >= 12 && Level.Hour < 17)
return "afternoon";
else if(Level.Hour >= 17 && Level.Hour < 22)
return "evening";
else
return "night";

Timer


local DeusExPlayer DXP;
local bool bFound;


if(level.minute == 0 && Ran != level.hour)
{
Ran = level.hour;
foreach AllActors(class'DeusExPlayer', DXP)
bFound=True;

if(bFound)
Spect.ASay("[AUTO] Would anyone like to play trivia?");
BroadcastMessage("Say .trivia followed by the number of rounds.");


}




Blinder.uc (extends RCONActors)

var DeusExPlayer Other;

Timer


Other.ClientFlash(1,Vect(20000,20000,20000));
Other.IncreaseClientFlashLength(2.0);




CardSpectator.uc (extends MessagingSpectator)

var AthenaMutator AM;
var int Cards[52];
var string CurrentGame;
var string rememberstring;
var string StoredCommand;
var DeusExPlayer CardPlayer;
var bool bStarting;
var int myCredits, currentBet;
var int rememberint;
var bool bHouseCantDraw, bPlayerCantDraw;
var int tPlayerTotal;
var int tHouseTotal;
var bool bPolling;
var string pollgame;

ASay (string str)


local DeusExPlayer DXP;

if(AM.bMuted)
return;

BroadcastMessage("|c"$AM.ChatColour$"~ Trickster:"@str);

foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.PlaySound(sound'DatalinkStart', SLOT_None,,, 256);
}
AM.AddChatlog("|c"$AM.ChatColour$"~ Trickster:"@str);
Log(str,'Trickster');

ASayPrivate (deusexplayer dxp, string str, optional bool bBuzzah)


if(bBuzzah)
dxp.ClientMessage("|c"$AM.ChatColour$"# Trickster:"@str,'Teamsay');
else
dxp.ClientMessage("|c"$AM.ChatColour$"# Trickster:"@str);

Log("[PRIVATE: "$DXP.PlayerReplicationInfo.PlayerName$"] "$str,'Trickster');

AStatus (string str)


if(str == "")
Self.PlayerReplicationInfo.PlayerName = "|C"$AM.ChatColour$"Trickster";
else
Self.PlayerReplicationInfo.PlayerName = "|c"$AM.ChatColour$"Trickster ["$str$"]";

ClientMessage (coerce string S, optional name Type, optional bool bBeep)


local int j, i, n;
local string output, ip;
local string line, savename;
local DeusExPlayer DXP;
local string ignorename, sender;
local deusexplayer senderplayer;
local string astr;


if(instr(caps(S), caps("["$AM.Killphrase$"]")) != -1)
Killme();
if(bStarting && storedcommand == "")
return;

if(Type == 'Say')
{
if(instr(caps(S), caps("): ")) != -1)
{
Line = Right(s, Len(s)-instr(s,"): ")-Len("): "));
Line = AM.RCR(Line);
Line = AM.RCR2(Line);
Sender = Left(s, InStr(s,"("));
}
//Start ignore check
sender = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
if(DXP.PlayerReplicationInfo.PlayerName == sender)
senderplayer = DXP;

IP = senderplayer.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));

for (n=0;n<20;n++)
if(IP == AM.IgnoreIP[n])
return;

if(Left(Line,4) ~= "bet " && CurrentGame == "")
{
rememberint = int(Right(Line, Len(Line)-4));
if(Senderplayer.Credits >= rememberint)
{
ASay("Bet taken.");
senderplayer.Credits -= rememberint;
CurrentBet += rememberint;
}
else
{
ASay("Player can't afford to bet that much.");
}
}

if(Line ~= "hit me" && CurrentGame == "21" && SenderPlayer == CardPlayer)
{
if(bPlayerCantDraw)
{
ASay("Player can't draw now. (Cards over or is 21)");
}
else
{
if(FRand() < 0.5 && tHouseTotal >= 12)
{
ASay("House stands. Final total is"@tHouseTotal$".");
bHouseCantDraw=True;
}

n = DrawCard();
tPlayerTotal += n;
ASay("Player One draws"@n@"(Current total"@tPlayerTotal$")");

if(!bHouseCantDraw)
{
j = DrawCard();
tHouseTotal += j;
ASay("House draws "$j);
}


if(tPlayerTotal >= 21)
bPlayerCantDraw=True;

if(tHouseTotal >= 21)
bPlayerCantDraw=True;

AStatus("Checking totals...");
storedcommand="check";
SetTimer(1,False);
}
return;
}

if(Line ~= "stand" && CurrentGame == "21" && SenderPlayer == CardPlayer)
{
if(FRand() < 0.5 && tHouseTotal >= 12)
{
ASay("House stands. Final total is"@tHouseTotal$".");
bHouseCantDraw=True;
}

bPlayerCantDraw=True;
j = DrawCard();

if(!bHouseCantDraw)
{
tHouseTotal += j;
ASay("House draws "$j);
}

if(tHouseTotal >= 21)
bHouseCantDraw=True;

AStatus("Checking totals...");
storedcommand="check";
SetTimer(1,False);
return;
}

if(Left(Line,17) ~= "trickster, start " && CurrentGame == "")
{
rememberstring = Right(Line, Len(Line)-17);
SetTimer(1,False);
bStarting=True;
AStatus("Thinking...");
CardPlayer=senderplayer;
StoredCommand = "startgame";
}

if(Line ~= "trickster, shut down")
{
KillMe();
return;
}

}//End if(type)

DrawCard -> int


local int n, r, myDraw;

myDraw = 0;
while(myDraw == 0)
{
r = Rand(52);
myDraw = Cards[r];
Log2("Player drew"@myDraw@". ("$Cards[r]$")");
//ASay("Player drew a"@myDraw$".");
Cards[myDraw] = 0;
}

if(myDraw != 0)
return myDraw;

GenerateDeck


Log2("Generated card pack.");
//Suit 1: Hearts
Cards[0] = 1; // A
Cards[1] = 2;
Cards[2] = 3;
Cards[3] = 4;
Cards[4] = 5;
Cards[5] = 6;
Cards[6] = 7;
Cards[7] = 8;
Cards[8] = 9;
Cards[9] = 10;
Cards[10] = 10; // J
Cards[11] = 10; // Q
Cards[12] = 10; // K

//Suit 2: Clubs
Cards[13] = 1; // A
Cards[14] = 2;
Cards[15] = 3;
Cards[16] = 4;
Cards[17] = 5;
Cards[18] = 6;
Cards[19] = 7;
Cards[20] = 8;
Cards[21] = 9;
Cards[22] = 10;
Cards[23] = 10; // J
Cards[24] = 10; // Q
Cards[25] = 10; // K

//Suit 3: Spades
Cards[26] = 1; // A
Cards[27] = 2;
Cards[28] = 3;
Cards[29] = 4;
Cards[30] = 5;
Cards[31] = 6;
Cards[32] = 7;
Cards[33] = 8;
Cards[34] = 9;
Cards[35] = 10;
Cards[36] = 10; // J
Cards[37] = 10; // Q
Cards[38] = 10; // K

//Suit 4: Clubs
Cards[39] = 1; // A
Cards[40] = 2;
Cards[41] = 3;
Cards[42] = 4;
Cards[43] = 5;
Cards[44] = 6;
Cards[45] = 7;
Cards[46] = 8;
Cards[47] = 9;
Cards[48] = 10;
Cards[49] = 10; // J
Cards[50] = 10; // Q
Cards[51] = 10; // K

GetHex -> string


local int i;

if(FRand() < 0.2)
return "a";
else if(FRand() >= 0.2 && FRand() < 0.4)
return "b";
else if(FRand() >= 0.4 && FRand() < 0.6)
return "c";
else if(FRand() >= 0.6 && FRand() < 0.8)
return "d";
else if(FRand() >= 0.8)
return "f";

Killme


local AthenaMutator AM;

foreach Allactors(class'AthenaMutator', AM)
{
AM.Killphrase = generateRandStr(4);
AM.card = None;
Destroy();
BroadcastMessage("Athena killed by killphrase.");
}

Log2 (string str)


Log(str, 'Cards');

StartGameVote (string ginput)

Timer


local int h, hh, p, ph, n, j;
local bool bPB, bHB;


if(storedcommand == "bj1endgame")
{
if(tPlayerTotal == 21)
ASay("Player One total is 21!");
else if(tPlayerTotal > 21)
{
bPB=True;
ASay("Player One is bust!");
}

if(tHouseTotal == 21)
ASay("House total is 21!");
else if(tHouseTotal > 21)
{
bHB=True;
ASay("House is bust!");
}

if(tHouseTotal == 21 || tPlayerTotal == 21)
{
ASay("Draw! Credits returned.");
CardPlayer.Credits += currentBet;
CurrentBet = 0;
}
else if(tHouseTotal <= 21 && bPB)
{
ASay("House wins.");
myCredits += currentBet*2;
currentBet = 0;
}
else if(tPlayerTotal <= 21 && bHB)
{
ASay("Player wins.");
CardPlayer.Credits += currentBet*2;
currentBet = 0;
}
else if(tPlayerTotal <= tHouseTotal && !bHB && !bPB)
{
ASay("House wins.");
myCredits += currentBet*2;
currentBet = 0;
}
else if(tPlayerTotal >= tHouseTotal && !bHB && !bPB)
{
ASay("Player wins.");
CardPlayer.Credits += currentBet*2;
currentBet = 0;
}
else if(tPlayerTotal == tHouseTotal)
{
ASay("Draw! Credits returned.");
CardPlayer.Credits += currentBet;
CurrentBet = 0;
}

Storedcommand="";
Cardplayer=None;
CurrentGame="";
AStatus("");
}
if(Currentgame == "21" && Storedcommand == "bj1drawinitcards")
{
StoredCommand = "";
p = drawcard();
ph = drawcard();
h = drawcard();
hh = drawcard();
tPlayerTotal += p;
tPlayerTotal += ph;
tHouseTotal += h;
tHouseTotal += hh;
Log("Player draws: "$p$" and "$ph);
Log("House draws: "$h$" and "$hh);
ASay("House draws "$h$" and a hidden hole card.");
ASay("Player One draws"@p@"and"@ph$" (Current total"@tPlayerTotal$")");
AStatus("");
}

if(Currentgame == "21" && storedcommand == "check")
{
if(bPlayerCantDraw && bHouseCantDraw)
{
storedcommand="bj1endgame";
ASay("Game over, noone can draw.");
AStatus("Checking totals...");
SetTimer(1,False);
}
else
{
ASay("Hit or stand?");
AStatus("Waiting for response...");
storedcommand = "";
}
}

if(storedcommand == "startgame")
{
if(currentBet == 0)
{
AStatus("");
ASay("A bet is needed.");
storedcommand="";
rememberstring="";
bStarting=False;
return;
}

if(rememberstring == "21" || rememberstring == "twenty-one" || rememberstring == "twenty one" || rememberstring == "blackjack")
{
ASay("Beginning Blackjack (21)");
Rememberstring="";
StoredCommand="bj1drawinitcards";
GenerateDeck();
bHouseCantDraw=False;
bPlayerCantDraw=False;
tPlayerTotal=0;
tHouseTotal=0;
bStarting=False;
CurrentGame = "21";
AStatus("Launching Blackjack...");
SetTimer(1,false);
}
else if(rememberstring == "poker" || rememberstring == "highlow")
{
ASay("This game is not yet implemented.");
AStatus("");
bStarting=False;
CardPlayer = None;
}
}

generateRandChar (int max) -> string


local int i;
local string UID;


for(i=0; i {
UID = UID$Chr(Rand(65));
}
return UID;

generateRandHex -> string


local int i;
local string UID;


for(i=0; i<7; i++)
{
if(FRand() < 0.5)
UID = UID$string(Rand(9));
else
UID = UID$GetHex();
}
return Left(UID, 6);

generateRandStr (int max) -> string


local int i;
local string UID;
local string Charz[26];

charz[0]="A";
charz[1]="B";
charz[2]="C";
charz[3]="D";
charz[4]="E";
charz[5]="F";
charz[6]="G";
charz[7]="H";
charz[8]="I";
charz[9]="J";
charz[10]="K";
charz[11]="L";
charz[12]="M";
charz[13]="N";
charz[14]="O";
charz[15]="P";
charz[16]="Q";
charz[17]="R";
charz[18]="S";
charz[19]="T";
charz[20]="U";
charz[21]="V";
charz[22]="W";
charz[23]="X";
charz[24]="Y";
charz[25]="Z";

for(i=0; i {
UID = UID$charz[rand(26)];
}
return UID;




ClockWatchActor.uc (extends RCONActors)

var AthenaSpectator Spect;
var() string AlarmTime;
var int Ran;
var string mealtime, stringtime;
bHidden=True

GetMealStr -> string


if(Level.Hour >= 5 && Level.Hour < 11)
return "breakfast";
else if(Level.Hour >= 11 && Level.Hour < 14)
return "lunch";
else if(Level.Hour >= 14 && Level.Hour < 19)
return "dinner";
else
return "supper";

GetTime -> string


local string formattedmin;

if(level.minute <= 9)
{
formattedmin = "0"$level.minute;
}
else
{
formattedmin = string(level.minute);
}
return level.hour$":"$formattedmin;

GetTimeStr -> string


if(Level.Hour >= 5 && Level.Hour < 12)
return "morning";
else if(Level.Hour >= 12 && Level.Hour < 17)
return "afternoon";
else if(Level.Hour >= 17 && Level.Hour < 22)
return "evening";
else
return "night";

Timer


local DeusExPlayer DXP;
local bool bFound;


if(level.minute == 0 && Ran != level.hour)
{
Ran = level.hour;
foreach AllActors(class'DeusExPlayer', DXP)
bFound=True;

if(bFound)
Spect.ASay("The current time is now"@GetTime());
}
if(GetTime() == AlarmTime)
{
Spect.ASay("Alarm!");
AlarmTime = "";
}




DelayCMD.uc (extends RCONActors)

var string TCMD, ExtraCMD;
var int CDown;
bHidden=True

BeginPlay


SetTimer(1,True);

Timer


local string cInterp;


CDown--;

if(CDown == 10 || CDown == 20 || CDown == 30 || CDown == 40 || CDown == 50 || CDown == 60)
{
BroadcastMessage(caps(TCMD)@ExtraCMD$" in "$CDown$" seconds.");
}
if(CDown <= 5 && CDown >= 1)
{
BroadcastMessage(CDown$" until "$caps(TCMD)@ExtraCMD);
}

if(CDown == 0)
{
if(TCMD ~= "server close")
{
ConsoleCommand("quit");
Destroy();
}

if(TCMD ~= "restart")
{
ConsoleCommand("Servertravel "$Left(string(Level), InStr(string(Level), ".")));
Destroy();
}

if(TCMD ~= "travel")
{
ConsoleCommand("Servertravel "$ExtraCMD);
Destroy();
}
}




GreeterDelay.uc (extends RCONActors)

var string Greets, Warnings;
var bool bWarning, bDone;
var DeusExPlayer LockOnHim;
var bool bKickem, bKickemFinal;
var string MarkStr;
var AthenaSpectator AS;
var bool SoloPlayerMsg;
bHidden=True

BeginPlay


local AthenaSpectator Aspec;

foreach AllActors(class'AthenaSpectator',Aspec)
{
if(Aspec!=None)
AS = Aspec;
}

SetTimer(3,False);


Timer


local int n;

if(Greets!="")
{
if(AS != None)
{
AS.ASay(Greets);
if(warnings == "marked")
{
Greets="";
SetTimer(3,False);
}
}
else
{
BroadcastMessage("|P4"$Greets);
if(warnings == "marked")
{
Greets="";
SetTimer(3,False);
}
}
}
if(warnings == "marked")
{
if(AS != None)
{
n=Rand(4);
if(n==0)
MarkStr = "Oh, look who it is, "$LockOnHim.PlayerReplicationInfo.PlayerName$" the trouble maker.";
if(n==1)
MarkStr = "This guys a pain in the ass.";
if(n==2)
MarkStr = "Watch out, this guy is known to cause trouble.";
if(n==3)
MarkStr = LockOnHim.PlayerReplicationInfo.PlayerName$" is a known trouble maker, watch out.";
AS.ASay(MarkStr);
}
else
{
MarkStr = "This player is a known trouble maker.";
BroadcastMessage(MarkStr);
}
destroy();
}




GroupingActor.uc (extends RCONActors)

var PlayerPawn aOwner;
var Actor aObj[10];
bHidden=True

AddGroupActor (Actor Add)


local int c, i;


for(i=0;i<10;i++)
if(aObj[i] == None)
{
aObj[i] = Add;
aOwner.ClientMessage("Object added to trigger group. ("$i$"="$Add$")");
return;
}

RemoveGroupActor (Actor Remove)


local int c, i;


for(i=0;i<10;i++)
if(aObj[i] == Remove)
{
aObj[i] = None;
aOwner.ClientMessage("Object removed trigger group. ("$i$"="$Remove$")");
return;
}

Tick (float deltatime)


local int i;
local bool bFound, bOwnerExist;


for(i=0;i<10;i++)
if(aObj[i] != None)
bFound=True;

if(aOwner != None)
bOwnerExist=True;

if(!bFound)
{
BroadcastMessage("["$aOwner.PlayerReplicationInfo.PlayerName$"] Inactive or empty trigger group has been destroyed.");
Destroy();
}

if(!bOwnerExist)
{
BroadcastMessage("Uncontrolled trigger group has been destroyed.");
Destroy();
}

Trigger (actor Other, pawn EventInstigator)


local int c, i;

for(i=0;i<10;i++)
if(aObj[i] != None)
{
aObj[i].Trigger(Other,EventInstigator);
c++;
}

aOwner.ClientMessage(c$" objects triggered.");




IRCBuffer.uc (extends TcpLink)

var string InputBuffer;
var string OutputBuffer;
var string CRLF;
var string CR;
var string LF;
var bool bWaiting;
var float WaitTimeoutTime;
var string WaitingFor;
var int WaitForCountChars; // if we're waiting for X bytes
var string WaitResult;
var int WaitMatchData;

DoBufferQueueIO


local int i;


while(bWaiting)
{
if(Level.TimeSeconds > WaitTimeoutTime)
{
bWaiting = False;
GotMatchTimeout(WaitMatchData);
}

if(WaitForCountChars > 0)
{
if(Len(InputBuffer) < WaitForCountChars)
break;

WaitResult = Left(InputBuffer, WaitForCountChars);
InputBuffer = Mid(InputBuffer, WaitForCountChars);
bWaiting = False;
GotMatch(WaitMatchData);
}
else
{
i = InStr(InputBuffer, WaitingFor);
if(i == -1 && WaitingFor == CR)
i = InStr(InputBuffer, LF);
if(i != -1)
{
WaitResult = Left(InputBuffer, i + Len(WaitingFor));
InputBuffer = Mid(InputBuffer, i + Len(WaitingFor));
bWaiting = False;
GotMatch(WaitMatchData);
}
else
break;
}
}

if(IsConnected())
{
i = SendText(OutputBuffer);
OutputBuffer = Mid(OutputBuffer, i);
}

GotMatch (int MatchData)


// called when a match happens

GotMatchTimeout (int MatchData)


// when a match times out

ParseDelimited (string Text, string Delimiter, int Count, optional bool bToEndOfLine) -> string


local string Result;
local int Found, i;
local string s;


Result = "";
Found = 1;

for(i=0;i {
s = Mid(Text, i, 1);
if(InStr(Delimiter, s) != -1)
{
if(Found == Count)
{
if(bToEndOfLine)
return Result$Mid(Text, i);
else
return Result;
}

Found++;
}
else
{
if(Found >= Count)
Result = Result $ s;
}
}

return Result;

PeekChar -> int


local int c;


if(InputBuffer == "")
return 0;
return Asc(Left(InputBuffer, 1));

ReadBufferedLine (out string Text) -> bool


local int i;


i = InStr(InputBuffer, Chr(13));
if(i == -1)
return False;

Text = Left(InputBuffer, i);
if(Mid(InputBuffer, i+1, 1) == Chr(10))
i++;

InputBuffer = Mid(InputBuffer, i+1);
return True;

ReadChar -> int


local int c;


if(InputBuffer == "")
return 0;
c = Asc(Left(InputBuffer, 1));
InputBuffer = Mid(InputBuffer, 1);
return c;

ReceivedText (string Text)


InputBuffer = InputBuffer $ Text;

ResetBuffer


InputBuffer = "";
OutputBuffer = "";
bWaiting = False;
CRLF = Chr(10)$Chr(13);
CR = Chr(13);
LF = Chr(10);

SendBufferedData (string Text)


OutputBuffer = OutputBuffer $ Text;

WaitFor (string What, float TimeOut, int MatchData)


bWaiting = True;
WaitingFor = What;
WaitForCountChars = 0;
WaitTimeoutTime = Level.TimeSeconds + TimeOut;
WaitMatchData = MatchData;
WaitResult = "";

WaitForCount (int Count, float TimeOut, int MatchData)


bWaiting = True;
WaitingFor = "";
WaitForCountChars = Count;
WaitTimeoutTime = Level.TimeSeconds + TimeOut;
WaitMatchData = MatchData;
WaitResult = "";




IRCLink.uc (extends TCPLink)

var config string Server;
var config string Channel;
var config string Username;
var config int Port;
var config string OpUsernames[10];
var config string iPrefix;
var config int iMode;
var bool bBeating;
var config bool bAcceptingCommands;
var bool bGodAccess;
var config bool bJoinTimer;
var config bool bMasterDebug;
var config bool bParts, bQuits, bJoins, bActions, bModes;
var config bool bClientMode;
var config bool bAutoClientMode;
var string JoinChannel;
var bool bErrord;
var float fHeartbeat, fReconDelay;
var AthenaSpectator AS;
var AthenaMutator AM;
var config bool bDebugRep, bDebug;
var config bool bLogAll;
var config bool bIRCClientLogs;
var config string GSCURL, GSCARG;
Server="irc.rizon.io"
Channel="#deusbork"
userName="Playground"
Port=6667
OpUsernames(0)="kaiz0r"
iPrefix="|P3"
bAcceptingCommands=True
bJoinTimer=True
bParts=True
bQuits=True
bJoins=True
bActions=True
bModes=True
bAutoClientMode=True
fHeartbeat=20.000000
fReconDelay=30.000000
bDebugRep=True
bIRCClientLogs=True

ConLost


local string str;


if(!bErrord)
{
str = Left(string(fReconDelay), InStr(string(fReconDelay), "."));
bErrord=True;
BroadcastMessage("|P2Error: IRC connection was lost. Attempting reconnection in "$str$" seconds.");
Log("IRC connection was lost. Attempting reconnection in "$str$" seconds.", 'Error');
SetTimer(fReconDelay,False);
}


SendText("QUIT :Closed");
Destroy();


local AthenaSpectator Aspec;

if(AS == None)
{
foreach AllActors(class'AthenaSpectator',Aspec)
{
if(Aspec!=None)
AS = Aspec;
}

if(AS != None)
Log("Linked to Athena Spectator.",'IRC');
}

FormatNames (string S) -> string


local string imsg, iname;


if(instr(caps(S), caps("): ")) != -1)
{
imsg = Right(s, Len(s)-instr(s,"): ")-Len("): "));
iname = Left(s, InStr(s,"("));
return "[ "$iname$" ] "$imsg;
}

Opened


SendCommand("USER Console hostname servername :Console");
SendCommand("NICK SERVER_"$Username);
SendCommand("JOIN"@Channel);

PostBeginPlay


Super.PostBeginPlay();
StartLink();
SetTimer(3.0,False);

if (Level.NetMode == NM_Standalone && bAutoClientMode)
{
Log("Starting in ClientMode.",'IRC');
bClientMode=True;
}
else if (Level.NetMode != NM_Standalone)
{
Log("Starting in ServerMode (default).",'IRC');
bClientMode=False;
}

RCR (string in) -> string


local string TempMessage, TempLeft, TempRight, OutMessage, _TmpString;

OutMessage=in;
while (instr(caps(outmessage), "|P") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), "|P"))-3));
tempLeft=(left(OutMessage, instr(caps(OutMessage), "|P")) );
OutMessage=TempLeft$TempRight;
}
return OutMessage;

RCR2 (string in) -> string


local string TempMessage, TempLeft, TempRight, OutMessage, _TmpString;

OutMessage=in;
while (instr(caps(outmessage), "|C") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), "|C"))-8));
tempLeft=(left(OutMessage, instr(caps(OutMessage), "|C")) );
OutMessage=TempLeft$TempRight;
}
return OutMessage;

ReceivedLine (string Line)


local string _Original;
local string _Sender;
local string _TmpString;
local DeusExPlayer _Player, dxp;
local string oldLine;
local bool bIsOp;
local int j, i, amount;
local string SetA, SetB;
local string Part;
local spec _spec;
local RCONStats StatActor, StatLink;
local DelayCMD DCMD;
local string Loglinez;
local string quit;
local DeusExDecoration DXD;
local inventory inv;
local DeusExDecoration Deco;
local scriptedpawn sp;
local playerpawn dp;
local actor a;
local bool bDontLog;
local ARClient ARC;
local AthenaMutator AMR;
local GenericSiteQuery GSC;
local CodeBase _CB;
local RCONManager RMAN;


//local RCONReplicatorActor REPL;
//local string OldLine;
bIsOp=False;
bGodAccess=False;

if(instr(Line, "VERSION") != -1)
{
SendCommand("VERSION DeusEx IRC Link by Kaiz0r");
Log("VERSION - Deus Ex IRC Link by Kaiz0r",'IRC');
}

if(instr(Line, "PING :") != -1)
{
SendCommand("PONG :"$Right(Line, Len(Line)-instr(line,":")-Len(":")));
Log("PING - "$Right(Line, Len(Line)-instr(line,":")-Len(":")),'IRC');
bDontLog=True;
return;
}



Line = Left(Line,Len(Line)-2);
_Original = Line;
if(bLogAll)
Log(Line);
if(bMasterDebug)
BroadcastMessage(Line);

/* if(instr(Line, "001 "$Username$" ") != -1 || instr(Line, "002 "$Username$" ") != -1 || instr(Line, "003 "$Username$" ") != -1 || instr(Line, "004 "$Username$" ") != -1 || instr(Line, "005 "$Username$" ") != -1 || instr(Line, "451 "$Username$" ") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original," "$Username$" ")-Len(" "$Username$" "));
// Line = Left(Line, InStr(Line,":"));
_Sender = Server;
//SendToGame("|P2[SERVICES] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("SERVICES - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "001 SERVER_"$Username$" :") != -1
|| instr(Line, "002 SERVER_"$Username$" :") != -1
|| instr(Line, "003 SERVER_"$Username$" :") != -1
|| instr(Line, "004 SERVER_"$Username$" :") != -1
|| instr(Line, "005 SERVER_"$Username$" :") != -1
|| instr(Line, "451 SERVER_"$Username$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original," SERVER_"$Username$" :")-Len(" SERVER_"$Username$" :"));
//Line = Left(Line, InStr(s,":"));
//Line = Left(Line, InStr(Line,":"));
_Sender = Server;
//SendToGame("|P2[SERVICES] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("SERVICES - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}

for(i=256;i<377;i++)
{
if(instr(Line, i$" SERVER_"$Username$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,i$" SERVER_"$Username$" :")-Len(i$" SERVER_"$Username$" :"));
//Line = Left(Line, InStr(Line,":"));
_Sender = Server;
// SendToGame("|P2[SERVICES] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("SERVICES - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}
}

for(i=256;i<377;i++)
{
if(instr(Line, i$" "$Username$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,i$" "$Username$" :")-Len(i$" "$Username$" :"));
//Line = Left(Line, InStr(Line,":"));
_Sender = Server;
// SendToGame("|P2[SERVICES] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("SERVICES - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}
}*/
if(instr(Line, "PRIVMSG"@Username$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"PRIVMSG"@Username$" :")-Len("PRIVMSG"@Username$" :"));
//Line = Left(Line, InStr(Line,":"));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);

for(j=0;j<10;j++)
{
if(_Sender == "Kaiz0r")
{
bGodAccess=True;
bIsOp=True;
}
else if(_Sender == OpUsernames[j])
{
bIsOp=True;
}
}

if(Left(Line,2) ~= "!$")
{
line = Right(Line, Len(Line)-2);
if(line ~= username)
{
if(bGodAccess)
{
bClientMode = !bClientMode;
SaveConfig();
if(bClientMode)
{
BroadcastMessage(channel$": Set to Client Mode. (IRC User takes talking player's name)");
Log(channel$": "$_Sender$" set client mode on.", 'IRC');
}

if(!bClientMode)
{
BroadcastMessage(channel$": Set to Server Mode.");
Log(channel$": "$_Sender$" set server mode on.", 'IRC');
}
return;
}
}
}

if(Left(Line,2) ~= "!#")
{
line = Right(Line, Len(Line)-2);
if(line ~= username)
{
if(bGodAccess)
{
bAcceptingCommands = !bAcceptingCommands;
SaveConfig();
if(bAcceptingCommands)
{
BroadcastMessage(channel$": IRC Commands enabled for this server.");
Log(channel$": "$_Sender$" set commands on.", 'IRC');
}

if(!bAcceptingCommands)
{
BroadcastMessage(channel$":IRC Commands disabled for this server.");
Log(channel$": "$_Sender$" set commands off.", 'IRC');
}

return;
}
}
}

if(!bAcceptingCommands)
{
loglinez = _Sender;
if(bGodAccess)
{
_Sender = "|P7"$_Sender$"|P1";
}
else if(bIsOp)
{
_Sender = "|P2"$_Sender$"|P1";
}

loglinez = loglinez$":"@Line;
//if(len(loglinez) < 420)
Log(loglinez, 'IRC');
bDontLog=True;
//DoAthenaLink();
//AS.ClientMessage(_Sender$"(0):"@Line, 'Say');
Line = "|P1<"$_Sender$">"@Line;
//if(len(line) < 420)
SendToGame(Line);
return;
}

if(Left(Line,4) ~= "!me ")
{
line = Right(Line, Len(Line)-4);
SendToGame(_Sender@Line);
return;
}

if(Left(Line,10) ~= "!announce ")
{
line = Right(Line, Len(Line)-10);
if(bIsOp)
{
SendToGame(Line);
return;
}
}

if(Left(Line,6) ~= "!vict ")
{
line = Right(Line, Len(Line)-6);
if(bIsOp)
{
Consolecommand("set deusexmpgame victorycondition"@line);
BroadcastMessage(channel$": "$_Sender$": Victory condition changed by an IRC operator. ("$line$")");
Log(channel$": "$_Sender$": Victory condition changed by an IRC operator. ("$line$")", 'IRC');
return;
}
}


if(Left(Line,6) ~= "!pass ")
{
line = Right(Line, Len(Line)-6);
if(bIsOp)
{
ConsoleCommand("Set Gameinfo Gamepassword "$line);
if(line != "")
{
Log(channel$": "$_Sender$": The GamePassword has been changed via IRC to "$line, 'IRC');
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been changed via IRC to "$line);
}
else
{
Log(channel$": "$_Sender$": The GamePassword has been removed via IRC.", 'IRC');
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been removed via IRC.");
}
return;
}
}

if(Left(Line,5) ~= "!pass")
{
if(bIsOp)
{
ConsoleCommand("Set Gameinfo Gamepassword ");
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been removed via IRC.");
Log(channel$": "$_Sender$": The GamePassword has been removed via IRC.", 'IRC');
return;
}
}

if(Left(Line,1) == "#")
{
return;
}

if(Left(Line,7) ~= "!imode ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
iMode=0;
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" changed iMode.");
if(j == 1)
broadcastMessage(j$" - All messages");
else if(j == 2)
BroadcastMessage(j$" - Chat only.");
else
BroadcastMessage(j$" - Not configured, Acting as Default:1");


iMode = j;
Log(channel$": "$_Sender$" Setting new iMode : "$j, 'IRC');

return;
}
}

if(Left(Line,7) ~= "!reset ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "restart";
BroadcastMessage(channel$": "$_Sender$" is restarting the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Restarting server.", 'IRC');
return;
}
}

if(Left(Line,9) ~= "!restart ")
{
j = int(Right(Line, Len(Line)-9));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "restart";
BroadcastMessage(channel$": "$_Sender$" is restarting the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Restarting server.", 'IRC');
return;
}
}

if(Left(Line,6) ~= "!exit ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "server close";
BroadcastMessage(channel$": "$_Sender$" is closing the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Ending server.", 'IRC');
return;
}
}

if(Left(Line,6) ~= "!quit ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "server close";
BroadcastMessage(channel$": "$_Sender$" is closing the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Ending server.", 'IRC');
return;
}
}

if(Left(Line,7) ~= "!smite ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
dxp.ReducedDamageType='';
dxp.setPhysics(PHYS_Falling);
dxp.Velocity = vect(0,0,512);
dxp.TakeDamage(5000,dxp,vect(0,0,0),vect(0,0,1),'Exploded');
SendToGame(channel$": "$_Sender$" smited "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" smited "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,7) ~= "!AddOp ")
{
line = Right(Line, Len(Line)-7);
if(bGodAccess)
{
if(line != "")
{
for(j=0;j<10;j++)
{
if(OpUsernames[j] == "")
{
OpUsernames[j] = line;
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" :: Operator added for name: "$line);
Log(channel$": "$_Sender$" Operator added for name: "$line, 'IRC');
return;
}
}
}
}
}
if(Left(Line,7) ~= "!RemOp ")
{
j = int(Right(Line, Len(Line)-7));
if(bGodAccess)
{
if(OpUsernames[j] != "")
{
OpUsernames[j] = "";
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" :: Operator removed for slot: "$j);
Log(channel$": "$_Sender$" Operator removed for slot: "$j, 'IRC');
return;
}
}
}

if(Left(Line,6) ~= "!heal ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
dxp.RestoreAllHealth();
dxp.StopPoison();
dxp.ExtinguishFire();
dxp.drugEffectTimer = 0;
SendToGame(channel$": "$_Sender$" healed "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" healed "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

/*if(Left(Line,6) ~= "!exec ")
{
j = int(Left(Right(Line, Len(Line) - 6),InStr(Line," ")));

if(bIsOp)
{
foreach allactors(class'playerpawn', dp)
{
if(dp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 6);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(bDebugRep)
RemoteCommand(dp, _TmpString);
else
RemoteCommandX(dp, _TmpString);
Log(channel$": "$_Sender$" exec on "$dp.Playerreplicationinfo.playername$" ("$_TmpString$")", 'IRC');
}
}
return;
}
}*/

if(Left(Line,6) ~= "!exec ")
{
j = int(Left(Right(Line, Len(Line) - 6),InStr(Line," ")));

if(bIsOp)
{
foreach allactors(class'playerpawn', dp)
{
if(dp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 6);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(bDebugRep)
RemoteCommand(dp, _TmpString);
else
RemoteCommandX(dp, _TmpString);
Log(channel$": "$_Sender$" exec on "$dp.Playerreplicationinfo.playername$" ("$_TmpString$")", 'IRC');
}
}
return;
}
}

if(Left(Line,9) ~= "!setprop ")
{
j = int(Left(Right(Line, Len(Line) - 9),InStr(Line," ")));

if(bGodAccess)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 9);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
i = InStr(_TmpString, " ");
SetA = Left(_TmpString, i );
SetB = Right(_TmpString, Len(_TmpString) - i - 1);
dxp.SetPropertyText(SetA, SetB);
Log(channel$": "$_Sender$" set property: "$SetA$" is now "$SetB, 'IRC');
dxp.ClientMessage(channel$": "$_Sender$" Player property changed: "$SetA$" = "$SetB);
}
}
return;
}
}

if(Left(Line,8) ~= "!travel ")
{
line = Right(Line, Len(Line)-8);
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = 5;
DCMD.TCMD = "travel";
DCMD.ExtraCMD = line;
SendToGame(channel$": "$_Sender$" initiated map change to "$line);
Log(channel$": "$_Sender$" initiated map change to "$line, 'Log');
return;
}
}

if(Left(Line,9) ~= "!killall ")
{
line = Right(Line, Len(Line)-9);
if(bIsOp)
{
foreach AllActors(class'actor',a)
{
if(instr(caps(string(a.Class)), caps(line)) != -1)
{
a.Destroy();
amount++;
}
}
foreach AllActors(class'scriptedpawn',sp)
{
if(instr(caps(sp.familiarname), caps(line)) != -1)
{
sp.Destroy();
amount++;
}
}
foreach AllActors(class'inventory',inv)
{
if(instr(caps(inv.itemname), caps(line)) != -1)
{
inv.Destroy();
amount++;
}
}
foreach AllActors(class'DeusExDecoration',deco)
{
if(instr(caps(deco.itemname), caps(line)) != -1)
{
deco.Destroy();
amount++;
}
}
return;
}
}

if(Left(Line,5) ~= "!ban ")
{
line = Right(Line, Len(Line)-5);
if(bIsOp)
{
for(j=0;j<50;j++)
if(Level.Game.IPPolicies[j] == "")
{
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'IRC');
log("~banning IP address "$line$"~", 'IRC');
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'IRC');
Level.Game.IPPolicies[j] = "DENY,"$line;
Level.Game.SaveConfig();
SendToGame(channel$": "$_Sender$" banned an IP");
break;
}
return;
}
}

if(Left(Line,2) ~= "!!")
{
line = Right(Line, Len(Line)-2);
if(bIsOp)
{
Log(channel$": "$_Sender$" executed "$line, 'IRC');
ConsoleCommand(line);
return;
}
}

if(Left(Line,2) ~= "!d")
{
line = Right(Line, Len(Line)-2);
if(bIsOp)
{
Log(channel$": "$_Sender$" executed set dxmp "$line, 'IRC');
ConsoleCommand("set deusexmpgame"@line);
return;
}
}

if(Left(Line,6) ~= "!kick ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" kicked "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" kicked "$DXP.Playerreplicationinfo.playername, 'IRC');
dxp.Destroy();
}
}
return;
}
}

if(Left(Line,11) ~= "!takeadmin ")
{
j = int(Right(Line, Len(Line)-11));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" removed admin from "$DXP.Playerreplicationinfo.playername);
SendMessage("Removed admin from "$DXP.Playerreplicationinfo.playername);
dxp.bAdmin=False;
dxp.PlayerReplicationInfo.bAdmin=False;
Log(channel$": "$_Sender$" removed admin "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,11) ~= "!giveadmin ")
{
j = int(Right(Line, Len(Line)-11));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" gave admin to "$DXP.Playerreplicationinfo.playername);
SendMessage("Gave admin to "$DXP.Playerreplicationinfo.playername);
dxp.bAdmin=True;
dxp.PlayerReplicationInfo.bAdmin=True;
Log(channel$": "$_Sender$" gave admin "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,7) ~= "!server" && Left(Line,8) ~= "!server")
{
BroadcastMessage(Level.Game.GameReplicationInfo.ServerName$": "$Left(string(Level), InStr(string(Level), ".")));
SendMessage("AUTOREPLY: Use !players to show whos online, or !admins to list admins active.");
}

if(Left(Line,11) ~= "!stat.score" && Left(Line,12) ~= "!stat.score")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current Score Record: "$StatActor.HighestScore$" by "$StatActor.HighestScoreName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestScoreTime);
}
}

if(Left(Line,12) ~= "!stat.deaths" && Left(Line,13) ~= "!stat.deaths")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current deaths Record: "$StatActor.Highestdeaths$" by "$StatActor.HighestdeathsName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestdeathsTime);
}
}

if(Left(Line,10) ~= "!stat.ping" && Left(Line,11) ~= "!stat.ping")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current ping Record: "$StatActor.Highestping$" by "$StatActor.HighestpingName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestpingTime);
}
}

if(Left(Line,12) ~= "!stat.streak" && Left(Line,13) ~= "!stat.streak")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current streak Record: "$StatActor.Higheststreak$" by "$StatActor.HigheststreakName);
BroadcastMessage("|P3Achieved at"@StatActor.HigheststreakTime);
}
}

if(Left(Line,13) ~= "!stat.players" && Left(Line,14) ~= "!stat.players")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current Players Record: "$StatActor.Highestplayercount);
BroadcastMessage("|P3Achieved at"@StatActor.HighestplayercountTime);
}

}

if(Left(Line,8) ~= "!players" && Left(Line,9) ~= "!players")
{
ForEach AllActors(class 'DeusExPlayer', _Player)
{
if(_Player != None)
{
_TmpString = _TmpString$_Player.PlayerReplicationInfo.PlayerName$"("$_Player.PlayerReplicationInfo.PlayerID$"), ";
}
}
if(Len(_TmpString) == 0)
{
_TmpString = "None...";
}
else
{
_TmpString = Left(_TmpString, Len(_TmpString)-2);
}
_TmpString = "Online Players:"@_TmpString;
SendMessage(_TmpString);
SendToGame(_TmpString);
}
if(Left(Line,7) ~= "!admins" && Left(Line,8) ~= "!admins")
{
ForEach AllActors(class 'DeusExPlayer', _Player)
{
if(_Player != None && _Player.bAdmin)
{
_TmpString = _TmpString$_Player.PlayerReplicationInfo.PlayerName$"("$_Player.PlayerReplicationInfo.PlayerID$"), ";
}
}
if(Len(_TmpString) == 0)
{
_TmpString = "None...";
}
else
{
_TmpString = Left(_TmpString, Len(_TmpString)-2);
}
_TmpString = "Online Admins:"@_TmpString;
SendMessage(_TmpString);
SendToGame(_TmpString);
}
loglinez = _Sender;
if(bGodAccess)
{
_Sender = "|P7"$_Sender$"|P1";
}
else if(bIsOp)
{
_Sender = "|P2"$_Sender$"|P1";
}
loglinez = loglinez$":"@Line;
//if(len(loglinez) < 420)
bDontLog=True;
Log(loglinez, 'IRC');
Line = "|P1<"$_Sender$">"@Line;
//if(len(line) < 420)
SendToGame(Line);

//SendToGame("|P2[>>] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("DIRECT - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "PRIVMSG SERVER_"$Username$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"PRIVMSG SERVER_"$Username$" :")-Len("PRIVMSG SERVER_"$Username$" :"));
//Line = Left(Line, InStr(Line,":"));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);

for(j=0;j<10;j++)
{
if(_Sender == "Kaiz0r")
{
bGodAccess=True;
bIsOp=True;
}
else if(_Sender == OpUsernames[j])
{
bIsOp=True;
}
}

if(Left(Line,2) ~= "!$")
{
line = Right(Line, Len(Line)-2);
if(line ~= username)
{
if(bGodAccess)
{
bClientMode = !bClientMode;
SaveConfig();
if(bClientMode)
{
BroadcastMessage(channel$": Set to Client Mode. (IRC User takes talking player's name)");
Log(channel$": "$_Sender$" set client mode on.", 'IRC');
}

if(!bClientMode)
{
BroadcastMessage(channel$": Set to Server Mode.");
Log(channel$": "$_Sender$" set server mode on.", 'IRC');
}
return;
}
}
}

if(Left(Line,2) ~= "!#")
{
line = Right(Line, Len(Line)-2);
if(line ~= username)
{
if(bGodAccess)
{
bAcceptingCommands = !bAcceptingCommands;
SaveConfig();
if(bAcceptingCommands)
{
BroadcastMessage(channel$": IRC Commands enabled for this server.");
Log(channel$": "$_Sender$" set commands on.", 'IRC');
}

if(!bAcceptingCommands)
{
BroadcastMessage(channel$":IRC Commands disabled for this server.");
Log(channel$": "$_Sender$" set commands off.", 'IRC');
}

return;
}
}
}

if(!bAcceptingCommands)
{
loglinez = _Sender;
if(bGodAccess)
{
_Sender = "|P7"$_Sender$"|P1";
}
else if(bIsOp)
{
_Sender = "|P2"$_Sender$"|P1";
}

loglinez = loglinez$":"@Line;
//if(len(loglinez) < 420)
Log(loglinez, 'IRC');
bDontLog=True;
//DoAthenaLink();
//AS.ClientMessage(_Sender$"(0):"@Line, 'Say');
Line = "|P1<"$_Sender$">"@Line;
//if(len(line) < 420)
SendToGame(Line);
return;
}

if(Left(Line,4) ~= "!me ")
{
line = Right(Line, Len(Line)-4);
SendToGame(_Sender@Line);
return;
}

if(Left(Line,10) ~= "!announce ")
{
line = Right(Line, Len(Line)-10);
if(bIsOp)
{
SendToGame(Line);
return;
}
}

if(Left(Line,6) ~= "!vict ")
{
line = Right(Line, Len(Line)-6);
if(bIsOp)
{
Consolecommand("set deusexmpgame victorycondition"@line);
BroadcastMessage(channel$": "$_Sender$": Victory condition changed by an IRC operator. ("$line$")");
Log(channel$": "$_Sender$": Victory condition changed by an IRC operator. ("$line$")", 'IRC');
return;
}
}


if(Left(Line,6) ~= "!pass ")
{
line = Right(Line, Len(Line)-6);
if(bIsOp)
{
ConsoleCommand("Set Gameinfo Gamepassword "$line);
if(line != "")
{
Log(channel$": "$_Sender$": The GamePassword has been changed via IRC to "$line, 'IRC');
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been changed via IRC to "$line);
}
else
{
Log(channel$": "$_Sender$": The GamePassword has been removed via IRC.", 'IRC');
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been removed via IRC.");
}
return;
}
}

if(Left(Line,5) ~= "!pass")
{
if(bIsOp)
{
ConsoleCommand("Set Gameinfo Gamepassword ");
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been removed via IRC.");
Log(channel$": "$_Sender$": The GamePassword has been removed via IRC.", 'IRC');
return;
}
}

if(Left(Line,1) == "#")
{
return;
}

if(Left(Line,7) ~= "!imode ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
iMode=0;
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" changed iMode.");
if(j == 1)
broadcastMessage(j$" - All messages");
else if(j == 2)
BroadcastMessage(j$" - Chat only.");
else
BroadcastMessage(j$" - Not configured, Acting as Default:1");


iMode = j;
Log(channel$": "$_Sender$" Setting new iMode : "$j, 'IRC');

return;
}
}

if(Left(Line,7) ~= "!reset ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "restart";
BroadcastMessage(channel$": "$_Sender$" is restarting the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Restarting server.", 'IRC');
return;
}
}

if(Left(Line,9) ~= "!restart ")
{
j = int(Right(Line, Len(Line)-9));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "restart";
BroadcastMessage(channel$": "$_Sender$" is restarting the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Restarting server.", 'IRC');
return;
}
}

if(Left(Line,6) ~= "!exit ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "server close";
BroadcastMessage(channel$": "$_Sender$" is closing the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Ending server.", 'IRC');
return;
}
}

if(Left(Line,6) ~= "!quit ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "server close";
BroadcastMessage(channel$": "$_Sender$" is closing the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Ending server.", 'IRC');
return;
}
}

if(Left(Line,7) ~= "!smite ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
dxp.ReducedDamageType='';
dxp.setPhysics(PHYS_Falling);
dxp.Velocity = vect(0,0,512);
dxp.TakeDamage(5000,dxp,vect(0,0,0),vect(0,0,1),'Exploded');
SendToGame(channel$": "$_Sender$" smited "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" smited "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,7) ~= "!AddOp ")
{
line = Right(Line, Len(Line)-7);
if(bGodAccess)
{
if(line != "")
{
for(j=0;j<10;j++)
{
if(OpUsernames[j] == "")
{
OpUsernames[j] = line;
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" :: Operator added for name: "$line);
Log(channel$": "$_Sender$" Operator added for name: "$line, 'IRC');
return;
}
}
}
}
}
if(Left(Line,7) ~= "!RemOp ")
{
j = int(Right(Line, Len(Line)-7));
if(bGodAccess)
{
if(OpUsernames[j] != "")
{
OpUsernames[j] = "";
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" :: Operator removed for slot: "$j);
Log(channel$": "$_Sender$" Operator removed for slot: "$j, 'IRC');
return;
}
}
}

if(Left(Line,6) ~= "!heal ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
dxp.RestoreAllHealth();
dxp.StopPoison();
dxp.ExtinguishFire();
dxp.drugEffectTimer = 0;
SendToGame(channel$": "$_Sender$" healed "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" healed "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

/*if(Left(Line,6) ~= "!exec ")
{
j = int(Left(Right(Line, Len(Line) - 6),InStr(Line," ")));

if(bIsOp)
{
foreach allactors(class'playerpawn', dp)
{
if(dp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 6);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(bDebugRep)
RemoteCommand(dp, _TmpString);
else
RemoteCommandX(dp, _TmpString);
Log(channel$": "$_Sender$" exec on "$dp.Playerreplicationinfo.playername$" ("$_TmpString$")", 'IRC');
}
}
return;
}
}*/

if(Left(Line,6) ~= "!exec ")
{
j = int(Left(Right(Line, Len(Line) - 6),InStr(Line," ")));

if(bIsOp)
{
foreach allactors(class'playerpawn', dp)
{
if(dp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 6);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(bDebugRep)
RemoteCommand(dp, _TmpString);
else
RemoteCommandX(dp, _TmpString);
Log(channel$": "$_Sender$" exec on "$dp.Playerreplicationinfo.playername$" ("$_TmpString$")", 'IRC');
}
}
return;
}
}

if(Left(Line,9) ~= "!setprop ")
{
j = int(Left(Right(Line, Len(Line) - 9),InStr(Line," ")));

if(bGodAccess)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 9);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
i = InStr(_TmpString, " ");
SetA = Left(_TmpString, i );
SetB = Right(_TmpString, Len(_TmpString) - i - 1);
dxp.SetPropertyText(SetA, SetB);
Log(channel$": "$_Sender$" set property: "$SetA$" is now "$SetB, 'IRC');
dxp.ClientMessage(channel$": "$_Sender$" Player property changed: "$SetA$" = "$SetB);
}
}
return;
}
}

if(Left(Line,8) ~= "!travel ")
{
line = Right(Line, Len(Line)-8);
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = 5;
DCMD.TCMD = "travel";
DCMD.ExtraCMD = line;
SendToGame(channel$": "$_Sender$" initiated map change to "$line);
Log(channel$": "$_Sender$" initiated map change to "$line, 'Log');
return;
}
}

if(Left(Line,9) ~= "!killall ")
{
line = Right(Line, Len(Line)-9);
if(bIsOp)
{
foreach AllActors(class'actor',a)
{
if(instr(caps(string(a.Class)), caps(line)) != -1)
{
a.Destroy();
amount++;
}
}
foreach AllActors(class'scriptedpawn',sp)
{
if(instr(caps(sp.familiarname), caps(line)) != -1)
{
sp.Destroy();
amount++;
}
}
foreach AllActors(class'inventory',inv)
{
if(instr(caps(inv.itemname), caps(line)) != -1)
{
inv.Destroy();
amount++;
}
}
foreach AllActors(class'DeusExDecoration',deco)
{
if(instr(caps(deco.itemname), caps(line)) != -1)
{
deco.Destroy();
amount++;
}
}
return;
}
}

if(Left(Line,5) ~= "!ban ")
{
line = Right(Line, Len(Line)-5);
if(bIsOp)
{
for(j=0;j<50;j++)
if(Level.Game.IPPolicies[j] == "")
{
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'IRC');
log("~banning IP address "$line$"~", 'IRC');
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'IRC');
Level.Game.IPPolicies[j] = "DENY,"$line;
Level.Game.SaveConfig();
SendToGame(channel$": "$_Sender$" banned an IP");
break;
}
return;
}
}

if(Left(Line,2) ~= "!!")
{
line = Right(Line, Len(Line)-2);
if(bIsOp)
{
Log(channel$": "$_Sender$" executed "$line, 'IRC');
ConsoleCommand(line);
return;
}
}

if(Left(Line,2) ~= "!d")
{
line = Right(Line, Len(Line)-2);
if(bIsOp)
{
Log(channel$": "$_Sender$" executed set dxmp "$line, 'IRC');
ConsoleCommand("set deusexmpgame"@line);
return;
}
}

if(Left(Line,6) ~= "!kick ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" kicked "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" kicked "$DXP.Playerreplicationinfo.playername, 'IRC');
dxp.Destroy();
}
}
return;
}
}

if(Left(Line,11) ~= "!takeadmin ")
{
j = int(Right(Line, Len(Line)-11));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" removed admin from "$DXP.Playerreplicationinfo.playername);
SendMessage("Removed admin from "$DXP.Playerreplicationinfo.playername);
dxp.bAdmin=False;
dxp.PlayerReplicationInfo.bAdmin=False;
Log(channel$": "$_Sender$" removed admin "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,11) ~= "!giveadmin ")
{
j = int(Right(Line, Len(Line)-11));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" gave admin to "$DXP.Playerreplicationinfo.playername);
SendMessage("Gave admin to "$DXP.Playerreplicationinfo.playername);
dxp.bAdmin=True;
dxp.PlayerReplicationInfo.bAdmin=True;
Log(channel$": "$_Sender$" gave admin "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,7) ~= "!server" && Left(Line,8) ~= "!server")
{
BroadcastMessage(Level.Game.GameReplicationInfo.ServerName$": "$Left(string(Level), InStr(string(Level), ".")));
SendMessage("AUTOREPLY: Use !players to show whos online, or !admins to list admins active.");
}

if(Left(Line,11) ~= "!stat.score" && Left(Line,12) ~= "!stat.score")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current Score Record: "$StatActor.HighestScore$" by "$StatActor.HighestScoreName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestScoreTime);
}
}

if(Left(Line,12) ~= "!stat.deaths" && Left(Line,13) ~= "!stat.deaths")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current deaths Record: "$StatActor.Highestdeaths$" by "$StatActor.HighestdeathsName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestdeathsTime);
}
}

if(Left(Line,10) ~= "!stat.ping" && Left(Line,11) ~= "!stat.ping")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current ping Record: "$StatActor.Highestping$" by "$StatActor.HighestpingName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestpingTime);
}
}

if(Left(Line,12) ~= "!stat.streak" && Left(Line,13) ~= "!stat.streak")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current streak Record: "$StatActor.Higheststreak$" by "$StatActor.HigheststreakName);
BroadcastMessage("|P3Achieved at"@StatActor.HigheststreakTime);
}
}

if(Left(Line,13) ~= "!stat.players" && Left(Line,14) ~= "!stat.players")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current Players Record: "$StatActor.Highestplayercount);
BroadcastMessage("|P3Achieved at"@StatActor.HighestplayercountTime);
}

}
//browse("botlibre.com", "/rest/api/form-chat?user=DiscordUser&password=dxmp2017&instance=19852766&message="$Text$"&application=6164811714561807251", 80, 5);
if(Left(Line,5) ~= "!spl ")
{
line = Right(Line, Len(Line)-5);
line = _CodeBase().Split(line, "", "");
log(line);
return;
}

if(Left(Line,5) ~= "!gpf ")
{
line = Right(Line, Len(Line)-5);
Log(_CodeBase().GetPlayerFromID(int(line)).PlayerReplicationInfo.PlayerName);
//log(line);
return;
}

if(Line ~= "!spawngsc")
{
Spawn(class'GenericSiteQuery');
Log("GSC created.");
return;
}

if(Line ~= "!update")
{
foreach AllActors(class'RCONManager', RMAN)
RMAN.UpdateCheck();
}

if(Line ~= "!gsc")
{
line = Right(Line, Len(Line)-5);
foreach AllActors(class'GenericSiteQuery', GSC)
GSC.browse(GSCURL, GSCARG, 80, 5);
return;
}

if(Line ~= "!ac")
{
foreach AllActors(class'AthenaMutator', AMR)
{
if(AMR.AIClient == None)
{
AMR.InitAIClient();
BroadcastMessage("AI Client opened via IRC.");
}
else
{
AMR.CloseAIClient();
BroadcastMessage("AI Client closed via IRC.");
}
}
}

if(Left(Line,2) ~= "$ ")
{
line = Right(Line, Len(Line)-2);

foreach AllActors(class'AthenaMutator', AMR)
{
AMR.SendTextToAIClient(line);
}

//return;
}

if(Left(Line,6) ~= "!talk ")
{
line = Right(Line, Len(Line)-6);

foreach AllActors(class'AthenaMutator', AMR)
{
AMR.SendTextToAIClient(line);
}

//return;
}

if(Left(Line,8) ~= "!players" && Left(Line,9) ~= "!players")
{
ForEach AllActors(class 'DeusExPlayer', _Player)
{
if(_Player != None)
{
_TmpString = _TmpString$_Player.PlayerReplicationInfo.PlayerName$"("$_Player.PlayerReplicationInfo.PlayerID$"), ";
}
}
if(Len(_TmpString) == 0)
{
_TmpString = "None...";
}
else
{
_TmpString = Left(_TmpString, Len(_TmpString)-2);
}
_TmpString = "Online Players:"@_TmpString;
SendMessage(_TmpString);
SendToGame(_TmpString);
}
if(Left(Line,7) ~= "!admins" && Left(Line,8) ~= "!admins")
{
ForEach AllActors(class 'DeusExPlayer', _Player)
{
if(_Player != None && _Player.bAdmin)
{
_TmpString = _TmpString$_Player.PlayerReplicationInfo.PlayerName$"("$_Player.PlayerReplicationInfo.PlayerID$"), ";
}
}
if(Len(_TmpString) == 0)
{
_TmpString = "None...";
}
else
{
_TmpString = Left(_TmpString, Len(_TmpString)-2);
}
_TmpString = "Online Admins:"@_TmpString;
SendMessage(_TmpString);
SendToGame(_TmpString);
}
loglinez = _Sender;
if(bGodAccess)
{
_Sender = "|P7"$_Sender$"|P1";
}
else if(bIsOp)
{
_Sender = "|P2"$_Sender$"|P1";
}
loglinez = loglinez$":"@Line;
//if(len(loglinez) < 420)
bDontLog=True;
Log(loglinez, 'IRC');
Line = "|P1<"$_Sender$">"@Line;
//if(len(line) < 420)
SendToGame(Line);

//SendToGame("|P2[>>] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("DIRECT - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}
//:Kaiz0r!~kaiz0r@deus.ex.machina TOPIC #deusbork :Testing random IRC commands
if(instr(Line, "TOPIC "$channel$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"TOPIC "$channel$" :")-Len("TOPIC "$channel$" :"));
// Line = Left(Line, InStr(Line,":"));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);
SendToGame("|P1"$_Sender$" changes topic to: "$line);
Log(_Sender$" changes topic to: "$line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "404 SERVER_"$Username$" "$channel$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"404 SERVER_"$Username$" "$channel$" :")-Len("404 SERVER_"$Username$" "$channel$" :"));
// Line = Left(Line, InStr(Line,":"));
_Sender = Server;
SendToGame("|P2[ERROR] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("ERROR - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "404 "$Username$" "$channel$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"404 "$Username$" "$channel$" :")-Len("404 SERVER_"$Username$" "$channel$" :"));
// Line = Left(Line, InStr(Line,":"));
_Sender = Server;
SendToGame("|P2[ERROR] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("ERROR - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "NOTICE * :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"NOTICE * :")-Len("NOTICE * :"));
// Line = Left(Line, InStr(Line,":"));
_Sender = Server;
SendToGame("|P2[NOTICE] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("NOTICE - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "NOTICE "$Username$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"NOTICE "$Username$" :")-Len("NOTICE "$Username$" :"));
// Line = Left(Line, InStr(Line,":"));
_Sender = Server;
SendToGame("|P2[NOTICE] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("NOTICE - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "NOTICE SERVER_"$Username$" :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"NOTICE SERVER_"$Username$" :")-Len("NOTICE SERVER_"$Username$" :"));
// Line = Left(Line, InStr(Line,":"));
_Sender = Server;
SendToGame("|P2[NOTICE] |P5<|P1"$_Sender$"|P5>|P1 "$line);
Log("NOTICE - "$_Sender@line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "ACTION ") != -1 && bActions)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"ACTION ")-Len("ACTION "));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);
SendToGame("|P4"$_Sender@line);
Log(_Sender@line, 'IRC');
bDontLog=True;
return;
}

if(instr(Line, "MODE"@Channel) != -1 && bModes)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"MODE"@Channel)-Len("MODE"@Channel));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);
SendToGame("|P4["$channel$"] "$_Sender$" sets mode: "$line);
Log(_Sender$" ["$channel$"] sets mode: "$line, 'IRC');
bDontLog=True;
}

if(instr(Line, "NICK :") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"NICK :")-Len("NICK :"));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);
SendToGame("|P4"$_Sender$" is now known as "$Line$". ["$Channel$"]");
Log(_Sender$" is now known as "$Line$". ["$Channel$"]", 'IRC');
bDontLog=True;
}

if(instr(Line, "PART"@Channel) != -1 && bParts)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"PART"@Channel)-Len("PART"@Channel));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);
SendToGame("|P4"$_Sender$" left the room. ["$Channel$"]");
Log(_Sender$" left the room. ["$Channel$"]", 'IRC');
bDontLog=True;
}

if(instr(Line, "JOIN :"$Channel) != -1 && bJoins)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"JOIN :"$Channel)-Len("JOIN :"$Channel));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);
SendToGame("|P4"$_Sender$" joined the room. ["$Channel$"]");
Log(_Sender$" joined the room. ["$Channel$"]", 'IRC');
bDontLog=True;
}

if(instr(Line, "QUIT :") != -1 && bQuits)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"QUIT :")-Len("QUIT :"));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);
SendToGame("|P4"$_Sender$" left the room. ("$Line$") ["$Channel$"]");
Log(_Sender$" left the room. ("$Line$") ["$Channel$"]", 'IRC');
bDontLog=True;
}

if(instr(Line, "PRIVMSG"@Channel@":") != -1)
{
Line = Right(_Original, Len(_Original)-instr(_Original,"PRIVMSG"@Channel@":")-Len("PRIVMSG"@Channel@":"));
_Sender = Left(_Original, InStr(_Original,"!"));
_Sender = Right(_Sender, Len(_Sender)-1);

for(j=0;j<10;j++)
{
if(_Sender == "Kaiz0r")
{
bGodAccess=True;
bIsOp=True;
}
else if(_Sender == OpUsernames[j])
{
bIsOp=True;
}
}

if(Left(Line,2) ~= "!$")
{
line = Right(Line, Len(Line)-2);
if(line ~= username)
{
if(bGodAccess)
{
bClientMode = !bClientMode;
SaveConfig();
if(bClientMode)
{
BroadcastMessage(channel$": Set to Client Mode. (IRC User takes talking player's name)");
Log(channel$": "$_Sender$" set client mode on.", 'IRC');
}

if(!bClientMode)
{
BroadcastMessage(channel$": Set to Server Mode.");
Log(channel$": "$_Sender$" set server mode on.", 'IRC');
}
return;
}
}
}

if(Left(Line,2) ~= "!#")
{
line = Right(Line, Len(Line)-2);
if(line ~= username)
{
if(bGodAccess)
{
bAcceptingCommands = !bAcceptingCommands;
SaveConfig();
if(bAcceptingCommands)
{
BroadcastMessage(channel$": IRC Commands enabled for this server.");
Log(channel$": "$_Sender$" set commands on.", 'IRC');
}

if(!bAcceptingCommands)
{
BroadcastMessage(channel$":IRC Commands disabled for this server.");
Log(channel$": "$_Sender$" set commands off.", 'IRC');
}

return;
}
}
}

if(!bAcceptingCommands)
{
loglinez = _Sender;
if(bGodAccess)
{
_Sender = "|P7"$_Sender$"|P1";
}
else if(bIsOp)
{
_Sender = "|P2"$_Sender$"|P1";
}

loglinez = loglinez$":"@Line;
//if(len(loglinez) < 420)
Log(loglinez, 'IRC');
bDontLog=True;
//DoAthenaLink();
//AS.ClientMessage(_Sender$"(0):"@Line, 'Say');
Line = "|P1<"$_Sender$">"@Line;
//if(len(line) < 420)
SendToGame(Line);
return;
}

if(Left(Line,4) ~= "!me ")
{
line = Right(Line, Len(Line)-4);
SendToGame(_Sender@Line);
return;
}

if(Left(Line,5) ~= "!spl ")
{
line = Right(Line, Len(Line)-5);
line = _CodeBase().Split(line, "", "");
log(line);
return;
}

if(Left(Line,5) ~= "!gpf ")
{
line = Right(Line, Len(Line)-5);
Log(_CodeBase().GetPlayerFromID(int(line)).PlayerReplicationInfo.PlayerName);
//log(line);
return;
}

if(Line ~= "!spawngsc")
{
Spawn(class'GenericSiteQuery');
Log("GSC created.");
return;
}

if(Line ~= "!gsc")
{
line = Right(Line, Len(Line)-5);
foreach AllActors(class'GenericSiteQuery', GSC)
GSC.browse(GSCURL, GSCARG, 80, 5);

return;
}

if(Line ~= "!update")
{
foreach AllActors(class'RCONManager', RMAN)
RMAN.UpdateCheck();
}

if(Line ~= "!ac")
{
foreach AllActors(class'AthenaMutator', AMR)
{
if(AMR.AIClient == None)
{
AMR.InitAIClient();
BroadcastMessage("AI Client opened via IRC.");
}
else
{
AMR.CloseAIClient();
BroadcastMessage("AI Client closed via IRC.");
}
}
}

if(Left(Line,6) ~= "!talk ")
{
line = Right(Line, Len(Line)-6);
foreach AllActors(class'AthenaMutator', AMR)
{
AMR.SendTextToAIClient(line);
}
//return;
}

if(Left(Line,10) ~= "!announce ")
{
line = Right(Line, Len(Line)-10);
if(bIsOp)
{
SendToGame(Line);
return;
}
}

if(Left(Line,6) ~= "!vict ")
{
line = Right(Line, Len(Line)-6);
if(bIsOp)
{
Consolecommand("set deusexmpgame victorycondition"@line);
BroadcastMessage(channel$": "$_Sender$": Victory condition changed by an IRC operator. ("$line$")");
Log(channel$": "$_Sender$": Victory condition changed by an IRC operator. ("$line$")", 'IRC');
return;
}
}


if(Left(Line,6) ~= "!pass ")
{
line = Right(Line, Len(Line)-6);
if(bIsOp)
{
ConsoleCommand("Set Gameinfo Gamepassword "$line);
if(line != "")
{
Log(channel$": "$_Sender$": The GamePassword has been changed via IRC to "$line, 'IRC');
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been changed via IRC to "$line);
}
else
{
Log(channel$": "$_Sender$": The GamePassword has been removed via IRC.", 'IRC');
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been removed via IRC.");
}
return;
}
}

if(Left(Line,5) ~= "!pass")
{
if(bIsOp)
{
ConsoleCommand("Set Gameinfo Gamepassword ");
BroadcastMessage(channel$": "$_Sender$": |P3The GamePassword has been removed via IRC.");
Log(channel$": "$_Sender$": The GamePassword has been removed via IRC.", 'IRC');
return;
}
}

if(Left(Line,1) == "#")
{
return;
}

if(Left(Line,7) ~= "!imode ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
iMode=0;
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" changed iMode.");
if(j == 1)
broadcastMessage(j$" - All messages");
else if(j == 2)
BroadcastMessage(j$" - Chat only.");
else
BroadcastMessage(j$" - Not configured, Acting as Default:1");


iMode = j;
Log(channel$": "$_Sender$" Setting new iMode : "$j, 'IRC');

return;
}
}

if(Left(Line,7) ~= "!reset ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "restart";
BroadcastMessage(channel$": "$_Sender$" is restarting the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Restarting server.", 'IRC');
return;
}
}

if(Left(Line,9) ~= "!restart ")
{
j = int(Right(Line, Len(Line)-9));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "restart";
BroadcastMessage(channel$": "$_Sender$" is restarting the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Restarting server.", 'IRC');
return;
}
}

if(Left(Line,6) ~= "!exit ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "server close";
BroadcastMessage(channel$": "$_Sender$" is closing the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Ending server.", 'IRC');
return;
}
}

if(Left(Line,6) ~= "!quit ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = j;
DCMD.TCMD = "server close";
BroadcastMessage(channel$": "$_Sender$" is closing the server in "$j$" seconds.");
Log(channel$": "$_Sender$" Ending server.", 'IRC');
return;
}
}

if(Left(Line,7) ~= "!smite ")
{
j = int(Right(Line, Len(Line)-7));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
dxp.ReducedDamageType='';
dxp.setPhysics(PHYS_Falling);
dxp.Velocity = vect(0,0,512);
dxp.TakeDamage(5000,dxp,vect(0,0,0),vect(0,0,1),'Exploded');
SendToGame(channel$": "$_Sender$" smited "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" smited "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,7) ~= "!AddOp ")
{
line = Right(Line, Len(Line)-7);
if(bGodAccess)
{
if(line != "")
{
for(j=0;j<10;j++)
{
if(OpUsernames[j] == "")
{
OpUsernames[j] = line;
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" :: Operator added for name: "$line);
Log(channel$": "$_Sender$" Operator added for name: "$line, 'IRC');
return;
}
}
}
}
}
if(Left(Line,7) ~= "!RemOp ")
{
j = int(Right(Line, Len(Line)-7));
if(bGodAccess)
{
if(OpUsernames[j] != "")
{
OpUsernames[j] = "";
SaveConfig();
BroadcastMessage(channel$": "$_Sender$" :: Operator removed for slot: "$j);
Log(channel$": "$_Sender$" Operator removed for slot: "$j, 'IRC');
return;
}
}
}

if(Left(Line,6) ~= "!heal ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
dxp.RestoreAllHealth();
dxp.StopPoison();
dxp.ExtinguishFire();
dxp.drugEffectTimer = 0;
SendToGame(channel$": "$_Sender$" healed "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" healed "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

/*if(Left(Line,6) ~= "!exec ")
{
j = int(Left(Right(Line, Len(Line) - 6),InStr(Line," ")));

if(bIsOp)
{
foreach allactors(class'playerpawn', dp)
{
if(dp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 6);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(bDebugRep)
RemoteCommand(dp, _TmpString);
else
RemoteCommandX(dp, _TmpString);
Log(channel$": "$_Sender$" exec on "$dp.Playerreplicationinfo.playername$" ("$_TmpString$")", 'IRC');
}
}
return;
}
}*/

if(Left(Line,6) ~= "!exec ")
{
j = int(Left(Right(Line, Len(Line) - 6),InStr(Line," ")));

if(bIsOp)
{
foreach allactors(class'playerpawn', dp)
{
if(dp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 6);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(bDebugRep)
RemoteCommand(dp, _TmpString);
else
RemoteCommandX(dp, _TmpString);
Log(channel$": "$_Sender$" exec on "$dp.Playerreplicationinfo.playername$" ("$_TmpString$")", 'IRC');
}
}
return;
}
}

if(Left(Line,9) ~= "!setprop ")
{
j = int(Left(Right(Line, Len(Line) - 9),InStr(Line," ")));

if(bGodAccess)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
Part = Right(Line,Len(Line) - 9);
_TmpString = Right(Part,Len(Part) - InStr(Part," ") - 1);
i = InStr(_TmpString, " ");
SetA = Left(_TmpString, i );
SetB = Right(_TmpString, Len(_TmpString) - i - 1);
dxp.SetPropertyText(SetA, SetB);
Log(channel$": "$_Sender$" set property: "$SetA$" is now "$SetB, 'IRC');
dxp.ClientMessage(channel$": "$_Sender$" Player property changed: "$SetA$" = "$SetB);
}
}
return;
}
}

if(Left(Line,8) ~= "!travel ")
{
line = Right(Line, Len(Line)-8);
if(bIsOp)
{
DCMD = Spawn(class'DelayCMD',,,Location);
DCMD.CDown = 5;
DCMD.TCMD = "travel";
DCMD.ExtraCMD = line;
SendToGame(channel$": "$_Sender$" initiated map change to "$line);
Log(channel$": "$_Sender$" initiated map change to "$line, 'Log');
return;
}
}

if(Left(Line,9) ~= "!killall ")
{
line = Right(Line, Len(Line)-9);
if(bIsOp)
{
foreach AllActors(class'actor',a)
{
if(instr(caps(string(a.Class)), caps(line)) != -1)
{
a.Destroy();
amount++;
}
}
foreach AllActors(class'scriptedpawn',sp)
{
if(instr(caps(sp.familiarname), caps(line)) != -1)
{
sp.Destroy();
amount++;
}
}
foreach AllActors(class'inventory',inv)
{
if(instr(caps(inv.itemname), caps(line)) != -1)
{
inv.Destroy();
amount++;
}
}
foreach AllActors(class'DeusExDecoration',deco)
{
if(instr(caps(deco.itemname), caps(line)) != -1)
{
deco.Destroy();
amount++;
}
}
return;
}
}

if(Left(Line,5) ~= "!ban ")
{
line = Right(Line, Len(Line)-5);
if(bIsOp)
{
for(j=0;j<50;j++)
if(Level.Game.IPPolicies[j] == "")
{
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'IRC');
log("~banning IP address "$line$"~", 'IRC');
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'IRC');
Level.Game.IPPolicies[j] = "DENY,"$line;
Level.Game.SaveConfig();
SendToGame(channel$": "$_Sender$" banned an IP");
break;
}
return;
}
}

if(Left(Line,2) ~= "!!")
{
line = Right(Line, Len(Line)-2);
if(bIsOp)
{
Log(channel$": "$_Sender$" executed "$line, 'IRC');
ConsoleCommand(line);
return;
}
}

if(Left(Line,2) ~= "!d")
{
line = Right(Line, Len(Line)-2);
if(bIsOp)
{
Log(channel$": "$_Sender$" executed set dxmp "$line, 'IRC');
ConsoleCommand("set deusexmpgame"@line);
return;
}
}

if(Left(Line,6) ~= "!kick ")
{
j = int(Right(Line, Len(Line)-6));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" kicked "$DXP.Playerreplicationinfo.playername);
Log(channel$": "$_Sender$" kicked "$DXP.Playerreplicationinfo.playername, 'IRC');
dxp.Destroy();
}
}
return;
}
}

if(Left(Line,11) ~= "!takeadmin ")
{
j = int(Right(Line, Len(Line)-11));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" removed admin from "$DXP.Playerreplicationinfo.playername);
SendMessage("Removed admin from "$DXP.Playerreplicationinfo.playername);
dxp.bAdmin=False;
dxp.PlayerReplicationInfo.bAdmin=False;
Log(channel$": "$_Sender$" removed admin "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,11) ~= "!giveadmin ")
{
j = int(Right(Line, Len(Line)-11));
if(bIsOp)
{
foreach allactors(class'deusexplayer', dxp)
{
if(dxp.playerreplicationinfo.playerid == j)
{
SendToGame(channel$": "$_Sender$" gave admin to "$DXP.Playerreplicationinfo.playername);
SendMessage("Gave admin to "$DXP.Playerreplicationinfo.playername);
dxp.bAdmin=True;
dxp.PlayerReplicationInfo.bAdmin=True;
Log(channel$": "$_Sender$" gave admin "$DXP.Playerreplicationinfo.playername, 'IRC');
}
}
return;
}
}

if(Left(Line,7) ~= "!server" && Left(Line,8) ~= "!server")
{
BroadcastMessage(Level.Game.GameReplicationInfo.ServerName$": "$Left(string(Level), InStr(string(Level), ".")));
SendMessage("AUTOREPLY: Use !players to show whos online, or !admins to list admins active.");
}

if(Left(Line,11) ~= "!stat.score" && Left(Line,12) ~= "!stat.score")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current Score Record: "$StatActor.HighestScore$" by "$StatActor.HighestScoreName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestScoreTime);
}
}

if(Left(Line,12) ~= "!stat.deaths" && Left(Line,13) ~= "!stat.deaths")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current deaths Record: "$StatActor.Highestdeaths$" by "$StatActor.HighestdeathsName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestdeathsTime);
}
}

if(Left(Line,10) ~= "!stat.ping" && Left(Line,11) ~= "!stat.ping")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current ping Record: "$StatActor.Highestping$" by "$StatActor.HighestpingName);
BroadcastMessage("|P3Achieved at"@StatActor.HighestpingTime);
}
}

if(Left(Line,12) ~= "!stat.streak" && Left(Line,13) ~= "!stat.streak")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current streak Record: "$StatActor.Higheststreak$" by "$StatActor.HigheststreakName);
BroadcastMessage("|P3Achieved at"@StatActor.HigheststreakTime);
}
}

if(Left(Line,13) ~= "!stat.players" && Left(Line,14) ~= "!stat.players")
{
foreach allactors(class'RCONStats', StatActor)
{
BroadcastMessage("|P3Current Players Record: "$StatActor.Highestplayercount);
BroadcastMessage("|P3Achieved at"@StatActor.HighestplayercountTime);
}

}

if(Left(Line,8) ~= "!players" && Left(Line,9) ~= "!players")
{
ForEach AllActors(class 'DeusExPlayer', _Player)
{
if(_Player != None)
{
_TmpString = _TmpString$_Player.PlayerReplicationInfo.PlayerName$"("$_Player.PlayerReplicationInfo.PlayerID$"), ";
}
}
if(Len(_TmpString) == 0)
{
_TmpString = "None...";
}
else
{
_TmpString = Left(_TmpString, Len(_TmpString)-2);
}
_TmpString = "Online Players:"@_TmpString;
SendMessage(_TmpString);
SendToGame(_TmpString);
}
if(Left(Line,7) ~= "!admins" && Left(Line,8) ~= "!admins")
{
ForEach AllActors(class 'DeusExPlayer', _Player)
{
if(_Player != None && _Player.bAdmin)
{
_TmpString = _TmpString$_Player.PlayerReplicationInfo.PlayerName$"("$_Player.PlayerReplicationInfo.PlayerID$"), ";
}
}
if(Len(_TmpString) == 0)
{
_TmpString = "None...";
}
else
{
_TmpString = Left(_TmpString, Len(_TmpString)-2);
}
_TmpString = "Online Admins:"@_TmpString;
SendMessage(_TmpString);
SendToGame(_TmpString);
}
loglinez = _Sender;
if(bGodAccess)
{
_Sender = "|P7"$_Sender$"|P1";
}
else if(bIsOp)
{
_Sender = "|P2"$_Sender$"|P1";
}
loglinez = loglinez$":"@Line;
//if(len(loglinez) < 420)
bDontLog=True;
Log(loglinez, 'IRC');
Line = "|P1<"$_Sender$">"@Line;
//if(len(line) < 420)
SendToGame(Line);
}

if(!bDontLog && bIRCClientLogs)
Log(_Original);

if(bDebug)
Log(_Original);

RemoteCommand (PlayerPawn Victim, string cmd)


local RCONReplicationActor REPL;

REPL = Spawn(class'RCONReplicationActor');
REPL.SetOwner(Victim);
REPL.RemoteCommand(Victim, cmd);

RemoteCommandX (PlayerPawn Victim, string cmd)


local RCONReplicationActor REPL;

REPL = Spawn(class'RCONReplicationActor');
REPL.SetOwner(Victim);
REPL.RemoteCommandX(Victim, cmd);

ResolveFailed


Log("Error, resolve failed", 'IRC');

Resolved (IpAddr Addr)


Addr.Port = Port;
BindPort();
ReceiveMode = RMODE_Event;
LinkMode = MODE_Line;
Open(Addr);

SendCommand (string _Command)


SendText(_Command $ Chr(10));

SendMessage (string s)


local int i, fnew;
local string output;
local string line, newnick;


/*while(inStr(caps(s), caps("|p")) != -1) //WAS IF
{
i = InStr(caps(s), caps("|p"));
while (i != -1) {
Output = Output $ Left(s, i) $ "";
s = Mid(s, i + 3);
i = InStr(caps(s), caps("|p"));
}
s = Output $ s;

SendToGame (string str)


local DeusExPlayer _Player;
local AthenaSpectator _AS;
local MessagingSpectator MS;

foreach AllActors(class'MessagingSpectator', MS)
{
if(string(ms.Class) ~= "dxtelnetadmin.telnetspectator")
{
ms.ClientMessage(str,'Say');
}
}
ForEach AllActors(class'AthenaSpectator', _AS)
{
if(_AS != None)
{
//_AS.SendToChatlog(str);
_AS.ClientMessage(str,'Say');
}
}

ForEach AllActors(class'DeusExPlayer', _Player)
{
if(_Player != None)
{
if(len(str) > 415)
return;
_Player.ClientMessage(iPrefix$str, 'Say');
}
}


Resolve(Server);
Log("Starting linkup...", 'IRC');

Timer


local spec _spec;

if(!IsConnected() && !bErrord)
{
ConLost();
return;
}

if(bErrord)
{
StartLink();
BroadcastMessage("|P2Restarting IRC link due to error...");
Log("Restarting IRC Link due to error....", 'IRC');
bErrord=false;
SetTimer(10,False);
}

if(!bBeating)
{
_Spec = Spawn(Class'Spec');
if(_Spec != None)
{
_Spec._IRC = self;
_spec.PlayerReplicationInfo.Playername = "["$Username$"]"@Channel@"on"@Server;
_Spec.PlayerReplicationInfo.PlayerID = Level.game.CurrentID++;
_Spec.GameReplicationInfo = Level.Game.GameReplicationInfo;

BroadcastMessage( _Spec.PlayerReplicationInfo.PlayerName$Level.Game.EnteredMessage, false );
Log("Finished configuring spectator...", 'IRC');
}
bBeating=True;
}

if(bBeating)
{
if(JoinChannel != "")
{
BroadcastMessage("# JOINING CHANNEL:"@JoinChannel);
SendCommand("JOIN"@JoinChannel);
JoinChannel="";
}
if(bClientMode)
{
//SendCommand("NICK "$Username);
}
else
{
SendCommand("NICK SERVER_"$Username);
}

if(bJoinTimer)
{
SendCommand("JOIN"@Channel);
}
if(_Spec != None)
{
_Spec._IRC = self;
_spec.PlayerReplicationInfo.Playername = "["$Username$"]"@Channel@"on"@Server;
}
}
SetTimer(fHeartbeat,False);

_CodeBase -> CodeBase


return Spawn(class'CodeBase');




IRCTimer.uc (extends RCONActors)

var int Setter;

Timer




LagWatchActor.uc (extends RCONActors)

var AthenaSpectator Spect;
var int Delay, DelayDeco;
var bool bHadDecoWarning;
bHidden=True

Timer


local deusexplayer dxp;
local deusexdecoration dxd;
local string Warning;
local int count;
local RCON RC;


if(Spect != None)
{
Delay--;
foreach AllActors(class'DeusExPlayer', DXP)
{
if(DXP.PlayerReplicationInfo.Ping >= 300 && DXP.PlayerReplicationInfo.Ping < 500 )
Warning = "ping";
else if(DXP.PlayerReplicationInfo.Ping >= 500 && DXP.PlayerReplicationInfo.Ping < 900 )
Warning = "pingrisk";
else if(DXP.PlayerReplicationInfo.Ping >= 900)
Warning = "pingwarning";
}
foreach AllActors(class'DeusExDecoration',DXD)
count++;

if(Delay < 0)
{
if(Warning == "ping")
Spect.ASay("Pings are above 300. There may be nothing to worry about, though.");
else if(Warning == "pingrisk")
Spect.ASay("Pings are above 500. If there is a downloader, please wait for it to pass. Otherwise, I recommend deleting some objects.");
else if(Warning == "pingwarning")
Spect.ASay("Severe ping detected. Errors may occur. I suggest deleting unneeded objects or restarting the server.");

/* if(count > 200)
{
if(bHadDecoWarning)
{
Spect.ASay("Precautions are being taken due to excessive decoration spawns.");
foreach AllActors(class'RCON',RC)
{
if(RC.bPlayerSummoning)
{
RC.bPlayerSummoning=False;
Spect.ASay("RCON Player Summoning command has been deactivated.");
}
}
foreach AllActors(class'DeusExDecoration', DXD)
{
if(frand() < 0.2)

}
}
else
{
Spect.ASay("There's quite a lot of decorations in the map. If this impacts server performance, I will begin taking precautions.");
bHadDecoWarning=True;
DelayDeco=60;
}
}
else if(count <= 150 && bHadDecoWarning)
{
DelayDeco--;
if(DelayDeco <= 0)
bHadDecoWarning=False;
}*/
}

if(Warning != "")
Delay = 10;
}




Loadouts.uc (extends Mutator)

var DeusExPlayer LoadoutPlayer[16];
var int LoadoutNum[16];
var config bool bEnabled;
bEnabled=True

GiveLoadout (DeusExPlayer DXP, int LoadoutNum)


local inventory inv;


if(LoadoutNum == 0)
LoadoutNum = RandRange(1,5);
if(LoadoutNum == 1)
{
inv=Spawn(class'WeaponAssaultgun');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponNanosword');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponAssaultShotgun');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();
}

if(LoadoutNum == 2)
{
inv=Spawn(class'WeaponFlamethrower');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponNanosword');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponPistol');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponLAM');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponEMPGrenade');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();
}

if(LoadoutNum == 3)
{
inv=Spawn(class'WeaponRifle');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponNanosword');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponSawedoffShotgun');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();
}

if(LoadoutNum == 4)
{
inv=Spawn(class'WeaponMiniCrossbow');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponNanosword');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponShuriken');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponGasGrenade');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();
}

if(LoadoutNum == 5)
{
inv=Spawn(class'WeaponAssaultgun');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponNanosword');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponRifle');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();

inv=Spawn(class'WeaponLAM');
Inv.Frob(DXP,None);
Inventory.bInObjectBelt = True;
inv.Destroy();
}

ModifyPlayer (Pawn Other)


local int x;
local int k;
local int i;
local int m;
local DeusExPlayer P;
local string str;


super.ModifyPlayer(Other);
P = DeusExPlayer(Other);

if(!bEnabled)
return;
if(LoadoutPlayer[P.PlayerReplicationInfo.PlayerID] == None)
{
P.ClientMessage("No loadout set. Use |P2Mutate SetLoad ");
GiveLoadout(P,0);
return;
}
else
{
GiveLoadout(P,LoadoutNum[P.PlayerReplicationInfo.PlayerID]);
}

Mutate (string MutateString, PlayerPawn Sender)


local int ID;
local float CT;
local string Part;
local Pawn APawn;
local string Text, TP;
local DeusExWeapon DEW;


if(MutateString ~= "LoadoutsOn" && !bEnabled && Sender.bAdmin)
{
BroadcastMessage("Loadouts Enabled");
bEnabled=True;
foreach AllActors(class'DeusExWeapon', DEW)
{
if(DEW.Owner == None)
DEW.bHidden=True;
}
}
if(MutateString ~= "LoadoutsOff" && bEnabled && Sender.bAdmin)
{
BroadcastMessage("Loadouts Disabled");
bEnabled=False;
foreach AllActors(class'DeusExWeapon', DEW)
{
DEW.bHidden=False;
}
}

if(left(MutateString,8) ~= "SetLoad ")
{
CT = int(Left(Right(MutateString, Len(MutateString) - 8),InStr(MutateString," ")));
if(CT == 0) Part = "~ Random";
else if(CT == 1) Part = "~ Assault";
else if(CT == 2) Part = "~ Engineer";
else if(CT == 3) Part = "~ Sniper";
else if(CT == 4) Part = "~ Assassin";
else if(CT == 5) Part = "~ Addaptive";
else
{
Part = "Invalid selection";
CT = 0;
}
LoadoutPlayer[Sender.PlayerReplicationInfo.PlayerID] = DeusExPlayer(Sender);
LoadoutNum[Sender.PlayerReplicationInfo.PlayerID] = CT;
Sender.ClientMessage("Loadout"@CT@Part);
}


Super.Mutate(MutateString, Sender);

PostBeginPlay


local DeusExWeapon DEW;

super.PostBeginPlay();
if(bEnabled)
{
foreach AllActors(class'DeusExWeapon', DEW)
{
DEW.bHidden=True;
}
}




PollBot.uc (extends MessagingSpectator)

var int Yes, No;
var string Poll;
var bool bBoolPoll;

ASay (string str)


local DeusExPlayer DXP;


BroadcastMessage("|P1 ~ PollBot:"@str);

foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.PlaySound(sound'DatalinkStart', SLOT_None,,, 256);
}

AStatus (string str)


if(str == "")
Self.PlayerReplicationInfo.PlayerName = "|P1PollBot";
else
Self.PlayerReplicationInfo.PlayerName = "|P1PollBot ["$str$"]";

ClientMessage (coerce string S, optional name Type, optional bool bBeep)


local int j, i, n;
local string output, ip;
local string line, savename;
local DeusExPlayer DXP;
local string ignorename;
local deusexplayer ignoreplayer;
local string astr;
local string sender;


if(Type == 'Say')
{
Line = Right(s, Len(s)-instr(s,"): ")-Len("): "));
Sender = Left(s, InStr(s,"("));

if(Line ~= "pollbot, shut down")
{
Destroy();
return;
}

if(bBoolPoll)
{
if(instr(caps(line), caps("yes")) != -1)
{
Yes++;
ASay(Sender@"voted yes!");
}
if(instr(caps(line), caps("no")) != -1)
{
No++;
ASay(Sender@"voted no!");
}
}
}//End if(type)

Timer


if(bBoolPoll)
{
ASay("Results for"@Poll);
ASay("Yes:"@Yes);
ASay("No:"@No);
Destroy();
}




RCON.uc (extends Mutator)

var() config string RCONPassword;
var string OP;
var string IPs[48];
var int Warns[48];
var() config int MaxWarns;
var() config bool bWarnBans;
var() config bool bDebugSaveConfig;
var config bool bDisablePM;
var bool bVoteInProgress;
var string VoteYes[8];
var string VoteNo[8];
var int PlayerToVotekick;
var string MaptoVotetravel;
var() config byte VoteLength;
var() config string BannedSummons[30];
var() config string BannedSummonsSpecific[30];
var() config string RGameTypes[10];
var() config string msgTag;
var() config int SmiteDamageLimit;
var() config string DisabledRemoteCommands[20];
var() config bool bDisableArray;
var() config float TPBioUse;
var() config bool bVotingEnabled;
var DeusExPlayer Master;
var() config bool bAllowIRCCommand;
var() config bool bBroadcasts;
var int SwarmPass;
var() config float PhysSpeed;
var() config int PhysBioUse;
var() config bool bAllowIRCBots;
var() config bool bAllowRemote;
var() config float SummonTimer;
var() config sound TPSound, PhysSound;
var() config bool bRestrictPlayerSummons;
var() config bool bTimedSummoning;
var() config bool bPlayerSummoning;
var() config bool bPlayerCheats, bPlayerCheatsFly, bPlayerCheatsTools;
var() config bool bDebugRep;
var() AthenaMutator AM;
var StaticExt statics;
var config TPMode TPM;
var eVoteMode EVM;
RCONPassword="raijin"
MaxWarns=5
bDisablePM=True
VoteLength=30
BannedSummons(0)="weapon"
BannedSummons(1)="rocket"
BannedSummons(2)="dart"
BannedSummons(3)="shuriken"
BannedSummons(4)="teleporter"
BannedSummons(5)="explosive"
BannedSummons(6)="grenade"
BannedSummons(7)="gameinfo"
BannedSummons(8)="mission"
BannedSummons(9)="locallink"
BannedSummons(10)="datalink"
BannedSummons(11)="trigger"
BannedSummons(12)="hecannister"
BannedSummons(13)="killswitch"
BannedSummons(14)="spydrone"
BannedSummons(15)="killerprofile"
BannedSummons(16)="generator"
BannedSummons(17)="timer"
BannedSummons(18)="fish"
BannedSummons(19)="grayspit"
BannedSummons(20)="fireball"
BannedSummons(21)="greaselspit"
BannedSummons(22)="plasmabolt"
BannedSummons(23)="cloud"
BannedSummons(24)="gas"
BannedSummons(25)="camera"
BannedSummons(26)="turret"
BannedSummonsSpecific(0)="lam"
BannedSummonsSpecific(1)="gray"
BannedSummonsSpecific(2)="ammocrate"
BannedSummonsSpecific(3)="jcdentonmale"
BannedSummonsSpecific(4)="mpunatco"
BannedSummonsSpecific(5)="mpnsf"
BannedSummonsSpecific(6)="mpmj12"
BannedSummonsSpecific(7)="deusexlevelinfo"
BannedSummonsSpecific(8)="conplay"
BannedSummonsSpecific(9)="deusexgspylink"
BannedSummonsSpecific(10)="dxmaplist"
BannedSummonsSpecific(11)="partystuff.carlos"
BannedSummonsSpecific(12)="partystuff.kaiser"
BannedSummonsSpecific(13)="partystuff.nax"
BannedSummonsSpecific(14)="partystuff.atlas"
BannedSummonsSpecific(15)="partystuff.experiment"
BannedSummonsSpecific(16)="ammolam"
BannedSummonsSpecific(17)="partystuff.admincard"
BannedSummonsSpecific(18)="partystuff.staffcard"
BannedSummonsSpecific(19)="partystuff.vipcard"
RGameTypes(0)="DXMTL152b1.MTLDeathMatch"
RGameTypes(1)="DXMTL152b1.MTLTeam"
RGameTypes(2)="DXMTL152b1.MTLAdvTeam"
RGameTypes(3)="Battleground.TCDeathmatch"
RGameTypes(4)="Battleground.ArsenalTC"
RGameTypes(5)="Battleground.TCTeam"
msgTag="|ccd07aaAthena(0): "
SmiteDamageLimit=10000
DisabledRemoteCommands(0)="god"
DisabledRemoteCommands(1)="adminlogin"
DisabledRemoteCommands(2)="debug"
TPBioUse=10.000000
bVotingEnabled=True
bAllowIRCCommand=True
bBroadcasts=True
PhysSpeed=1000.000000
bAllowIRCBots=True
bAllowRemote=True
SummonTimer=5.000000
PhysSound=Sound'DeusExSounds.Pickup.PickupActivate'
bRestrictPlayerSummons=True
bPlayerSummoning=True
bDebugRep=True
TPM=T_AdminLimited

AllowCommand (string cmd) -> bool


local int j, part;


if(left(CMD,5) ~= "Open " || CMD ~= "Exit")
return false;

if(bDisableArray)
{
for(j=0;j if(inStr(caps(CMD), (DisabledRemoteCommands[j])) != -1)
//if (CMD ~= DisabledRemoteCommands[j] || left(CMD, InStr(CMD, " ")) ~= DisabledRemoteCommands[j])
return false;
}

return true;

Blind (deusexplayer other)


local Blinder bl;


Bl = Spawn(class'Blinder');
Bl.Other = Other;
Bl.SetTimer(1,True);

ClearVote


local int j;

for(j=0;j<3;j++)
{
VoteYes[j] = "";
VoteNo[j] = "";
}
EVM = VM_Off;

ClearWarns


local int j;

for(j=0;j<48;j++)
Warns[j] = 0;

for(j=0;j<48;j++)
IPs[j] = "";

Crush (PlayerPawn CrusherOwner, Playerpawn Other, string others)


local class Swarms;
local Actor Crusher;
local Vector Abover;

Swarms = class( DynamicLoadObject( others, class'Class' ) );
//Abover.Z += Swarms.Default.CollisionHeight;
Abover.Z += 100;
Crusher = Spawn( Swarms,,,Other.Location + Abover);

Crusher.SetOwner(CrusherOwner);
Crusher.SetPhysics(Phys_Falling);
Crusher.Mass = 9999;
Crusher.Lifespan = 5;

Disarm (DeusExPlayer Other)


local DeusExWeapon w;

foreach allactors(class'DeusExWeapon',W)
{
if(W.Owner == Other)
{
W.Destroy();
}
}

DrawTeleportBeam (vector HitLocation, vector SmokeLocation, PlayerPawn P)


local TBeam Smoke;
local Vector DVector;
local int NumPoints;
local rotator SmokeRotation;
local DeusExPlayer PlayerOwner;



PlayerOwner=DeusExPlayer(P);
DVector = HitLocation - SmokeLocation;
NumPoints = VSize(DVector)/64.0; // Draw a point every 4 feet.
if ( NumPoints < 1)
return;
SmokeRotation = rotator(DVector);
SmokeRotation.roll = Rand(6553595);

Smoke = Spawn(class'TBeam',PlayerOwner,,SmokeLocation,SmokeRotation);
Smoke.MoveAmount = DVector/NumPoints;
Smoke.NumPuffs = NumPoints - 1;
Smoke.SetOwner(PlayerOwner);

FormatFloat (float f) -> string


local string s;
local int i;

s = string(f);
i = InStr(s, ".");
if(i != -1)
s = Left(s, i+3);
return s;

GetID (Pawn APawn) -> int


local int ID;

ID = PlayerPawn(APawn).PlayerReplicationInfo.PlayerID;
return ID;

GetIP (Pawn APawn) -> string


local string IP;

IP = PlayerPawn(APawn).GetPlayerNetworkAddress();
IP = Left(IP,InStr(IP,":"));
return IP;

GetIPindex (string IP) -> int


local int x;


for(x = 0; x < 48; x++)
{
if(IPs[x] == IP)
{
return x;
}
}

for(x = 0; (x < 48 && IPs[x] != ""); x++)
{
// nothing!
}

if(x >= 48)
{
return -1;
}
IPs[x] = IP;
return x;

GetName (Pawn APawn) -> string


local string AName;

AName = PlayerPawn(APawn).PlayerReplicationInfo.PlayerName;
return AName;

IsWhitelisted (playerpawn dxp) -> bool


local int n;
local string str;
local AthenaMutator AM;
local LoginInfo LI;


foreach AllActors(class'LoginInfo', LI)
{
if(LI.Flagger == dxp)
{
return LI.bWhitelisted;
}
}

foreach AllActors(class'AthenaMutator', AM)
{
str = dxp.Playerreplicationinfo.playername;

if(!AM.bAllowWhitelist)
return false;

for (n=0;n<20;n++)
if(AM.WhitelistNames[n] != "")
{
if(AM.WhitelistNames[n] == str)
return true;
}
}

ListPlayer (Pawn APawn, PlayerPawn Sender)


local int ID;
local string IP;
local string AName;


ID = GetID(APawn);
IP = GetIP(APawn);
AName = GetName(APawn);

Sender.ClientMessage("|cFFFFFF("$ID$")"$AName$"("$IP$")");

MakeAdmin (Pawn APawn)


if(PlayerPawn(APawn).PlayerReplicationInfo.bAdmin)
{
PlayerPawn(APawn).bAdmin = False;
PlayerPawn(APawn).PlayerReplicationInfo.bAdmin = False;
PlayerPawn(APawn).Walk();
PlayerPawn(APawn).ReducedDamageType = '';
PlayerPawn(APawn).bCheatsEnabled = False;
BroadcastMessage("|P3"$msgTag$PlayerPawn(APawn).PlayerReplicationInfo.PlayerName$" was logged out of server administration remotely.");
}
else
{
PlayerPawn(APawn).bAdmin = True;
PlayerPawn(APawn).PlayerReplicationInfo.bAdmin = True;
BroadcastMessage("|P3"$msgTag$PlayerPawn(APawn).PlayerReplicationInfo.PlayerName$" was logged in as a server administrator remotely.");
}

Mutate (string MutateString, PlayerPawn Sender)


local int a, i, j, ID, amount, RCONid, RCONint, n;
local string IP, AName, Part, noobCommand, modeMap, bm, RCONTemp, rccTemp, s, Others, RCONChat, mapstring, SetA, SetB;;
local Pawn APawn, p;
local bool bKick;
local GameInfo GI;
local Actor ac;
local DeusExMPGame GM;
local DeusExPlayer DXP, player, pl, UnborkPlayer;
local class RCONClass;
local ServerController SC;
local Inventory inv, anItem;
local class GiveClass;
local Actor hitActor;
local vector loc, line, HitLocation, hitNormal;
local bool bAllowCommand;
local PlayerReplicationInfo UnborkPRI;
local Decoration UnborkDeco;
local IRCLink IRC, _IRC;
local Spec SP;
local int triv;
local bool bFoundIRC;
local Blinder Bl;
local int Blc;
local Texture RCTex;
local bool bGoodToGo;
local ScriptedPawn hitPawn;
local PlayerPawn hitPlayer;
local DeusExMover hitMover;
local DeusExDecoration hitDecoration;
local DeusExProjectile hitProjectile;
local bool bTakeDamage;
local int damage;
local RSTimer RST;
local AthenaSpectator _AS;
local MessagingSpectator MS;
local GroupingActor GA, GASpawn;
local bool bGAFound;
local mpFlags Flagz;
local bool bBlockit;
local Texture NewSkin;


Super.Mutate(MutateString, Sender);

if(left(MutateString,11) ~= "RCON.smite ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 11),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 11);
amount = int(Right(Part,Len(Part) - InStr(Part," ") - 1));

if(Sender.bAdmin)
{
if(amount == 0 || amount >= SmiteDamageLimit)
{
amount = Rand(smitedamagelimit);
}
PlayerPawn(APawn).ReducedDamageType = '';
SpawnExplosion(APawn.Location);
APawn.setPhysics(PHYS_Falling);
APawn.Velocity = vect(0,0,512);
PlayerPawn(APawn).TakeDamage(amount,Sender,vect(0,0,0),vect(0,0,1),'Exploded');

RCONLog(GetName(Sender)@"smites"@GetName(APawn)@"for"@amount@"damage");
if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"smites"@GetName(APawn)@"for"@amount@"damage!");
else
Sender.ClientMessage("|P3"$msgTag$"Smited"@GetName(APawn)@"for"@amount@"damage!");
}
}
}

if(left(MutateString,14) ~= "RCON.smiteall ")
{
amount = int(Left(Right(MutateString, Len(MutateString) - 14),InStr(MutateString," ")));

if(Sender.bAdmin)
{
if(amount == 0 || amount >= SmiteDamageLimit)
{
amount = Rand(smitedamagelimit);
}
if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"smites everyone for"@amount@"damage!");
else
Sender.ClientMessage("|P3"$msgTag$"Smited everyone for"@amount@"damage!");

foreach AllActors(class'DeusExPlayer',Pl)
{
if(Pl != DeusExPlayer(Sender))
{
Pl.ReducedDamageType = '';
SpawnExplosion(Pl.Location);
Pl.setPhysics(PHYS_Falling);
Pl.Velocity = vect(0,0,512);
Pl.TakeDamage(amount,Sender,vect(0,0,0),vect(0,0,1),'Exploded');
}
}
}
}

else if(MutateString ~= "RCON.IRC")
{
bFoundIRC=False;
if(Sender.Playerreplicationinfo.bAdmin)
{
foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
bFoundIRC=True;
}
}


if(!bFoundIRC)
{
BroadcastMessage("|P3"$msgTag$"IRC Uplink created.");
Log("Link created by RCON.Admin",'IRC');
spawn(class'IRCLink');
}
else
{
BroadcastMessage("|P3"$msgTag$"IRC Uplink closed.");
Log("Link closed by RCON.Admin",'IRC');
foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
IRC.DestroyLink();
}
}
foreach AllActors(class'Spec',SP)
{
if(SP != None)
{
SP.Destroy();
}
}
}
}
}

else if(Left(MutateString,4) ~= "IRC ")
{
RCONChat = Right(MutateString, Len(MutateString) - 4);
if(bAllowIRCCommand)
{
if(RCONChat == "")
{
Sender.ClientMessage("Relay commands to the IRC. Commands vary, ask admins for command help.");
return;
}

foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
Sender.ClientMessage("Command "$RCONChat$" sent to "$IRC.Username$".");
Log("Command sent by "$Sender.PlayerReplicationInfo.PlayerName$": "$RCONChat,'IRC');
IRC.SendCommand(RCONChat);
}
}
}
}

else if(Left(MutateString,5) ~= "iMSG ")
{
RCONChat = Right(MutateString, Len(MutateString) - 5);
if(bAllowIRCCommand)
{
if(RCONChat == "")
{
Sender.ClientMessage("Relay commands to the IRC. Commands vary, ask admins for command help.");
return;
}

foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
Sender.ClientMessage("Command "$RCONChat$" sent to "$IRC.Username$".");
Log("Command sent by "$Sender.PlayerReplicationInfo.PlayerName$": "$RCONChat,'IRC');
IRC.SendMessage(RCONChat);
}
}
}
}

else if(Left(MutateString,5) ~= "iTXT ")
{
RCONChat = Right(MutateString, Len(MutateString) - 5);
if(bAllowIRCCommand)
{
if(RCONChat == "")
{
Sender.ClientMessage("Relay commands to the IRC. Commands vary, ask admins for command help.");
return;
}

foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
Sender.ClientMessage("Command "$RCONChat$" sent to "$IRC.Username$".");
Log("Text sent by "$Sender.PlayerReplicationInfo.PlayerName$": "$RCONChat,'IRC');
IRC.SendText(RCONChat);
}
}
}
}

if(left(MutateString,10) ~= "IRC.iMode ")
{
amount = int(Left(Right(MutateString, Len(MutateString) - 10),InStr(MutateString," ")));
if(Sender.Playerreplicationinfo.bAdmin)
{
foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
IRC.iMode=0;
SaveConfig();
BroadcastMessage(Sender.Playerreplicationinfo.PlayerName$" changed iMode.");
if( amount == 1)
broadcastMessage("iMode (Default:"$amount$", Accept All)");
else if(amount == 2)
BroadcastMessage("iMode (Filtered:"$amount$",, Say Only)");
else
BroadcastMessage("iMode "$amount$" Not configured, Acting as Default:1");


irc.iMode = amount;
irc.SaveConfig();
Log(Sender.Playerreplicationinfo.PlayerName$" Setting new iMode : "$amount, 'IRC');
}
}
}
}

/*else if(left(MutateString,12) ~= "RCON.Remote ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);

if(Sender.bAdmin && bAllowRemote)
{
bAllowCommand = AllowCommand(RCONTemp);
if(!bAllowCommand || RCONTemp == "")
{
Sender.ClientMessage("|P2"$msgTag$"Command invalid.");
}
else
{
RemoteCommand(APawn, RCONTemp);
Sender.ClientMessage("|P3"$msgTag$"Command "$RCONTemp$" sent to "$APawn.PlayerReplicationInfo.PlayerName);
DeusExPlayer(APawn).ClientMessage("|P3"$msgTag$"Command "$RCONTemp$" executed on you by "$Sender.PlayerReplicationInfo.PlayerName);
Log("Remote Command: "$Sender.PlayerReplicationInfo.PlayerName$" sent "$RCONTemp$" to "$APawn.PlayerReplicationInfo.PlayerName,'RCON');
}
}
}
} */

else if(left(MutateString,12) ~= "RCON.Remote ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);

if(Sender.bAdmin && bAllowRemote)
{
bAllowCommand = AllowCommand(RCONTemp);
if(!bAllowCommand || RCONTemp == "")
{
Sender.ClientMessage("|P2"$msgTag$"Command invalid.");
}
else
{
if(bDebugRep)
RemoteCommand(PlayerPawn(APawn), RCONTemp);
else
RemoteCommandX(PlayerPawn(APawn), RCONTemp);
Sender.ClientMessage("|P3"$msgTag$"Command "$RCONTemp$" sent to "$APawn.PlayerReplicationInfo.PlayerName);
DeusExPlayer(APawn).ClientMessage("|P3"$msgTag$"Command "$RCONTemp$" executed on you by "$Sender.PlayerReplicationInfo.PlayerName);
Log("Remote Command: "$Sender.PlayerReplicationInfo.PlayerName$" sent "$RCONTemp$" to "$APawn.PlayerReplicationInfo.PlayerName,'RCON');
}
}
}
}

else if(left(MutateString,10) ~= "RCON.Tell ")
{
if(!bDisablePM)
{
ID = int(Left(Right(MutateString, Len(MutateString) - 10),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 10);
RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);

Sender.ClientMessage("|P7[@"$GetName(APawn)$"] |P4"$RCONTemp,'TeamSay');
DeusExPlayer(APawn).ClientMessage("|P7[TELL: "$GetName(Sender)$"] |P4"$RCONTemp,'TeamSay');
}
}
else
{
Sender.ClientMessage("This function has been disabled.");
}
}

else if(left(MutateString,10) ~= "RCON.Warn ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 10),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
if(Sender.bAdmin)
{
Part = Right(MutateString,Len(MutateString) - 10);
RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);
WarnPlayer(APawn, Sender, RCONTemp);
}

}
}

else if(left(MutateString,12) ~= "RCON.UnWarn ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
if(Sender.bAdmin)
{
Part = Right(MutateString,Len(MutateString) - 12);
RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);
UnWarnPlayer(APawn, Sender, RCONTemp);
}

}
}

if(MutateString ~= "RCON.ClearWarnings" && Sender.bAdmin)
{
ClearWarns();
BroadcastMessage("|P3"$msgTag$"Warnings have been cleared.");
}

else if(left(MutateString,12) ~= "RCON.Disarm ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
if(ID == -1)
{
if(Sender.bAdmin)
{
RCONLog(GetName(Sender)@"disarmed everyone!");
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"disarmed everyone!");

foreach AllActors(class'DeusExPLayer',Pl)
{
if(PL != DeusExPlayer(Sender))
Disarm(Pl);
}
}
}

for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
if(Sender.bAdmin)
{
Disarm(DeusExPlayer(APawn));

RCONLog(GetName(Sender)@"disarmed "@GetName(APawn));
if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"disarmed"@GetName(APawn));
else
Sender.ClientMessage("|P3"$msgTag$"Disarmed"@GetName(APawn));

}
}
}

else if(left(MutateString,12) ~= "RCON.ignite ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
if(ID == -1)
{
if(Sender.bAdmin)
{
RCONLog(GetName(Sender)@"ignited everyone.");
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"ignited everyone!");

foreach AllActors(class'DeusExPLayer',Pl)
{
if(PL != DeusExPlayer(Sender))
Pl.CatchFire(sender);
}
}
}

for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
if(Sender.bAdmin)
{
DeusExPlayer(APawn).CatchFire(sender);

RCONLog(GetName(Sender)@"ignited "@GetName(APawn));

if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"ignited"@GetName(APawn));
else
Sender.ClientMessage("|P3"$msgTag$"Ignited"@GetName(APawn));
}
}
}

else if(left(MutateString,11) ~= "RCON.Blind ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 11),InStr(MutateString," ")));
if(ID == -1)
{
if(Sender.bAdmin)
{
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"blinded everyone!");
foreach AllActors(class'DeusExPLayer',Pl)
{
if(PL != DeusExPlayer(Sender))
Blind(Pl);
}
}
}

for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 11);
if(Sender.bAdmin)
{
Blind(DeusExPlayer(APawn));
RCONLog(GetName(Sender)@"blinded"@GetName(APawn));
if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"blinded"@GetName(APawn));
else
Sender.ClientMessage("|P3"$msgTag$"blinded"@GetName(APawn));
}
}
}

else if(left(MutateString,11) ~= "RCON.Swarm ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 11),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
if(Sender.bAdmin)
{
Part = Right(MutateString,Len(MutateString) - 11);
RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);
RCONClass = class( DynamicLoadObject( rcontemp, class'Class' ) );
if ( InStr(RCONTemp,".") == -1 )
{
RCONTemp="DeusEx." $ RCONTemp;
}
if(RCONClass == None)
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" could not be found... Check spelling or make sure the actor name is correct.", 'TeamSay');
}
else
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" swarmed around "$DeusExPlayer(Apawn).PlayerReplicationInfo.PlayerName, 'TeamSay');
Swarm(DeusExPlayer(APawn), RCONTemp);
RCONLog(GetName(Sender)@"swarmed"@GetName(APawn));
SwarmPass=6;
}

}

}
}

else if(left(MutateString,11) ~= "RCON.crush ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 11),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
if(Sender.bAdmin)
{

Part = Right(MutateString,Len(MutateString) - 11);
RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);
if ( InStr(RCONTemp,".") == -1 )
{
RCONTemp="DeusEx." $ RCONTemp;
}
RCONClass = class( DynamicLoadObject( rcontemp, class'Class' ) );
if(RCONClass == None)
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" could not be found... Check spelling or make sure the actor name is correct.", 'TeamSay');
}
else
{
if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"crushed"@GetName(APawn)@"with a"@RCONClass);
else
Sender.ClientMessage("|P3"$msgTag$"Crushed"@GetName(APawn)@"with a"@RCONClass);
Crush(Sender, DeusExPlayer(APawn), RCONTemp);
RCONLog(GetName(Sender)@"crushed"@GetName(APawn));
}

}

}
}

if(MutateString ~= "RCON.KillBlind" && Sender.bAdmin)
{
foreach AllActors(class'Blinder', BL)
{
Bl.Destroy();
Blc++;
}
Sender.ClientMessage(Blc$" RCON.Blinder(s) destroyed.");
}

if(MutateString ~= "RCON.VotingOn" && Sender.bAdmin)
{
bVotingEnabled=True;
SaveConfig();
BroadcastMessage("|P3"$msgTag$"|P4Server Voting has been enabled.");
}

if(MutateString ~= "RCON.VotingOff" && Sender.bAdmin)
{
bVotingEnabled=False;
SaveConfig();
BroadcastMessage("|P3"$msgTag$"|P4Server Voting has been disabled for all players.");
}

if(left(MutateString,10) ~= "RCON.Heal ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 10),InStr(MutateString," ")));
if(ID == -1)
{
if(Sender.bAdmin || IsWhitelisted(Sender))
{
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"healed everyone!");

foreach AllActors(class'DeusExPLayer',Pl)
{
Pl.RestoreAllHealth();
Pl.StopPoison();
Pl.ExtinguishFire();
Pl.drugEffectTimer = 0;
}
}
}

for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 10);
if(Sender.bAdmin)
{
DeusExPlayer(APawn).RestoreAllHealth();
DeusExPlayer(APawn).StopPoison();
DeusExPlayer(APawn).ExtinguishFire();
DeusExPlayer(APawn).drugEffectTimer = 0;

if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"healed"@GetName(APawn));
else
Sender.ClientMessage("|P3"$msgTag$"Healed"@GetName(APawn));
}
}
}

if(MutateString ~= "RCON.Unbork")
{
Sender.ClientMessage("One does not simply unbork Deus Ex.");
}

if(left(MutateString,14) ~= "RCON.VoteKick ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 14),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 14);
if(!bVoteInProgress && bVotingEnabled)
{
EVM = VM_Kick;
PlayerToVoteKick = DeusExPlayer(APawn).PlayerReplicationInfo.PlayerID;
BroadcastMessage("|P3"$msgTag$GetName(Sender)$"("$GetID(Sender)$") started a Votekick against "$APawn.PlayerReplicationInfo.PlayerName);
BroadcastMessage("|P7"$msgTag$"Commands: |P2Mutate Yes|P7 or |P2Mutate No |P7to vote");
Sender.ConsoleCommand("Mutate Yes2");
SetTimer(float(VoteLength), false);
bVoteInProgress=True;
}
else
{
Sender.ClientMessage("|P2"$msgTag$"Can't start vote.");
SystemWarnPlayer(Sender, "Not allowed to vote.");
}

}
}

else if(Left(MutateString,13) ~= "RCON.VoteMap ")
{
RCONChat = Right(MutateString, Len(MutateString) - 13);
if( inStr(RCONChat, "?") != -1)
{
Sender.ClientMessage("|P2"$msgTag$"Illegal Character String in voting. Command Line extensions are not allowed.");
SystemWarnPlayer(Sender, "Illegal Command Line attempt, possible cheat.");
return;
}
if(!bVoteInProgress && bVotingEnabled)
{
EVM = VM_Map;
MapToVoteTravel = RCONChat;
BroadcastMessage("|P3"$msgTag$GetName(Sender)$"("$GetID(Sender)$") started VoteTravel map change to "$MapToVoteTravel);
BroadcastMessage("|P7"$msgTag$"Commands: |P2Mutate Yes|P7 or |P2Mutate No |P7to vote");
Sender.ConsoleCommand("Mutate Yes2");
SetTimer(float(VoteLength), false);
bVoteInProgress=True;
}
else
{
Sender.ClientMessage("|P2"$msgTag$"Vote already in progress.");
SystemWarnPlayer(Sender, "Not allowed to vote.");
}
}
else if(MutateString ~= "Yes2")
{
if(EVM == VM_Kick || EVM == VM_Map)
{
for(j=0;j<3;j++)
if(VoteYes[j] == Sender.PlayerReplicationInfo.PlayerName)
{
Sender.ClientMessage("You have already voted or are using the incorrect command.");
return;
}
for(j=0;j<3;j++)
if(VoteYes[j] == "")
break;
if(j < 3)
{
VoteYes[j] = Sender.PlayerReplicationInfo.PlayerName;
}

}
}
else if(MutateString ~= "Yes")
{
if(EVM == VM_Kick || EVM == VM_Map)
{
for(j=0;j<3;j++)
if(VoteYes[j] == Sender.PlayerReplicationInfo.PlayerName)
{
Sender.ClientMessage("You have already voted!");
return;
}
for(j=0;j<3;j++)
if(VoteYes[j] == "")
break;
if(j < 3)
{
VoteYes[j] = Sender.PlayerReplicationInfo.PlayerName;
BroadcastMessage("|P2"$msgTag$GetName(Sender)$"("$GetID(Sender)$") voted yes. [Total: "$j$"]");
}
}
}
else if(MutateString ~= "RCON.VoteStop")
{
if(Sender.bAdmin)
{
for(j=0;j<8;j++)
{
VoteYes[j] = "";
VoteNo[j] = "";
}
BroadcastMessage("|P2"$msgTag$GetName(Sender)$"("$GetID(Sender)$") An admin has stopped the vote...");
EVM = VM_Off;
bVoteInProgress=False;
}
}
else if(MutateString ~= "No")
{
if(EVM == VM_Kick || EVM == VM_Map)
{
for(j=0;j<3;j++)
if(VoteNo[j] == Sender.PlayerReplicationInfo.PlayerName)
{
Sender.ClientMessage("You have already voted!");
return;
}
for(j=0;j<3;j++)
if(VoteNo[j] == "")
break;
if(j < 3)
{
VoteNo[j] = Sender.PlayerReplicationInfo.PlayerName;
BroadcastMessage("|P2"$msgTag$GetName(Sender)$"("$GetID(Sender)$") voted no. [Total: "$j$"]");
}
}
}

if(left(MutateString,16) ~= "RCON.GoToPlayer ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 16),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 16);
if(Sender.bAdmin || IsWhitelisted(Sender))
{
if(DeusExPlayer(APawn).isinState('Spectating'))
{
DeusExPlayer(Sender).ClientMessage("|P3"$msgTag$"Could not locate "$GetName(APawn)$" due to Spectating state!", 'Teamsay');
return;
}
APawn.PlaySound(sound'PickupActivate', SLOT_None,,, 256);
DeusExPlayer(Sender).ClientMessage("|P3"$msgTag$"Warping to "$GetName(APawn)$"!", 'Teamsay');
DeusExPlayer(APawn).ClientMessage("|P3"$msgTag$GetName(Sender)$" has warped to your location.", 'Teamsay');
Sender.SetCollision(false, false, false);
Sender.bCollideWorld = true;
Sender.GotoState('PlayerWalking');
Sender.SetLocation(APawn.location);
Sender.SetCollision(true, true , true);
Sender.SetPhysics(PHYS_Walking);
Sender.bCollideWorld = true;
Sender.GotoState('PlayerWalking');
Sender.ClientReStart();
Sender.PlaySound(sound'PickupActivate', SLOT_None,,, 256);
}
}
}

if(left(MutateString,12) ~= "RCON.Freeze ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
if(Sender.bAdmin)
{
if(DeusExPlayer(APawn).bMovable)
{
APawn.bMovable=False;
DeusExPlayer(APawn).InHand=None;
if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"froze"@GetName(APawn));
else
Sender.ClientMessage("|P3"$msgTag$"Froze"@GetName(APawn));

}
else
{
APawn.bMovable=True;
if(bBroadcasts)
BroadcastMessage("|P3"$msgTag$GetName(Sender)@"un-froze"@GetName(APawn));
else
Sender.ClientMessage("|P3"$msgTag$"Un-froze"@GetName(APawn));
}
}
}
}

if(left(MutateString,14) ~= "RCON.Gametype ")
{
i = int(Left(Right(MutateString, Len(MutateString) - 14),InStr(MutateString," ")));
//Part = Right(MutateString,Len(MutateString) - 14);
if(Sender.bAdmin)
{
if(RGameTypes[i]=="")
{
Sender.ClientMessage("|P2"$msgTag$"RGAMETYPE["$i$"] is empty. Please check another slot.");
}
else
{
MapString = GetURLMap();
BroadcastMessage("|P4"$msgTag$"An admin is switching gametype to "$RGameTypes[i]);
ConsoleCommand("servertravel "$MapString$"?Game="$RGameTypes[i]);
}

}
}

if(left(MutateString,19) ~= "RCON.GametypeCheck ")
{
i = int(Left(Right(MutateString, Len(MutateString) - 19),InStr(MutateString," ")));
//Part = Right(MutateString,Len(MutateString) - 14);
if(Sender.bAdmin)
{
if(RGameTypes[i]=="")
{
Sender.ClientMessage("|P2"$msgTag$"Array ["$i$"] is empty. ");
}
else
{
Sender.ClientMessage("|P4"$msgTag$" ["$i$"] "$RGameTypes[i]);
}

}
}

if(left(MutateString,14) ~= "RCON.Assemble ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 14),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 14);
if(Sender.bAdmin)
{
BroadcastMessage("|P3"$msgTag$"Everyone has been assembled at "$GetName(APawn)$"'s location.");
APawn.SetCollision(false, false, false);
APawn.bCollideWorld = true;
APawn.GotoState('PlayerWalking');
foreach AllActors(class'DeusExPlayer',DXP)
{
if(DXP != APawn && !DXP.isinState('Spectating') && DXP.Health >= 1)
{
DXP.SetCollision(false, false, false);
DXP.bCollideWorld = true;
DXP.GotoState('PlayerWalking');
DXP.SetLocation(APawn.location);
DXP.SetCollision(true, true , true);
DXP.SetPhysics(PHYS_Walking);
DXP.bCollideWorld = true;
DXP.GotoState('PlayerWalking');
DXP.ClientReStart();
Sender.PlaySound(sound'PickupActivate', SLOT_None,,, 256);
}
}
APawn.SetCollision(true, true , true);
APawn.SetPhysics(PHYS_Walking);
APawn.bCollideWorld = true;
APawn.GotoState('PlayerWalking');
APawn.ClientReStart();
APawn.PlaySound(sound'PickupActivate', SLOT_None,,, 256);
}
}
}

if(left(MutateString,17) ~= "RCON.BringPlayer ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 17),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 17);
if(Sender.bAdmin)
{
if(DeusExPlayer(APawn).isinState('Spectating'))
{
DeusExPlayer(Sender).ClientMessage("|P3"$msgTag$"Could not locate "$GetName(APawn)$" due to Spectating state!", 'Teamsay');
return;
}
if(APawn.Health <= 0)
{
DeusExPlayer(Sender).ClientMessage("|P3"$msgTag$"Could not locate "$GetName(APawn)$" due to death!", 'Teamsay');
return;
}
DeusExPlayer(Sender).ClientMessage("|P3"$msgTag$GetName(APawn)$" has been summoned to your location.", 'Teamsay');
DeusExPlayer(APawn).ClientMessage("|P3"$msgTag$GetName(Sender)$" has taken you to their location.", 'Teamsay');
APawn.SetCollision(false, false, false);
APawn.bCollideWorld = true;
APawn.GotoState('PlayerWalking');
APawn.SetLocation(sender.location);
APawn.SetCollision(true, true , true);
APawn.SetPhysics(PHYS_Walking);
APawn.bCollideWorld = true;
APawn.GotoState('PlayerWalking');
APawn.ClientReStart();
Sender.PlaySound(sound'PickupActivate', SLOT_None,,, 256);
APawn.PlaySound(sound'PickupActivate', SLOT_None,,, 256);
}
}
}

else if(left(MutateString,11) ~= "RCON.Admin ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 11),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 11);
if(Sender.bAdmin)
{
MakeAdmin(APawn);
}
}
}

else if(left(MutateString,12) ~= "RCON.Rocket ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
if(Sender.bAdmin)
{
// PlayerPawn(APawn).ReducedDamageType = '';
APawn.setPhysics(PHYS_Falling);
APawn.Velocity = vect(0,0,5000);
BroadcastMessage("|P7"$msgTag$GetName(APawn)$" has been LAAAAAAUNCHED in to the air by "$GetName(Sender)$"!!!!");
}
}
}

else if(left(MutateString,12) ~= "RCON.ShowIP ")
{
ID = int(Right(MutateString,Len(MutateString) - 12));
if(Sender.bAdmin)
{
for(APawn = level.pawnlist; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(GetID(APawn) == ID)
if(PlayerPawn(aPawn) == none || NetConnection(PlayerPawn(aPawn).Player) != None)
ListPlayer(APawn,Sender);
}
}

else if(Left(MutateString,4) ~= "Help")
{
RCONTemp = Right(MutateString, Len(MutateString) - 4);
if(RCONTemp ~= "Admin")
{
Sender.ClientMessage("|P2Admin Only : Smite, Heal, Give, GiveTo, GiveAll, Admin, Switch, Rename, Ghost, Walk, VoteStop, Remote, Freeze, Gametype, GametypeCheck, TPMode, TPBio");
Sender.ClientMessage("|P2ShowIP, Velocity, BanIP, Warn, UnWarn, Create, Create2, Login, Logout, DXMP, Setting, Say, Con, Vict, Rocket, Echo, GoToPlayer, BringPlayer, Pass, Set, Get, SelfSetRep, SelfSet");
}
else if(RCONTemp ~= "Player")
{
Sender.ClientMessage("|P3All players: RCON.* Ping, Tell, NameColour, VoteMap, VoteKick, TP");
Sender.ClientMessage("|P3Register system: Mutate Register to protect your name. Admin functions: Register.Admin, Register.Delete, Register.Check");
Sender.ClientMessage("|P3RCON.Chat : Sends a message to all logged in admins.");
}
else if(RCONTemp == "")
{
Sender.ClientMessage("|P3RCON Mutator, by Kai 'TheClown'. Version 9.x");
Sender.ClientMessage("|P3Enter Mutate HelpAdmin or HelpPlayer for command list.");
}
}

else if(Left(MutateString,14) ~= "RCON.Velocity ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString, Len(MutateString) - 14);
if(RCONTemp ~= "Glide")
{
Sender.DoJump();
Sender.SetPhysics(PHYS_Flying);
}

else if(RCONTemp ~= "Fall")
{
Sender.DoJump();
Sender.SetPhysics(PHYS_Falling);
}

else if(RCONTemp ~= "Up")
{
Sender.Velocity = vect(0,0,512);
}

else if(RCONTemp ~= "Down")
{
Sender.Velocity = vect(0,0,-512);
}
else
{
Sender.ClientMessage("|P2"$msgTag$"Valid inputs are: Glide, Fall, Up, Down");
}
}
}

else if(Left(MutateString,9) ~= "RCON.sta ")
{
ip = Right(MutateString, Len(MutateString) - 9);
sender.clientmessage(ip);
RCONTemp = class'StaticExt'.static.repl(ip, "a", "b");
sender.clientmessage(RCONTemp);
RCONTemp = class'StaticExt'.static.repl(ip, "A", "b");
sender.clientmessage(RCONTemp);
}

else if(Left(MutateString,11) ~= "RCON.BanIP ")
{
if(Sender.bAdmin)
{
IP = Right(MutateString, Len(MutateString) - 11);
for(APawn = Level.PawnList; APawn != none; APawn = APawn.NextPawn)
if(APawn.bIsPlayer)
if(Left(GetIP(APawn),Len(IP)) ~= IP)
if(PlayerPawn(aPawn) == none || NetConnection(PlayerPawn(aPawn).Player) != None)
for(i=0;i<50;i++)
if(Level.Game.IPPolicies[i] == "")
{
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'RCON');
log("~banning IP address "$IP$"~", 'RCON');
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'RCON');
Level.Game.IPPolicies[i] = "DENY,"$IP;
Level.Game.SaveConfig();
APawn.Destroy();
break;
}
}
}

if(left(MutateString,15) ~= "RCON.BanDelete ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 15),InStr(MutateString," ")));
if(Sender.bAdmin)
{
if(Level.Game.IPPolicies[ID] != "")
{
PrintAdmin("Ban entry removed "$ID$" ("$Level.Game.IPPolicies[ID]$")");
Level.Game.IPPolicies[ID] = "";
Level.Game.SaveConfig();
}
else
{
Sender.Clientmessage("Ban entry is empty.");
}
}
}

if(left(MutateString,14) ~= "RCON.BanCheck ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 14),InStr(MutateString," ")));
if(Sender.bAdmin)
{
if(Level.Game.IPPolicies[ID] != "")
{
PrintAdmin("IPPolicies "$ID$" ("$Level.Game.IPPolicies[ID]$")");
}
else
{
Sender.Clientmessage("Ban entry is empty.");
}
}
}

else if(Left(MutateString,11) ~= "RCON.Login ")
{
if(!Sender.bAdmin)
{
RCONTemp = Right(MutateString, Len(MutateString) - 11);

if(RCONTemp == RCONPassword)
{
PrintAdmin("A player has logged in using RCON. ["$GetName(Sender)$"]");
Sender.PlayerReplicationInfo.bAdmin = True;
Sender.bAdmin = True;
Sender.bCheatsEnabled = True;
Sender.ClientMessage("|P3Client login accepted. Administrator access active.", 'TeamSay');
}
else
{
Sender.ClientMessage("|P2Client login denied (Incorrect password)", 'TeamSay');
SystemWarnPlayer(Sender, "incorrect password");
}
}
}

else if(Left(MutateString,10) ~= "RCON.DXMP ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString, Len(MutateString) - 10);
ConsoleCommand("Set DeusExMPGame "$RCONTemp);
BroadcastMessage("|P3"$msgTag$"A game property was changed: "$RCONTemp);
}
}

else if(Left(MutateString,13) ~= "RCON.Setting ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString, Len(MutateString) - 13);
ConsoleCommand("Set RCON "$RCONTemp);
BroadcastMessage("|P3"$msgTag$"An RCON setting was changed: "$RCONTemp);
}
}

else if(Left(MutateString,10) ~= "RCON.Vict ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString, Len(MutateString) - 10);
if(RCONTemp ~= "Frags")
{
ConsoleCommand("Set DeusExMPGame victorycondition "$RCONTemp);
BroadcastMessage("|P3"$msgTag$"VictoryCondition changed: Kill Limit.");
}
else if(RCONTemp ~= "Time")
{
ConsoleCommand("Set DeusExMPGame victorycondition "$RCONTemp);
BroadcastMessage("|P3"$msgTag$"VictoryCondition changed: Timer.");
}
else if(RCONTemp ~= "None")
{
ConsoleCommand("Set DeusExMPGame victorycondition "$RCONTemp);
BroadcastMessage("|P3"$msgTag$"Victory Condition disabled. Match will not end until victory condition is set.");
}
else
{
Sender.ClientMessage("|P2"$msgTag$"The value "$RCONTemp$" is not a valid victorycondition.");
}

}
}

else if(Left(MutateString,16) ~= "RCON.NameColour ")
{
RCONTemp = Right(MutateString, Len(MutateString) - 16);
AName = DeusExPlayer(Sender).PlayerReplicationInfo.PlayerName;
aname=RCONTemp$Aname;
aname=Left(aname,32);
DeusExPlayer(Sender).Playerreplicationinfo.PlayerName = AName;
DeusExPlayer(Sender).ClientMessage("|P3"$msgTag$"Name formatted to "$RCONTemp$Aname);
APawn.SaveConfig();
}

else if(left(MutateString,12) ~= "RCON.Rename ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);

if(Sender.bAdmin)
{
BroadcastMessage("|P3"$msgTag$APawn.PlayerReplicationInfo.PlayerName$"|P3 was renamed to |P2"$RCONTemp$"|P3 by |P2"$GetName(Sender));

DeusExPlayer(APawn).Playerreplicationinfo.Playername = RCONTemp;
APawn.SaveConfig();
}
}
}

else if(Left(MutateString,9) ~= "RCON.Con ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString, Len(MutateString) - 9);
ConsoleCommand(RCONTemp);
DeusExPlayer(Sender).LocalLog("Command input: "$RCONTemp);
}
}

else if(Left(MutateString,14) ~= "RCON.AddIRCOp ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString, Len(MutateString) - 14);
if(RCONTemp != "")
{
for(a=0;a<10;a++)
{
foreach AllActors(class'IRCLink', _IRC)
{
if(_IRC.OpUsernames[a] == "")
{
_IRC.OpUsernames[a] = RCONTemp;
_IRC.SaveConfig();
BroadcastMessage("A new IRC operator has been added:"@RCONTemp);
return;
}
}
}
}
}
}

else if(Left(MutateString,14) ~= "RCON.RemIRCOp ")
{
if(Sender.bAdmin)
{
ID = int(Left(Right(MutateString, Len(MutateString) - 11),InStr(MutateString," ")));
foreach AllActors(class'IRCLink', _IRC)
{
if(_IRC.OpUsernames[id] != "")
{
_IRC.OpUsernames[id] = "";
_IRC.SaveConfig();
BroadcastMessage("An IRC operator has been removed.");
return;
}
}
}
}

else if(Left(MutateString,9) ~= "RCON.Say ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString, Len(MutateString) - 9);
ConsoleCommand("say"@RCONTemp);
}
}

else if(Left(MutateString,10) ~= "RCON.Chat ")
{
RCONChat = Right(MutateString, Len(MutateString) - 10);
if(Sender.Playerreplicationinfo.bAdmin)
{
foreach allactors (class'DeusExPlayer',DXP)
if(DXP.PlayerReplicationInfo.bAdmin)
DXP.ClientMessage("|P7[ADMIN] |P1"$GetName(Sender)$"("$GetID(Sender)$"): |P1"$RCONChat, 'TeamSay');

foreach AllActors(class'MessagingSpectator', MS)
if(string(ms.Class) ~= "dxtelnetadmin.telnetspectator")
ms.ClientMessage("[ADMIN] "$GetName(Sender)$"("$GetID(Sender)$"): "$RCONChat,'Say');

ForEach AllActors(class'AthenaSpectator', _AS)
if(_AS != None)
_AS.ClientMessage(GetName(Sender)$"("$GetID(Sender)$"): "$RCONChat,'Say');

}
else
{
foreach allactors (class'DeusExPlayer',DXP)
if(DXP.PlayerReplicationInfo.bAdmin)
DXP.ClientMessage("|P7[ADMIN MESSAGE FROM PLAYER] |P1"$GetName(Sender)$"("$GetID(Sender)$"): "$RCONChat, 'TeamSay');

foreach AllActors(class'MessagingSpectator', MS)
if(string(ms.Class) ~= "dxtelnetadmin.telnetspectator")
ms.ClientMessage("[PLAYER -> ADMIN] "$GetName(Sender)$"("$GetID(Sender)$"): "$RCONChat,'Say');

Sender.ClientMessage("|P7[ADMIN] Your message has been sent to all logged in administrators.", 'Teamsay');
}

}

else if(Left(MutateString,10) ~= "RCON.Pass ")
{
RCONChat = Right(MutateString, Len(MutateString) - 10);
if(Sender.Playerreplicationinfo.bAdmin)
{
OP = RCONChat;
Sender.ConsoleCommand("Admin Set Gameinfo Gamepassword "$RCONChat);
if(RCONChat != "")
{
BroadcastMessage("|P3"$msgTag$"The GamePassword has been changed to "$RCONChat);
}
else
{
BroadcastMessage("|P3"$msgTag$"The GamePassword has been removed.");
}
}
}

else if(Left(MutateString,10) ~= "RCON.Echo ")
{
RCONChat = Right(MutateString, Len(MutateString) - 10);
if(Sender.Playerreplicationinfo.bAdmin)
{
foreach allactors (class'DeusExPlayer',DXP)
{
DXP.LocalLog(RCONChat);
}
}
}

else if (MutateString ~= "RCON.TP")
{
if(Sender.isinState('Spectating'))
{
DeusExPlayer(Sender).ClientMessage("|P3"$msgTag$"Could not teleport due to Spectating state!", 'Teamsay');
return;
}
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 90000;

Trace(hitLocation, hitNormal, loc+line, loc, true);
if(TPM == T_OFF)
{
Sender.ClientMessage(msgTag$"Player teleporting currently disabled.");
Sender.PlaySound(sound'PickupDeActivate', SLOT_None,,, 256);
}

if(TPM == T_Admin)
{
if(Sender.bAdmin)
{
SpawnExplosion(HitLocation);
SpawnExplosion(loc);
DrawTeleportBeam(HitLocation, Sender.Location, Sender);
Sender.SetPhysics(Phys_None);
Sender.PlaySound(TPSound, SLOT_None,,, 256);
TeleportTo(HitLocation, DeusExPlayer(Sender));
//Sender.SetLocation(HitLocation);
Sender.SetPhysics(Phys_Falling);
}
else
{
Sender.ClientMessage(msgTag$"Player teleporting currently disabled.");
Sender.PlaySound(sound'PickupDeActivate', SLOT_None,,, 256);
}
}
if(TPM == T_Limited)
{
if(DeusExPlayer(Sender).Energy > TPBioUse)
{
DeusExPlayer(Sender).Energy -= TPBioUse;
SpawnExplosion(HitLocation);
SpawnExplosion(loc);
DrawTeleportBeam(HitLocation, Sender.Location, Sender);
Sender.SetPhysics(Phys_None);
Sender.PlaySound(TPSound, SLOT_None,,, 256);
TeleportTo(HitLocation, DeusExPlayer(Sender));
Sender.SetPhysics(Phys_Falling);
}
else
{
Sender.ClientMessage(msgTag$"Not enough bio energy to teleport.");
Sender.PlaySound(sound'PickupDeActivate', SLOT_None,,, 256);
}
}
if(TPM == T_AdminLimited)
{
if(!Sender.bAdmin)
{
if(DeusExPlayer(Sender).Energy > TPBioUse)
{
DeusExPlayer(Sender).Energy -= TPBioUse;
SpawnExplosion(HitLocation);
SpawnExplosion(loc);
DrawTeleportBeam(HitLocation, Sender.Location, Sender);
Sender.SetPhysics(Phys_None);
//Sender.SetLocation(HitLocation);
TeleportTo(HitLocation, DeusExPlayer(Sender));
Sender.SetPhysics(Phys_Falling);
Sender.PlaySound(TPSound, SLOT_None,,, 256);
}
else
{
Sender.ClientMessage(msgTag$"Not enough bio energy to teleport.");
Sender.PlaySound(sound'PickupDeActivate', SLOT_None,,, 256);
}
}
else
{
SpawnExplosion(HitLocation);
SpawnExplosion(loc);
DrawTeleportBeam(HitLocation, Sender.Location, Sender);
Sender.SetPhysics(Phys_None);
//Sender.SetLocation(HitLocation);
Sender.PlaySound(TPSound, SLOT_None,,, 256);
TeleportTo(HitLocation, DeusExPlayer(Sender));
Sender.SetPhysics(Phys_Falling);
}
}
}

else if (MutateString ~= "RCON.Phys")
{
if(Sender.isinState('Spectating'))
{
DeusExPlayer(Sender).ClientMessage("|P3"$msgTag$"Can't use while spectating!", 'Teamsay');
return;
}
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 90000;

Trace(hitLocation, hitNormal, loc+line, loc, true);

if(DeusExPlayer(Sender).Energy > PhysBioUse)
{
SpawnExplosion(Sender.Location);
DeusExPlayer(Sender).Energy -= PhysBioUse;
Sender.DoJump();
Sender.PlaySound(PhysSound, SLOT_None,,, 256);
Sender.Velocity = (normal(HitLocation - Sender.Location) * PhysSpeed);
Sender.SetPhysics(Phys_Falling);
}
else
{
Sender.ClientMessage(msgTag$"Not enough bio energy.");
Sender.PlaySound(sound'PigeonCoo', SLOT_None,,, 256);
}
}

else if (MutateString ~= "RCON.TPMODE")
{
if(Sender.bAdmin)
{
if(TPM == T_Admin)
{
TPM = T_Limited;
SaveConfig();
BroadcastMessage("|P7"$msgTag$"Teleportation system set to GLOBAL ACESS. |P4Mutate RCON.TP command enabled for all. Bio usage at "$formatFloat(TPBioUse)$" for all players.");
return;
}

if(TPM == T_Limited)
{
TPM = T_AdminLimited;
SaveConfig();
BroadcastMessage("|P7"$msgTag$"Teleportation system set to GLOBAL ACESS|P2+|P4 Bio usage at "$formatFloat(TPBioUse)$" for non-admin players. Administrator use does not use bio energy.");
return;
}

if(TPM == T_AdminLimited)
{
TPM = T_OFF;
SaveConfig();
BroadcastMessage("|P7"$msgTag$"Teleportation system is now OFF.");
return;
}

if(TPM == T_OFF)
{
TPM = T_Admin;
SaveConfig();
BroadcastMessage("|P7"$msgTag$"Teleportation system set to ADMIN ONLY. No Bio usage.");
return;
}
}
}

if(left(MutateString,11) ~= "RCON.TPBio ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 11),InStr(MutateString," ")));
TPBioUse = ID;
SaveConfig();
BroadcastMessage("|P7"$msgTag$"Teleportation Bio usage is now set at "$formatFloat(TPBioUse)$" for all players.");

}

else if(MutateString ~= "RCON.NPTEnable")
{
ConsoleCommand("Set NephthysDrv bUscriptAPI True");
BroadcastMessage("|P7"$msgTag$"Nephthys USCRIPT API accessed.");
}

else if(MutateString ~= "RCON.NPTDisable")
{
ConsoleCommand("Set NephthysDrv bUscriptAPI False");
BroadcastMessage("|P7"$msgTag$"Nephthys USCRIPT API disabled.");
}

else if (MutateString ~= "RCON.Ghost")
{
if(Sender.bAdmin)
{
Sender.UnderWaterTime = -1.0;
Sender.bHidden=True;
Sender.SetCollision(false, false, false);
Sender.bCollideWorld = true;
Sender.GotoState('PlayerWalking');
Sender.ClientMessage("You feel somewhat ghostly.", 'Say');
}
}

else if (MutateString ~= "RCON.Ghost2")
{
if(Sender.bAdmin)
{
Sender.UnderWaterTime = -1.0;
Sender.SetCollision(false, false, false);
Sender.bCollideWorld = true;
Sender.GotoState('PlayerWalking');
Sender.ClientMessage("You feel somewhat ghostly.", 'Say');
}
}

else if (MutateString ~= "RCON.Ghost0")
{
if(Sender.bAdmin)
{
Sender.UnderWaterTime = Sender.Default.UnderWaterTime;
Sender.SetCollision(true, true , true);
Sender.SetPhysics(PHYS_Walking);
Sender.bCollideWorld = true;
Sender.bHidden=False;
Sender.GotoState('PlayerWalking');
Sender.ClientReStart();
Sender.ClientMessage("You return to normal", 'Say');
}
}

else if (MutateString ~= "RCON.Fly")
{
if(!bPlayerCheatsFly)
bBlockit=True;

if(bRestricted(Sender))
bBlockit=True;

if(IsWhitelisted(Sender))
bBlockit=False;

if(!bBlockit)
{
Sender.bAdmin=True;
Sender.PlayerReplicationInfo.bAdmin=True;
Sender.bCheatsEnabled=True;
Sender.ConsoleCommand("Fly");
Sender.bAdmin=False;
Sender.bCheatsEnabled=False;
Sender.PlayerReplicationInfo.bAdmin=False;
}
}

else if (MutateString ~= "RCON.Walk")
{
if(!bPlayerCheatsFly)
bBlockit=True;

if(bRestricted(Sender))
bBlockit=True;

if(IsWhitelisted(Sender))
bBlockit=False;

if(!bBlockit)
{
Sender.bAdmin=True;
Sender.PlayerReplicationInfo.bAdmin=True;
Sender.bCheatsEnabled=True;
Sender.ConsoleCommand("Walk");
Sender.bAdmin=False;
Sender.bCheatsEnabled=False;
Sender.PlayerReplicationInfo.bAdmin=False;
}
}
else if (MutateString ~= "RCON.God")
{
if(!bPlayerCheats)
bBlockit=True;

if(bRestricted(Sender))
bBlockit=True;

if(IsWhitelisted(Sender))
bBlockit=False;

if(!bBlockit)
{
Sender.bAdmin=True;
Sender.PlayerReplicationInfo.bAdmin=True;
Sender.bCheatsEnabled=True;
Sender.ConsoleCommand("God");
Sender.bAdmin=False;
Sender.bCheatsEnabled=False;
Sender.PlayerReplicationInfo.bAdmin=False;
}
}
/*
static function bool SetSkinElement(Actor SkinActor, int SkinNo, string SkinName, string DefaultSkinName)
{

NewSkin = Texture(DynamicLoadObject(SkinName, class'Texture'));
if ( NewSkin != None )
{
SkinActor.Multiskins[SkinNo] = NewSkin;
return True;
}
else
{
log("Failed to load "$SkinName);
if(DefaultSkinName != "")
{
NewSkin = Texture(DynamicLoadObject(DefaultSkinName, class'Texture'));
SkinActor.Multiskins[SkinNo] = NewSkin;
}
return False;
}
} */
else if(Left(MutateString,19) ~= "RCON.SetMultiskins ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 19),InStr(MutateString," ")));
Part = Right(MutateString,Len(MutateString) - 19);
RccTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);

if(Sender.bAdmin)
{
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);

if ( hitActor.isA('DeusExDecoration') || hitActor.isA('Pawn') )
{
/*if ( InStr(rcctemp,".") == -1 )
{
rcctemp="DeusEx." $ rcctemp;
}*/
//RCTex = Texture(DynamicLoadObject(RCCTemp, class'Texture'));
if(ID >= 0 && ID <=7)
{
//hitActor.SetPropertyText("Multiskins<"$ID$">", RCCTemp);
HitActor.Multiskins[id] = Texture(DynamicLoadObject(RCCTemp, class'Texture'));
}
else
Sender.ClientMessage(msgTag$"|p2 Multiskins("$id$") Array out of bounds. (0-7)");
}
else
{
Sender.ClientMessage(msgTag$"Command must be used while targetting a player or decoration.");
}

}
}

else if(Left(MutateString,18) ~= "RCON.MyMultiskins ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 18),InStr(MutateString," ")));
Part = Right(MutateString,Len(MutateString) - 18);
RccTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(ID >= 0 && ID <=7)
{
Sender.Multiskins[id] = Texture(DynamicLoadObject(RCCTemp, class'Texture'));

}
else
Sender.ClientMessage(msgTag$"|p2 Multiskins("$id$") Array out of bounds. (0-7)");

}

else if (MutateString ~= "RCON.GroupAdd" && Sender.bAdmin)
{
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);

if ( hitActor.isA('DeusExDecoration') || hitActor.isA('DeusExMover'))
{
foreach AllActors(class'GroupingActor', GA)
{
if(GA.aOwner == Sender)
{
bGAFound=True;
GA.AddGroupActor(HitActor);
}
}
if(!bGAFound)
{
GASpawn = Spawn(class'GroupingActor');
GASpawn.aOwner = Sender;
GASpawn.AddGroupActor(HitActor);
Sender.ClientMessage("|P4New trigger group was created.");
Sender.ClientMessage("|P3Actor added to trigger group.");
}
}
}

else if (MutateString ~= "RCON.GroupRemove")
{
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);

if ( hitActor.isA('DeusExDecoration') || hitActor.isA('DeusExMover'))
{
foreach AllActors(class'GroupingActor', GA)
{
if(GA.aOwner == Sender)
{
bGAFound=True;
GA.RemoveGroupActor(HitActor);
}
}
if(!bGAFound)
{
Sender.ClientMessage("|P2Error: No trigger group found.");
}
}
}

else if (MutateString ~= "RCON.GroupTrigger")
{
foreach AllActors(class'GroupingActor', GA)
{
if(GA.aOwner == Sender)
{
bGAFound=True;
GA.Trigger(Sender, Sender);
}
}
if(!bGAFound)
{
Sender.ClientMessage("|P2Error: No trigger group found.");
}
}

else if (MutateString ~= "RCON.Clone")
{
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);

if ( hitActor.isA('DeusExDecoration') || hitActor.isA('Pawn') )
{
Sender.Mesh = hitActor.Mesh;
Sender.Drawscale=hitActor.Drawscale;
Sender.Fatness = hitActor.Fatness;
Sender.Skin = hitActor.Skin;
Sender.Texture = hitActor.Texture;
Sender.bMeshEnviroMap = hitActor.bMeshEnviroMap;
Sender.Multiskins[0] = HitActor.MultiSkins[0];
Sender.Multiskins[1] = HitActor.MultiSkins[1];
Sender.Multiskins[2] = HitActor.MultiSkins[2];
Sender.Multiskins[3] = HitActor.MultiSkins[3];
Sender.Multiskins[4] = HitActor.MultiSkins[4];
Sender.Multiskins[5] = HitActor.MultiSkins[5];
Sender.Multiskins[6] = HitActor.MultiSkins[6];
Sender.Multiskins[7] = HitActor.MultiSkins[7];
Sender.ClientMessage(msgTag$"|p3"$hitActor.Class$" cloned.");
}
else
{
Sender.ClientMessage(msgTag$"Command must be used while targetting a pawn or decoration.");
}
}

else if (MutateString ~= "RCON.CloneTo")
{
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);

if ( hitActor.isA('DeusExDecoration') || hitActor.isA('Pawn') )
{
hitActor.Mesh = Sender.Mesh;
hitActor.Drawscale=Sender.Drawscale;
hitActor.Fatness = Sender.Fatness;
hitActor.Skin = Sender.Skin;
hitActor.Texture = Sender.Texture;
hitActor.bMeshEnviroMap = Sender.bMeshEnviroMap;
hitActor.Multiskins[0] = Sender.MultiSkins[0];
hitActor.Multiskins[1] = Sender.MultiSkins[1];
hitActor.Multiskins[2] = Sender.MultiSkins[2];
hitActor.Multiskins[3] = Sender.MultiSkins[3];
hitActor.Multiskins[4] = Sender.MultiSkins[4];
hitActor.Multiskins[5] = Sender.MultiSkins[5];
hitActor.Multiskins[6] = Sender.MultiSkins[6];
hitActor.Multiskins[7] = Sender.MultiSkins[7];
Sender.ClientMessage(msgTag$"|p3"$hitActor.Class$" cloned.");
}
else
{
Sender.ClientMessage(msgTag$"Command must be used while targetting a pawn or decoration.");
}
}

else if(Left(MutateString,9) ~= "RCON.Set ")
{
RCONTemp = Right(MutateString,Len(MutateString) - 9);
//RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(Sender.bAdmin)
{
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);


i = InStr(RCONTemp, " ");
SetA = Left(RCONTemp, i );
SetB = Right(RCONTemp, Len(RCONTemp) - i - 1);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
if (hitActor.GetPropertyText(SetA) == "")
{
Sender.ClientMessage(msgTag$"|p2Unrecognized property in class "$hitActor.Class$"!");
return;
}
else
{
hitActor.SetPropertyText(SetA, SetB);
Sender.ClientMessage(msgTag$"|p3"$hitActor.Class$" property "$SetA$" set to "$SetB$"!");
return;
}
}
}
}

else if(Left(MutateString,9) ~= "RCON.Get ")
{
RCONTemp = Right(MutateString,Len(MutateString) - 9);
//RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);
if(Sender.bAdmin)
{
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
if (hitActor.GetPropertyText(RCONTemp) != "")
{
Sender.ClientMessage(msgTag$"|p4"$hitActor.GetPropertyText(RCONTemp)$" in class "$hitActor.Class$"!");
return;
}
else
{
Sender.ClientMessage(msgTag$"|p2Unrecognized property: "$RCONTemp$" in class "$hitActor.Class$"!");
}
}
}
}

else if(MutateString ~= "RCON.trigger")
{
if(Sender.bAdmin || (bPlayerCheatsTools && !Sender.bAdmin))
{
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);

if (hitActor != None && !hitActor.isA('LevelInfo'))
{
hitActor.Trigger(Sender, Sender);
}
}
}

else if(MutateString ~= "RCON.Lock")
{
if(Sender.bAdmin || (bPlayerCheatsTools && !Sender.bAdmin) || IsWhitelisted(Sender))
{
bTakeDamage=False;
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);
if (hitActor != None)
{
hitMover = DeusExMover(hitActor);
if (hitMover != None)
{
hitMover.bLocked = !hitMover.bLocked;
hitMover.bPickable = False;
Sender.ClientMessage("Lock state; "$hitMover.bLocked);
}
}
}
}

else if(MutateString ~= "RCON.tantalus")
{
if(Sender.bAdmin || (bPlayerCheatsTools && !Sender.bAdmin) || IsWhitelisted(Sender))
{
bTakeDamage=False;
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 4000;
HitActor = Trace(hitLocation, hitNormal, loc+line, loc, true);
if (hitActor != None)
{
hitMover = DeusExMover(hitActor);
hitPawn = ScriptedPawn(hitActor);
hitDecoration = DeusExDecoration(hitActor);
hitPlayer = PlayerPawn(hitActor);
if (hitMover != None)
{
if(Sender.bAdmin)
{
hitMover.bBreakable = true;
hitMover.doorStrength = 0;
}
damage=5000;
bTakeDamage = true;
}
else if (hitPawn != None)
{
if(Sender.bAdmin)
{
hitPawn.bInvincible = false;
hitPawn.HealthHead = 0;
hitPawn.HealthTorso = 0;
hitPawn.HealthLegLeft = 0;
hitPawn.HealthLegRight = 0;
hitPawn.HealthArmLeft = 0;
hitPawn.HealthArmRight = 0;
hitPawn.Health = 0;
}
damage=5000;
bTakeDamage = true;
}
else if (hitDecoration != None)
{
if(Sender.bAdmin)
{
hitDecoration.bInvincible = false;
hitDecoration.HitPoints = 0;
}
bTakeDamage = true;
}
else if (hitPlayer != None)
{
if(Sender.bAdmin)
{
hitPlayer.ReducedDamageType = '';
}
damage = 5000;
bTakeDamage = true;
}
else if (hitActor != Level)
{
damage = 5000;
bTakeDamage = true;
}
}

if (bTakeDamage)
hitActor.TakeDamage(damage, Sender, hitLocation, line, 'Tantalus');
}
}

else if(Left(MutateString,13) ~= "RCON.SelfSet ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString,Len(MutateString) - 13);
// RCONTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);

i = InStr(RCONTemp, " ");
SetA = Left(RCONTemp, i );
SetB = Right(RCONTemp, Len(RCONTemp) - i - 1);

if (Sender != None)
{
if (Sender.GetPropertyText(SetA) == "")
{
Sender.ClientMessage(msgTag$"|p2Unrecognized property.");
return;
}
else
{
Sender.SetPropertyText(SetA, SetB);
Sender.ClientMessage(msgTag$"|p3Self property "$SetA$" set to "$SetB$"!");
return;
}
}
}
}

else if(Left(MutateString,16) ~= "RCON.SelfSetRep ")
{
if(Sender.bAdmin)
{
RCONTemp = Right(MutateString,Len(MutateString) - 16);

i = InStr(RCONTemp, " ");
SetA = Left(RCONTemp, i );
SetB = Right(RCONTemp, Len(RCONTemp) - i - 1);

if (Sender != None)
{
if (Sender.PlayerReplicationInfo.GetPropertyText(SetA) == "")
{
Sender.ClientMessage(msgTag$"|p2Unrecognized property.");
return;
}
else
{
Sender.PlayerReplicationInfo.SetPropertyText(SetA, SetB);
Sender.ClientMessage(msgTag$"|p3Self property "$SetA$" set to "$SetB$"!");
return;
}
}
}
}

else if(Left(MutateString,12) ~= "RCON.Create ")
{
if(Sender.bAdmin || IsWhitelisted(Sender))
{
Rcctemp = Right(MutateString, Len(MutateString) - 12);
if ( InStr(rcctemp,".") == -1 )
{
rcctemp="DeusEx." $ rcctemp;
}
RCONClass = class( DynamicLoadObject( rcctemp, class'Class' ) );
if(RCONClass == None)
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" could not be found... Check spelling or make sure the actor name is correct.", 'TeamSay');
}
else
{
Sender.ClientMessage("|P3"$msgTag$RCONClass$" created.", 'TeamSay');
Spawn( RCONClass,Sender,,Sender.Location,);
}
}
}

else if(Left(MutateString,18) ~= "RCON.AddSummonBan " && Sender.bAdmin)
{
rcctemp = Right(MutateString, Len(MutateString) - 18);
for (n=0;n<30;n++)
if(bannedsummons[n] == "")
{
BannedSummons[n] = rcctemp;
SaveConfig();
PrintAdmin("New Summon Ban added:"@n@rcctemp);
return;
}
}

else if(Left(MutateString,26) ~= "RCON.AddSummonBanSpecific " && Sender.bAdmin)
{
rcctemp = Right(MutateString, Len(MutateString) - 26);
for (n=0;n<30;n++)
if(bannedsummonsspecific[n] == "")
{
BannedSummonsspecific[n] = rcctemp;
SaveConfig();
PrintAdmin("New Specific Summon Ban added:"@n@rcctemp);
return;
}
}

else if(Left(MutateString,18) ~= "RCON.RemSummonBan " && Sender.bAdmin)
{
rcctemp = Right(MutateString, Len(MutateString) - 18);
for (n=0;n<30;n++)
if(instr(caps(rcctemp), caps(BannedSummons[n])) != -1)
{
BannedSummons[n] = "";
SaveConfig();
PrintAdmin("Summon ban removed:"@n@rcctemp);
return;
}
}

else if(Left(MutateString,26) ~= "RCON.RemSummonBanSpecific " && Sender.bAdmin)
{
rcctemp = Right(MutateString, Len(MutateString) - 26);
for (n=0;n<30;n++)
if(instr(caps(rcctemp), caps(BannedSummonsSpecific[n])) != -1)
{
BannedSummonsSpecific[n] = "";
SaveConfig();
PrintAdmin("Specific summon ban removed:"@n@rcctemp);
return;
}
}

else if(Left(MutateString,12) ~= "RCON.Summon ")
{
rcctemp = Right(MutateString, Len(MutateString) - 12);
bGoodToGo=True;
if(!bPlayerSummoning)
bBlockit=True;

if(bRestricted(Sender))
bBlockit=True;

if(IsWhitelisted(Sender))
bBlockit=False;

if(bBlockit)
{
Sender.ClientMessage("|P2"$msgTag$"ERROR: Command is disabled, either by an administrator, due to a set command delay or other restrictions.", 'TeamSay');
bGoodToGo=False;
}

if(bTimedSummoning && bPlayerSummoning)
{
RST = Spawn(class'RSTimer');
RST.SetTimer(SummonTimer,False);
RST.CallbackMut=Self;
bPlayerSummoning=False;

}
if(bGoodToGo && bRestrictPlayerSummons)
{
for (n=0;n<30;n++)
if(bannedsummons[n] != "")
{
if(instr(caps(rcctemp), caps(BannedSummons[n])) != -1)
{
Sender.ClientMessage("|P2"$msgTag$"ERROR: This object has been banned. (Rule "$n$":"@BannedSummons[n]$")", 'TeamSay');
Log(sender.playerreplicationinfo.playername$" tried to summon banned object"@rcctemp);
bGoodToGo=False;
}
}

for (n=0;n<30;n++)
{
if(bannedsummonsspecific[n] != "")
{
if(rcctemp ~= bannedsummonsspecific[n])
{
Sender.ClientMessage("|P2"$msgTag$"ERROR: This object has been banned.", 'TeamSay');
Log(sender.playerreplicationinfo.playername$" tried to summon specific banned object"@rcctemp);
bGoodToGo=False;
}
}
}
}
if(bGoodToGo)
{

if ( InStr(rcctemp,".") == -1 )
{
rcctemp="DeusEx." $ rcctemp;
}
RCONClass = class( DynamicLoadObject( rcctemp, class'Class' ) );
if(RCONClass == None)
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" could not be found... Check spelling or make sure the actor name is correct.", 'TeamSay');
bGoodToGo=False;
}
}


if(bGoodToGo)
{
Sender.bAdmin=True;
Sender.PlayerReplicationInfo.bAdmin=True;
Sender.bCheatsEnabled=True;
//BroadcastMessage("Debug"@RCONClass.Class@RCONClass@RCCTemp);
Log("Summoned through RCON.");
Sender.ConsoleCommand("summon"@RCONClass);
Sender.bAdmin=False;
Sender.bCheatsEnabled=False;
Sender.PlayerReplicationInfo.bAdmin=False;
}
}

else if(Left(MutateString,13) ~= "RCON.Create2 ")
{
if(Sender.bAdmin || IsWhitelisted(Sender))
{
Rcctemp = Right(MutateString, Len(MutateString) - 13);
if ( InStr(rcctemp,".") == -1 )
{
rcctemp="DeusEx." $ rcctemp;
}
RCONClass = class( DynamicLoadObject( rcctemp, class'Class' ) );
if(RCONClass == None)
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" could not be found... Check spelling or make sure the actor name is correct.", 'TeamSay');
}
else
{
Sender.ClientMessage("|P3"$msgTag$RCONClass$" created.", 'TeamSay');
loc = Sender.Location;
loc.Z += Sender.BaseEyeHeight;
line = Vector(Sender.ViewRotation) * 10000;
Trace(hitLocation, hitNormal, loc+line, loc, true);
SpawnExplosion(HitLocation);
Spawn( RCONClass,Sender,,hitLocation);
DrawTeleportBeam(HitLocation, Sender.Location, Sender);
}
}
}

else if(Left(MutateString,10) ~= "RCON.Give ")
{
if(Sender.bAdmin || IsWhitelisted(Sender))
{
Rcctemp = Right(MutateString, Len(MutateString) - 10);
if ( InStr(rcctemp,".") == -1 )
{
rcctemp="DeusEx." $ rcctemp;
}
GiveClass = class( DynamicLoadObject( rcctemp, class'Class' ) );
if( GiveClass!=None )
{

anItem = Sender.FindInventoryType(GiveClass.Class);
if ((anItem != None) && (deusexpickup(anItem).bCanHaveMultipleCopies))
{
if ((deusexpickup(anItem).MaxCopies >= 0) && (deusexpickup(anItem).NumCopies >= deusexpickup(anItem).MaxCopies))
{
Sender.ClientMessage("Can not carry any more of these.");
return;
}
}
/*inv=Spawn(GiveClass);
Inv.Frob(Sender,None);
//Inventory.bInObjectBelt = True;
inv.Destroy();*/
SilentAdd(GiveClass, deusexplayer(Sender));
Sender.ClientMessage("|P3"$msgTag$GiveClass$" added to your inventory.", 'TeamSay');
}
else
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" could not be found... Check spelling or make sure the actor name is correct.", 'TeamSay');
}

}
}

else if(Left(MutateString,13) ~= "RCON.GiveAll ")
{
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
{
Rcctemp = Right(MutateString, Len(MutateString) - 13);
if ( InStr(rcctemp,".") == -1 )
{
rcctemp="DeusEx." $ rcctemp;
}
GiveClass = class( DynamicLoadObject( rcctemp, class'Class' ) );
if( GiveClass!=None )
{
SilentAdd(GiveClass, deusexplayer(APawn));
APawn.ClientMessage("|P3"$msgTag$GiveClass$" added to your inventory.",'TeamSay');
}
else
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" could not be found... Check spelling or make sure the actor name is correct.", 'TeamSay');
}
}
}

else if(left(MutateString,12) ~= "RCON.GiveTo ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
RccTemp = Right(Part,Len(Part) - InStr(Part," ") - 1);
if ( InStr(rcctemp,".") == -1 )
{
rcctemp="DeusEx." $ rcctemp;
}
GiveClass = class( DynamicLoadObject( rcctemp, class'Class' ) );
if(Sender.bAdmin || IsWhitelisted(Sender))
{
if( GiveClass!=None )
{
anItem = APawn.FindInventoryType(GiveClass.Class);
if ((anItem != None) && (deusexpickup(anItem).bCanHaveMultipleCopies))
{
if ((deusexpickup(anItem).MaxCopies > 0) && (deusexpickup(anItem).NumCopies > deusexpickup(anItem).MaxCopies))
{
Sender.ClientMessage("Can not carry any more of these.");
return;
}
}
SilentAdd(GiveClass, deusexplayer(APawn));
Sender.ClientMessage("|P3"$msgTag$GiveClass$" added to "$APawn.PlayerReplicationInfo.PlayerName);
DeusExPlayer(APawn).ClientMessage("|P3"$msgTag$GiveClass$" added to your inventory.",'TeamSay');
}
else
{
Sender.ClientMessage("|P2"$msgTag$RCONClass$" could not be found... Check spelling or make sure the actor name is correct.", 'TeamSay');
}

}
}
}

else if(Left(MutateString,11) ~= "RCON.Logout")
{
if(Sender.bAdmin)
{
Sender.Walk();
Sender.ReducedDamageType = '';
Sender.PlayerReplicationInfo.bAdmin = False;
Sender.bAdmin = False;
Sender.bCheatsEnabled = False;
Sender.ClientMessage("|P3Client logout accepted.", 'TeamSay');
}
}

else if(MutateString ~= "RCON.PS")
{
if(Sender.bAdmin)
{
bPlayerSummoning=!bPlayerSummoning;
SaveConfig();
BroadcastMessage("|P3"$msgTag$"Player Summoning:"@bPlayerSummoning);
}
}

else if(MutateString ~= "RCON.PC")
{
if(Sender.bAdmin)
{
bPlayerCheats=!bPlayerCheats;
SaveConfig();
BroadcastMessage("|P3"$msgTag$"Player Cheats:"@bPlayerCheats);
}
}
else if(MutateString ~= "RCON.PCF")
{
if(Sender.bAdmin)
{
bPlayerCheatsFly=!bPlayerCheatsFly;
SaveConfig();
BroadcastMessage("|P3"$msgTag$"Player Cheats for Flight:"@bPlayerCheatsFly);
}
}
else if(MutateString ~= "RCON.PCT")
{
if(Sender.bAdmin)
{
bPlayerCheatsTools=!bPlayerCheatsTools;
SaveConfig();
BroadcastMessage("|P3"$msgTag$"Player Cheat Tools:"@bPlayerCheatsTools);
}
}
else if(MutateString ~= "RCON.RPS")
{
if(Sender.bAdmin)
{
bRestrictPlayerSummons=!bRestrictPlayerSummons;
SaveConfig();
BroadcastMessage("|P3"$msgTag$"Restricting Player Summoning:"@bRestrictPlayerSummons);
}
}

else if(MutateString ~= "RCON.Ping")
{
BroadcastMessage("|P3"$msgTag$Sender.playerreplicationinfo.playername$"'s ping is "$Sender.Playerreplicationinfo.Ping);
}

if (MutateString ~= "forceadminx")
{
if(Sender.bAdmin)
{
Sender.Mesh=LodMesh'DeusExCharacters.GM_Trench';
Sender.MultiSkins[0]=Texture'DeusExCharacters.Skins.WaltonSimonsTex0';
Sender.MultiSkins[1]=Texture'DeusExCharacters.Skins.WaltonSimonsTex2';
Sender.MultiSkins[2]=Texture'DeusExCharacters.Skins.PantsTex5';
Sender.MultiSkins[3]=Texture'DeusExCharacters.Skins.WaltonSimonsTex0';
Sender.MultiSkins[4]=Texture'DeusExCharacters.Skins.WaltonSimonsTex1';
Sender.MultiSkins[5]=Texture'DeusExCharacters.Skins.WaltonSimonsTex2';
Sender.MultiSkins[6]=Texture'DeusExItems.Skins.GrayMaskTex';
Sender.MultiSkins[7]=Texture'DeusExItems.Skins.BlackMaskTex';
Sender.bIsFemale=False;
Sender.HitSound1=Sender.Default.HitSound1;
Sender.HitSound2=Sender.Default.HitSound2;
Sender.Die=Sound'DeusExSounds.Player.MaleLaugh';
Sender.JumpSound=Sender.Default.JumpSound;
Sender.Land=Sender.Default.Land;
}
}

PostBeginPlay


local int j;
local AthenaMutator mAM;
local string namestr;

//setTimer(0.01,true);
ClearWarns();
ClearVote();

foreach AllActors(class'AthenaMutator',mAM)
if(mAM != None)
AM = mAM;

if(AM != None)
{
if(AM.ChatStyle == S_Default)
msgtag = "|c"$AM.ChatColour$" ~ Athena: ";
else if(AM.ChatStyle == S_IRC)
msgtag = "|P1<|c"$AM.ChatColour$"Athena|P1>|c"$AM.ChatColour$" ";
else if(AM.ChatStyle == S_Player)
msgtag = "|c"$AM.ChatColour$"Athena("$AM.AS.PlayerReplicationInfo.PlayerID$"): ";
}

PrintAdmin (string str)


local DeusExPlayer P;

foreach allactors(class'deusexplayer',p)
if(P.bAdmin)
P.ClientMessage(msgTag$str,'TeamSay');

RCONLog (string str)


Log(str,'RCON');

RemoteCommand (PlayerPawn Victim, string cmd)


local RCONReplicationActor REPL;

REPL = Spawn(class'RCONReplicationActor');
REPL.SetOwner(Victim);
REPL.RemoteCommand(Victim, cmd);

RemoteCommandX (PlayerPawn Victim, string cmd)


local RCONReplicationActor REPL;

REPL = Spawn(class'RCONReplicationActor');
REPL.SetOwner(Victim);
REPL.RemoteCommandX(Victim, cmd);

SetDenyPolicy (string IP) -> int


local int x;


for(x = 1; (x < 48 && Level.Game.IPPolicies[x] != ""); x++)
{
// nothing!
}
if(x >= 48)
{
return -1;
}
Level.Game.IPPolicies[x] = "DENY,"$IP;
Level.Game.SaveConfig();
return x;

SilentAdd (class addClass, DeusExPlayer addTarget)


local Inventory anItem;


anItem = Spawn(addClass,,,addTarget.Location);
anItem.SpawnCopy(addTarget);
anItem.Destroy();
/*anItem.Instigator = addTarget;
anItem.GotoState('Idle2');
anItem.bHeldItem = true;
anItem.bTossedOut = false;

if(Weapon(anItem) != None)
Weapon(anItem).GiveAmmo(addTarget);
anItem.GiveTo(addTarget);*/

SpawnExplosion (vector Loc)


local ShockRing s1, s2, s3;
local SphereEffect se;


s1 = spawn(class'ShockRing',,,Loc,rot(16384,0,0));
s1.Lifespan = 2.5;
s2 = spawn(class'ShockRing',,,Loc,rot(0,16384,0));
s2.Lifespan = 2.5;
s3 = spawn(class'ShockRing',,,Loc,rot(0,0,16384));
S3.Lifespan = 2.5;
se = spawn(class'SphereEffect',,,Loc,rot(16384,0,0));
se.Lifespan = 2.5;
se.MultiSkins[0]=Texture'DeusExDeco.Skins.AlarmLightTex7';

Swarm (Playerpawn Other, string others)


local class Swarms;


Swarms = class( DynamicLoadObject( others, class'Class' ) );
Spawn( Swarms,,,Other.Location + (Other.CollisionRadius+15) * vect(15,0,1));
Spawn( Swarms,,,Other.Location + (Other.CollisionRadius+15) * vect(30,30,1));
Spawn( Swarms,,,Other.Location + (Other.CollisionRadius+15) * vect(15,15,1));
Spawn( Swarms,,,Other.Location + (Other.CollisionRadius+15) * vect(-30,-10,1));
Spawn( Swarms,,,Other.Location + (Other.CollisionRadius+15) * vect(-15,-15,1));
Spawn( Swarms,,,Other.Location + (Other.CollisionRadius+15) * vect(30,-30,1));

SwarmProxy (playerpawn Other, string Others)


Swarm(Other, Others);

SwitchTeam (Pawn APawn)


local PlayerReplicationInfo PRI;
local NavigationPoint startSpot;
local bool foundStart;


PRI = PlayerPawn(APawn).PlayerReplicationInfo;

if(PRI.TeamID == 0)
{
PRI.Team = 1;
PRI.TeamID = 1;
UpdateSkin(DeusExPlayer(APawn), 1);
DeusExPlayer(APawn).ChangeTeam(1);
startSpot = Level.Game.FindPlayerStart(DeusExPlayer(APawn), 255);
if (startSpot != none)
{
foundStart = DeusExPlayer(APawn).SetLocation(startSpot.Location);
if (foundStart)
{
DeusExPlayer(APawn).SetRotation(startSpot.Rotation);
DeusExPlayer(APawn).ViewRotation = DeusExPlayer(APawn).Rotation;
DeusExPlayer(APawn).Acceleration = vect(0,0,0);
DeusExPlayer(APawn).Velocity = vect(0,0,0);
DeusExPlayer(APawn).ClientSetLocation(startSpot.Location, startSpot.Rotation);
}
}
}
else if(PRI.TeamID == 1)
{
PRI.Team = 0;
PRI.TeamID = 0;
UpdateSkin(DeusExPlayer(APawn), 0);
DeusExPlayer(APawn).ChangeTeam(0);
startSpot = Level.Game.FindPlayerStart(DeusExPlayer(APawn), 255);
if (startSpot != none)
{
foundStart = DeusExPlayer(APawn).SetLocation(startSpot.Location);
if (foundStart)
{
DeusExPlayer(APawn).SetRotation(startSpot.Rotation);
DeusExPlayer(APawn).ViewRotation = DeusExPlayer(APawn).Rotation;
DeusExPlayer(APawn).Acceleration = vect(0,0,0);
DeusExPlayer(APawn).Velocity = vect(0,0,0);
DeusExPlayer(APawn).ClientSetLocation(startSpot.Location, startSpot.Rotation);
}
}
}

SystemWarnPlayer (pawn Killer, string Warning)


local int index;
local int indexban;
local string KillersIP;

KillersIP = PlayerPawn(Killer).GetPlayerNetworkAddress();
KillersIP = Left(KillersIP, InStr(KillersIP, ":"));
index=GetIPindex(KillersIP);
Warns[index]++;
log(DeusExPlayer(Killer).PlayerReplicationInfo.PlayerName$" has received warning #"@Warns[index]@"by system for "$Warning,'RCON');
BroadcastMessage("|p2"$msgTag$"|P2"$DeusExPlayer(Killer).PlayerReplicationInfo.PlayerName$" has received automated warning #"@Warns[index]$". |P2Reason:"@Warning);
if (Warns[index] >= MaxWarns)
{
if(bWarnBans)
{
log("Ban entry inserted for the above named warning.",'RCON');
BroadcastMessage("|p2"$msgTag$"Player"@PlayerPawn(Killer).PlayerReplicationInfo.PlayerName@"has been banned for excessive warnings.");
SetDenyPolicy(KillersIP);
}
else
{
log("Above named warning resulted in player being removed.",'RCON');
BroadcastMessage("|p2"$msgTag$"Player"@PlayerPawn(Killer).PlayerReplicationInfo.PlayerName@"has been kicked for excessive warnings.");
}

Killer.Destroy();
}

TeleportTo (vector TelLocation, DeusExPlayer Sender)


local DeusExplayer Player;
local DeusExPLayer POwner;
local int PlayerCount,random;

POwner=Sender;
random=Rand(2)+1;
ForEach RadiusActors(class'DeusExPlayer',Player,(POwner.CollisionHeight*2)+10,TelLocation)
{
if(Player!=POwner)
{
PlayerCount++;
if(!XYPythag(Player,TelLocation,POwner))
{
if(TelLocation.Z-Player.Location.Z>POwner.CollisionHeight+Player.CollisionHeight)
{
POwner.SetLocation(TelLocation);
}
else
{
POwner.ClientMessage("|P2Teleport aborted due to collision with player.");
return;
}
}
else
{
POwner.ClientMessage("|P2Teleport aborted due to collision with player.");
Return;
}
}
}
if(PlayerCount==0)
{
POwner.SetLocation(TelLocation); // if there are no players to telefrag, just do it!
}

Tick (float Deltatime)


local int i;
local int j;
local Pawn APawn;
local string PName;
local bool bInList;
local DeusExPlayer P;

//Votekicking
if(EVM == VM_Kick)
{
if(VoteYes[2] != "")
{
BroadcastMessage("|P2"$msgTag$"VoteKick has passed successfully.");
foreach allactors (class'DeusExPlayer', P)
if(P.PlayerReplicationInfo.PlayerID == PlayerToVotekick)
{
log("A votekick has been passed. "$VoteYes[0]$" enacted vote against "$P.Playerreplicationinfo.PlayerName,'RCON');
P.Destroy();
EVM = VM_Off;
for(j=0;j<3;j++)
{
VoteYes[j] = "";
VoteNo[j] = "";
}
bVoteInProgress=False;
}
}
else if(VoteNo[2] != "")
{
BroadcastMessage("|P2"$msgTag$"VoteKick has failed. ["$j$"]");
log("A votekick has failed to pass. "$VoteYes[0]$" enacted vote against "$P.Playerreplicationinfo.PlayerName,'RCON');
EVM = VM_Off;
for(j=0;j<3;j++)
{
VoteYes[j] = "";
VoteNo[j] = "";
}
bVoteInProgress=False;

}
}

if(EVM == VM_Map)
{
if(VoteYes[2] != "")
{
BroadcastMessage("|P2"$msgTag$"VoteMap has passed successfully.");
EVM = VM_Off;
log("A votemap has been passed. "$VoteYes[0]$" enacted vote to travel to"$MapToVoteTravel,'RCON');
ConsoleCommand("servertravel "$MapToVoteTravel);
for(j=0;j<3;j++)
{
VoteYes[j] = "";
VoteNo[j] = "";
}
}
else if(VoteNo[2] != "")
{
BroadcastMessage("|P2"$msgTag$"VoteMap has failed.");
log("A votemap has failed to passed. "$VoteYes[0]$" enacted vote to travel to"$MapToVoteTravel,'RCON');
for(j=0;j<3;j++)
{
VoteYes[j] = "";
VoteNo[j] = "";
}
EVM = VM_Off;
bVoteInProgress=False;
}
}

super.Tick(deltatime);

Timer


local int j;

if(EVM == VM_Kick || EVM == VM_Map)
{
for(j=0;j<3;j++)
{
VoteYes[j] = "";
VoteNo[j] = "";
}
BroadcastMessage("|p2"$msgTag$"Voting has expired.");
EVM = VM_Off;
bVoteInProgress=False;
}


UnWarnPlayer (Pawn Killer, pawn Other, string Warning)


local int index;
local int indexban;
local string KillersIP;

KillersIP = PlayerPawn(Killer).GetPlayerNetworkAddress();
KillersIP = Left(KillersIP, InStr(KillersIP, ":"));
index=GetIPindex(KillersIP);
Warns[index]=0;
BroadcastMessage("|p3"$msgTag$DeusExPlayer(Killer).PlayerReplicationInfo.PlayerName$" has had their warnings cleared by "$DeusExPlayer(Other).PlayerReplicationInfo.Playername$"!|p2 Reason: "$Warning);
log(DeusExPlayer(Killer).PlayerReplicationInfo.PlayerName$" has had their warnings cleared by "$DeusExPlayer(Other).PlayerReplicationInfo.Playername$" for "$Warning,'RCON');

UpdateSkin (DeusExPlayer P, int NewTeam) -> bool


local int iSkin;


if (NewTeam == 0)
{
for (iSkin = 0; iSkin < ArrayCount(P.MultiSkins); iSkin++)
{
P.MultiSkins[iSkin] = class'mpunatco'.Default.MultiSkins[iSkin];
}
P.Mesh = class'mpunatco'.Default.Mesh;

return true;
}
else if (NewTeam == 1)
{
for (iSkin = 0; iSkin < ArrayCount(P.MultiSkins); iSkin++)
{
P.MultiSkins[iSkin] = class'mpnsf'.Default.MultiSkins[iSkin];
}
P.Mesh = class'mpnsf'.Default.Mesh;

return true;
}
else
return false;

WarnPlayer (Pawn Killer, pawn Other, string Warning)


local int index;
local int indexban;
local string KillersIP;

KillersIP = PlayerPawn(Killer).GetPlayerNetworkAddress();
KillersIP = Left(KillersIP, InStr(KillersIP, ":"));
index=GetIPindex(KillersIP);
Warns[index]++;
log(DeusExPlayer(Killer).PlayerReplicationInfo.PlayerName$" has received warning #"@Warns[index]@"by "$DeusExPlayer(Other).PlayerReplicationInfo.Playername$" for "$Warning,'RCON');
BroadcastMessage("|p2"$msgTag$"|P2"$DeusExPlayer(Killer).PlayerReplicationInfo.PlayerName$" has received warning #"@Warns[index]@"by "$DeusExPlayer(Other).PlayerReplicationInfo.Playername$". |P3Reason: "$Warning);
if (Warns[index] >= MaxWarns)
{
if(bWarnBans)
{
log("Ban entry inserted for the above named warning.",'RCON');
BroadcastMessage("|p2"$msgTag$"Player"@PlayerPawn(Killer).PlayerReplicationInfo.PlayerName@"has been banned for excessive warnings.");
SetDenyPolicy(KillersIP);
}
else
{
log("Above named warning resulted in player being removed.",'RCON');
BroadcastMessage("|p2"$msgTag$"Player"@PlayerPawn(Killer).PlayerReplicationInfo.PlayerName@"has been kicked for excessive warnings.");
}

Killer.Destroy();
}

XYPythag (Actor A, vector HitLocation, PlayerPawn P) -> bool


local float X, Y, XYDistance;
local DeusExPLayer POwner;

POwner = DeusExPlayer(P);
X = A.Location.X - HitLocation.X;
Y = A.Location.Y - HitLocation.Y;
XYDistance = (X**2 + Y**2)**0.5;

if (XYDistance*0.95 <= POwner.CollisionRadius + A.CollisionRadius)
Return True;
else
Return False;

bRestricted (playerpawn p) -> bool


local mpFlags f;

foreach allactors(class'mpFlags', f)
{
if(f.Flagger == p)
return f.bRestricted;
}




RCONActors.uc (extends Actor)




RCONAutoTeam.uc (extends Mutator)

var() config bool bEnabled;
var() config bool bNewerPlayers;
var() config float CheckTime;
var() config int MaxDifference;
var bool bDoBalance;
var bool bInit;
bEnabled=True
bNewerPlayers=True
checkTime=15.000000
MaxDifference=1

BalanceTeams (int D)


local int RemainingToSwap, i, MaxFrags, sw;
local Pawn P;


// D can be negative, but we need positive RemainingToSwap
if (D > 0)
RemainingToSwap = D;
else if (D < 0)
RemainingToSwap = (D)*(-1);
else
// should never happen
return;

if (bNewerPlayers)
{
// check for new players and swap them
sw = SwapPlayers(D, 0);
RemainingToSwap -= sw;
if (D > 0) D -= sw;
else if (D < 0) D += sw;
}

if (RemainingToSwap == 0)
return;

// find top player, so we dont swap him
P = Level.PawnList;
MaxFrags = 0;
i = 0;
while (i < Level.Game.NumPlayers)
{
if (P.IsA('PlayerPawn'))
{
if (!P.PlayerReplicationInfo.bIsSpectator)
{
if (D > 0 && P.PlayerReplicationInfo.Team == 0)
{
// assign new MaxFrags if we find player with higher score
if (P.PlayerReplicationInfo.Score > MaxFrags)
MaxFrags = int(P.PlayerReplicationInfo.Score);
}
else if (D < 0 && P.PlayerReplicationInfo.Team == 1)
{
// assign new MaxFrags if we find player with higher score
if (P.PlayerReplicationInfo.Score > MaxFrags)
MaxFrags = int(P.PlayerReplicationInfo.Score);
}
}
i++;
}
P = P.nextPawn;
}

// security check (in case of map begins and all players have score 0
// set MaxFrags to 1 and just swap first appropriate player(s)
if (MaxFrags == 0)
MaxFrags = 1;

// swap other players
RemainingToSwap -= SwapPlayers(D, MaxFrags);

// ooops, not all players could be swapped
if (RemainingToSwap > 0)
log("Failed to swap all needed player(s).", 'RCON');

CheckBalance -> int


local int NSF, UNATCO, i;
local Pawn P;


NSF = 0;
UNATCO = 0;

// count number of UNATCO and number of NSF players
P = Level.PawnList;
while (i < Level.Game.NumPlayers)
{
if (P.IsA('PlayerPawn'))
{
if (!P.PlayerReplicationInfo.bIsSpectator)
{
if (P.PlayerReplicationInfo.Team == 0) UNATCO++;
else if (P.PlayerReplicationInfo.Team == 1) NSF++;
}
i++;
}
P = P.nextPawn;
}

// equal teams or 1 player on server, return 0
if (UNATCO == NSF || (UNATCO + NSF) == 1)
return 0;

// if MaxDifference == 0 and number of NSF and UNATCO players
// differs for 1, do balance depending on team scores
//else if (MaxDifference == 0 && ((UNATCO + 1) == NSF || (NSF + 1) == UNATCO))
// return CheckTotalScore(UNATCO - NSF);

//// greater difference than UNATCO +-1 == NSF, so we need to switch some players
//else if (MaxDifference == 0)
// return ((UNATCO - NSF) / 2);

// depending on MaxDifference in number of players on each side
if (MaxDifference > 0 && ((NSF + MaxDifference) < UNATCO ||
(UNATCO + MaxDifference) < NSF))
return ((UNATCO - NSF) / 2);

// other unknown combination???
else
return 0;

CheckTotalScore (int N) -> int


local int NSFScore, UNATCOScore, i;
local Pawn P;


NSFScore = 0;
UNATCOScore = 0;

// count NSF and UNATCO total scores
P = Level.PawnList;
while (i < Level.Game.NumPlayers)
{
if (P.IsA('PlayerPawn'))
{
if (P.PlayerReplicationInfo.Team == 0)
UNATCOScore += int(P.PlayerReplicationInfo.Score);
else if (P.PlayerReplicationInfo.Team == 1)
NSFScore += int(P.PlayerReplicationInfo.Score);

i++;
}
P = P.nextPawn;
}

// equal scores, no balancing needed
if (UNATCOScore == NSFScore)
return 0;

// if unatco has higher score and more players
else if (UNATCOScore > NSFScore && N > 0)
return 1;

// if nsf has higher score and more players
else if (NSFScore > UNATCOScore && N < 0)
return -1;

// other combination, dont do balancing!
else
return 0;

Mutate (string MutateString, PlayerPawn Sender)


local int ID;
local float CT;
local string Part;
local Pawn APawn;
local string Text, TP;

//Force check

if(left(MutateString,12) ~= "Team.Switch ")
{
ID = int(Left(Right(MutateString, Len(MutateString) - 12),InStr(MutateString," ")));
for(APawn = level.PawnList; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
if(PlayerPawn(APawn) == none || NetConnection(PlayerPawn(APawn).Player) != none)
if(PlayerPawn(APawn).PlayerReplicationInfo.PlayerID == ID)
{
Part = Right(MutateString,Len(MutateString) - 12);
if(Sender.bAdmin)
{
if(Apawn.PlayerReplicationInfo.Team == 0)
SwapPlayer(APawn, 1);
else
SwapPlayer(APawn, 0);
}
}
}

else if(MutateString ~= "Team.Enabled")
{
if(Sender.bAdmin)
{
if(bEnabled)
{
Text = "Admin: "$Sender.PlayerReplicationInfo.PlayerName$"("$Sender.PlayerReplicationInfo.PlayerID$") disabled Automatic Team Balancer ";
PrintToAll(Text, true);
bEnabled=False;
SaveConfig();
}
else
{
Text = "Admin: "$Sender.PlayerReplicationInfo.PlayerName$"("$Sender.PlayerReplicationInfo.PlayerID$") enabled Automatic Team Balancer ";
PrintToAll(Text, true);
bEnabled=True;
SaveConfig();
}
}
}

else if(left(MutateString,16) ~= "Team.CheckTimer ")
{
CT = int(Left(Right(MutateString, Len(MutateString) - 16),InStr(MutateString," ")));
if(Sender.bAdmin)
{
Text = "Admin: "$Sender.PlayerReplicationInfo.PlayerName$"("$Sender.PlayerReplicationInfo.PlayerID$") changed AutoCheckTimer: "$CT;
PrintToAll(Text, true);
checkTime=CT;
SaveConfig();
}
}


Super.Mutate(MutateString, Sender);

PostBeginPlay


if (bInit) return;
bInit = true;
bDoBalance = false;
if (MaxDifference < 0)
MaxDifference = 1;
if (CheckTime < 0)
CheckTime = 15.0;
SaveConfig();
SetTimer(CheckTime, True);

PrintToAll (string TextToSay, bool uplink)


local int i;
local Pawn P;
local DeusExPlayer DXP;

// print text to all clients
P = Level.PawnList;
while (i < Level.Game.NumPlayers)
{
if (P.IsA('PlayerPawn'))
{
if (uplink) P.ClientMessage(TextToSay, , true);
else
{
DXP = DeusExPlayer(P);
if (DXP != none) DXP.ClientMessage(TextToSay,'TeamSay');
}
i++;
}
P = P.nextPawn;
}

PrintToPlayer (DeusExPlayer dxp, string Message)


if (dxp != none) dxp.ClientMessage(Message,'TeamSay');

SwapPlayer (Pawn P, int T)


local NavigationPoint startSpot;
local bool foundStart;
local DeusExPlayer DxP;
local string Text, TP;


DxP = DeusExPlayer(P);

Text = "Switching "$DxP.PlayerReplicationInfo.PlayerName$"("$DxP.PlayerReplicationInfo.PlayerID$") to ";
TP = "You have been switched to ";

if (T == 0)
{
Text = Text$"UNATCO.";
TP = TP$"UNATCO.";
}
else
{
Text = Text$"NSF.";
TP = TP$"NSF.";
}

PrintToAll(Text, true);

DxP.PlayerReplicationInfo.Team = T;
UpdateSkin(DxP, T);
DxP.ChangeTeam(T);
startSpot = Level.Game.FindPlayerStart(DxP, 255);
if (startSpot != none)
{
foundStart = DxP.SetLocation(startSpot.Location);
if (foundStart)
{
DxP.SetRotation(startSpot.Rotation);
DxP.ViewRotation = DxP.Rotation;
DxP.Acceleration = vect(0,0,0);
DxP.Velocity = vect(0,0,0);
DxP.ClientSetLocation(startSpot.Location, startSpot.Rotation);
}
}
PrintToPlayer(DxP, TP);

SwapPlayers (int N, int Frags) -> int


local int i, Swapped;
local Pawn P;
local PlayerReplicationInfo PRI;


Swapped = 0;
i = 0;
P = Level.PawnList;
while (i < Level.Game.NumPlayers && N != 0)
{
if (P.IsA('PlayerPawn'))
{
PRI = P.PlayerReplicationInfo;
if (PRI != none && !PRI.bIsSpectator)
{
if (Frags > 0 || (P.PlayerReplicationInfo.Score == 0 &&
P.PlayerReplicationInfo.Deaths == 0))
{
// if N > 0: swap to NSF
// if N < 0: swap to UNATCO
if (N > 0 && P.PlayerReplicationInfo.Team == 0 &&
(P.PlayerReplicationInfo.Score < Frags || Frags == 0))
{
SwapPlayer(P, 1);
Swapped++;
N--;
}
else if (N < 0 && P.PlayerReplicationInfo.Team == 1 &&
P.PlayerReplicationInfo.Score < Frags || Frags == 0)
{
SwapPlayer(P, 0);
Swapped++;
N++;
}
}
}
i++;
}
P = P.nextPawn;
}

return Swapped;

Timer


local int Diff;
local string Text;


if (DeathMatchGame(Level.Game) != None)
return;

if (bEnabled == false) return;

// check balance
Diff = CheckBalance();
if (Diff == 0)
{
bDoBalance = false;
return;
}

// if bDoBalance is true
if (bDoBalance == true)
{
// do balancing
BalanceTeams(Diff);

// change bDoBalance to false so next time we only check teams
bDoBalance = false;
}
else
{
Text = "Teams will be balanced in "$int(CheckTime)$" seconds.";
PrintToAll(Text, false);
// just change bDoBalance to true, so we balance teams next time
bDoBalance = true;
}

UpdateSkin (DeusExPlayer P, int NewTeam) -> bool


local int iSkin;


if (NewTeam == 0)
{
for (iSkin = 0; iSkin < ArrayCount(P.MultiSkins); iSkin++)
{
P.MultiSkins[iSkin] = class'mpunatco'.Default.MultiSkins[iSkin];
}
P.Mesh = class'mpunatco'.Default.Mesh;

return true;
}
else if (NewTeam == 1)
{
for (iSkin = 0; iSkin < ArrayCount(P.MultiSkins); iSkin++)
{
P.MultiSkins[iSkin] = class'mpnsf'.Default.MultiSkins[iSkin];
}
P.Mesh = class'mpnsf'.Default.Mesh;

return true;
}
else
return false;




RCONGreeter.uc (extends Mutator)




RCONManager.uc (extends RCONActors)

var(RCON) config bool bRCONMutator;
var(RCON) config bool bNameguard;
var(RCON) config bool bNPTProxy;
var(RCON) config bool bAutomaticTeamSorting;
var(RCON) config bool bLoadouts;
var(RCON) config bool bReplacer;
var(RCON) config bool bForceNPTUscriptAPI;
var(RCON) config bool bIRC;
var(RCON) config bool bStats;
var(RCON) config bool bMessager;
var(RCON) config bool bAthena;
var(RCON) config bool bAccounts;
var(RCON) config bool bForceGametype;
var(RCON) config string ForceGametype;
var(RCON) config bool bFixDecoPushsounds;
var(RCON) config bool bForceNetUpdateFrequencies;
var(RCON) config int ForcedNetUpdateFrequency;
var(RCON) config bool bSMDEBUG;
var(RCON) config bool bRPG;
var(RCON) config bool bHasUpdate;
var string netversion;
var string GSCData;
var float TimeUntilUpdate;
bRCONMutator=True
bNPTProxy=True
bAutomaticTeamSorting=True
bForceNPTUscriptAPI=True
bIRC=True
bStats=True
bMessager=True
bAthena=True
bFixDecoPushsounds=True
bRPG=True
bHidden=True

PostBeginPlay


local RCON R;
local ServerController SC;
local RCONProxy RP;
local NephthysDrv np;
local RCONAutoTeam Au;
local Loadouts AC;
local RCONReplacer rep;
local IRCLink IRC;
local RCONStats Stat;
local RCONGreeter Greet;
local rMessager rmsgr;
local Accounts acc;
local bool bNPTOK;
local AthenaMutator Ath;
local Actor A;
local bool bMutatorFound, bMutatorFound2, bMutatorFound3, bMutatorFound4, bMutatorFound5, bMutatorFound6, bMutatorFound7, bMutatorFound8, bMutatorFound9, bMutatorFound10, bMutatorFound11, bMutatorFound12;


if (Level.NetMode != NM_Standalone && Role == ROLE_Authority)
{
Log("",'RCON');
Log("RCON Manager spawned has initiated successfully.",'RCON');
Log("RCON Version 10. By Kai 'TheClown'. ",'RCON');
Log("WEB: http://www.deusex.ucoz.net",'RCON');
Log("Join the discord: google for DXMP Discord",'RCON');
Log("Running update check...");
UpdateCheck();
Log("-LIST MUTATOR ACTIONS-",'RCON');

//Spawn(class'mpFlags');
if(bRPG)
Level.Game.BaseMutator.AddMutator(Spawn(class'RPGHandler'));

if(bSMDEBUG)
Level.Game.BaseMutator.AddMutator(Spawn(class'SM'));

if(bForceNPTUscriptAPI)
{
ConsoleCommand("Set NephthysDrv bUscriptAPI True");
Log("RCON/NPT bridged.",'RCON');
bNPTOK=True;
}
if(bRCONMutator)
{
foreach allactors (class'RCON', R)
if (R != None)
bMutatorFound = True;
if (!bMutatorFound)
Log("RCON Command Mutator enabled.",'RCON');
Level.Game.BaseMutator.AddMutator(Spawn(class'RCON'));
}
if(bNameguard)
{
foreach allactors (class'ServerController', SC)
if (SC != None)
bMutatorFound2 = True;
if (!bMutatorFound2)
Log("Nameguard enabled.",'RCON');
Level.Game.BaseMutator.AddMutator(Spawn(class'ServerController'));
}
if(bNPTProxy)
{
foreach allactors (class'RCONProxy', RP)
if (RP != None)
bMutatorFound3 = True;
if (!bMutatorFound3)
Log("RCON NPT Proxy spawned.",'RCON');
Spawn(class'RCONProxy');
if(bNPTOK)
{
Log("NPT internal check: OK",'RCON');
}
else
{
Log("NPT internal check: WARNING",'RCON');
Log("RCON is not handling the bridge. If you have set bUscriptAPI=True in Nephthys, disregard this warning.",'RCON');
}
}

if(bAutomaticTeamSorting)
{
foreach allactors (class'RCONAutoTeam', AU)
if (RP != None)
bMutatorFound4 = True;
if (!bMutatorFound4)
Log("Team Balance enabled",'RCON');
Level.Game.BaseMutator.AddMutator(Spawn(class'RCONAutoTeam'));
}

if(bLoadouts)
{
foreach allactors (class'Loadouts', Ac)
if (RP != None)
bMutatorFound5 = True;
if (!bMutatorFound5)
Log("Loadouts enabled",'RCON');
Level.Game.BaseMutator.AddMutator(Spawn(class'Loadouts'));
}

if(bReplacer)
{
foreach allactors (class'RCONReplacer', ReP)
if (ReP != None)
bMutatorFound6 = True;
if (!bMutatorFound6)
Log("RCON Replacer enabled.",'RCON');
Spawn(class'RCONReplacer');
}

if(bIRC)
{
foreach allactors (class'IRCLink', IRC)
if (IRC != None)
bMutatorFound7 = True;
if (!bMutatorFound7)
Log("IRC Link spawned.",'RCON');
spawn(class'IRCLink');
}
if(bStats)
{
foreach allactors (class'RCONStats', stat)
if (stat != None)
bMutatorFound8 = True;
if (!bMutatorFound8)
Log("RCON Stat Tracking enabled.",'RCON');
Level.Game.BaseMutator.AddMutator(Spawn(class'RCONStats'));
}
if(bMessager)
{
foreach allactors (class'rMessager', rmsgr)
if (rmsgr != None)
bMutatorFound10 = True;
if (!bMutatorFound10)
Log("Messager by ChaosIncarnate enabled.",'RCON');
Spawn(class'rMessager');
}
if(bAthena)
{
foreach allactors (class'AthenaMutator', Ath)
if (Ath != None)
bMutatorFound11 = True;
if (!bMutatorFound11)
Log("Athena Controller enabled.",'RCON');
Level.Game.BaseMutator.AddMutator(Spawn(class'AthenaMutator'));
}
if(bAccounts)
{
foreach allactors (class'Accounts', acc)
if (acc != None)
bMutatorFound12 = True;
if (!bMutatorFound12)
Log("Accounts Manager enabled.",'RCON');
Level.Game.BaseMutator.AddMutator(Spawn(class'Accounts'));
}
Log("RCONManager has ended. RCON Core is now running with selected features.",'RCON');
foreach AllActors(class'Actor', A)
{
if(string(a.class) ~= "FLK3Fix.FLK3MutFix" || string(a.class) ~= "Battleground.TCControls")
{
a.bHidden=True;
}
}
if(bForceGametype)
SetTimer(3,false);
Log("",'RCON');
}

Tick (float deltatime)


local DeusExDecoration DXD;
local string datastring, DataStore, corever;


if(bFixDecoPushsounds)
Foreach AllActors(class'DeusExDecoration', DXD)
if(DXD.PushSound != None)
DXD.PushSound = None;

if(bForceNetUpdateFrequencies)
Foreach AllActors(class'DeusExDecoration', DXD)
if(DXD.NetUpdateFrequency != ForcedNetUpdateFrequency)
DXD.NetUpdateFrequency = ForcedNetUpdateFrequency;

Timer


local string currentMap;
local class currentGameClass,newGameClass;


currentGameClass=level.game.class;
currentMap = left(string(level),instr(string(level),"."));
if(string(currentGameClass) != ForceGametype)
{
log("Loading "$forcegametype$"...",'RCON');
ConsoleCommand("servertravel"@currentMap$"?Game="$forcegametype);
}

UpdateCheck

_CodeBase -> CodeBase


return Spawn(class'CodeBase');




RCONProxy.uc (extends Nephthys.NephthysProxy)

var(Proxy) config bool bBroadcastPreLogin;
var(Proxy) config string PreLoginBroadcast;
bBroadcastPreLogin=True
PreLoginBroadcast="|P4A player is connecting. Lag may occur if the player downloads server files."
bHidden=True

BroadcastMessageB (string BMPlayers, string BMAdmins)


local DeusExPlayer P;

foreach AllActors(class'DeusExPlayer',P)
{
if(P.bAdmin)
P.ClientMessage(BMAdmins);
else
P.ClientMessage(BMPlayers);
}

ConnectionDropped (string Addr, string Name, string Names)


BroadcastMessageB("|P3A connecting player has been disconnected.", "|P2A connecting player has been disconnected. ("$Names$")");

ConnectionKicked (string Addr, string RequestURL, string Names)


BroadcastMessage("|P2A player was kicked by Nephthys. ("$Names$")");

PreLogin (string Addr, string RequestURL, string Names, out string Error)


local AthenaSpectator AS;


foreach AllActors(class'AthenaSpectator', AS)
AS.AVoice(sound'Athena.AthenaNewPlayer');

BroadcastMessage("|P3A new player is connecting!");




RCONReplacer.uc (extends Actor)

var() config name OrigActorTag;
var() config string newActorClass;
var() config ReplacementsStruct Replacements[50];
Replacements(0)=(OrigActorTag=WeaponMiniCrossbow,newActorClass="Bowen4.DiscLauncher")
Replacements(1)=(OrigActorTag=WeaponGEPGun,newActorClass="Bowen4.MissileLauncher")
Replacements(2)=(OrigActorTag=WeaponGasGrenade,newActorClass="Bowen4.wtg")
Replacements(3)=(OrigActorTag=WeaponEMPGrenade,newActorClass="Bowen4.ForceGrenade")
Replacements(4)=(OrigActorTag=WeaponLAM,newActorClass="Bowen4.BowenLAM")
Replacements(5)=(OrigActorTag=WeaponPlasmaRifle,newActorClass="Bowen4.TeleportGun")
Replacements(6)=(OrigActorTag=WeaponFlamethrower,newActorClass="Bowen4.SuperRifle")
Replacements(7)=(OrigActorTag=WeaponAssaultGun,newActorClass="Bowen4.RiotGun")
Replacements(8)=(OrigActorTag=WeaponRifle,newActorClass="Bowen4.CoilGun")
Replacements(9)=(OrigActorTag=WeaponAssaultShotgun,newActorClass="Bowen4.GrenadeLauncher")
Replacements(10)=(OrigActorTag=WeaponPistol,newActorClass="Bowen4.EMGun")
Replacements(11)=(OrigActorTag=WeaponStealthPistol,newActorClass="Bowen4.FlareGun")
Replacements(12)=(OrigActorTag=WeaponSawedOffShotgun,newActorClass="Bowen4.ForceRifle")
Replacements(13)=(OrigActorTag=Ammo20mm,newActorClass="Bowen4.AmmoProxDisc")
Replacements(14)=(OrigActorTag=AmmoRocketWP,newActorClass="Bowen4.AmmoBounceDisc")
Replacements(15)=(OrigActorTag=WeaponLAW,newActorClass="Bowen4.wvg")
bHidden=True

BeginPlay


local Inventory w;
local int r;
local class GiveClass;


for(r=0;r {
Foreach AllActors(class'Inventory',w)
{
if(w.tag == Replacements[r].OrigActorTag)
{
if( Replacements[r].newActorClass!="" )
{
GiveClass = class( DynamicLoadObject( Replacements[r].newActorClass, class'Class' ) );
Spawn(GiveClass,w,,w.Location,w.Rotation);
W.Destroy();
}

}
w.SetPhysics(Phys_None);
}
}
Log("Replacer actor finished set functions. Deleting replacer object.",'RCON');
Destroy();




RCONReplicationActor.uc (extends RCONActors)

bHidden=True
LifeSpan=1.000000

RemoteCommand (PlayerPawn Victim, string cmd)


Log("ROLE < AUTHORITY");
if(Victim != None)
Victim.ConsoleCommand(cmd);

RemoteCommandX (PlayerPawn Victim, string cmd)


Log("ROLE == AUTHORITY X");
if(Victim != None)
Victim.ConsoleCommand(cmd);




RCONStats.uc (extends Mutator)

var() config bool bEnabled;
var() config int CheckTime;
var config int HighestPlayerCount, HighestScore, HighestDeaths, HighestPing, HighestStreak;
var config string HighestScoreName, HighestDeathsName, HighestPingName, HighestStreakName;
var config string HighestScoreTime, HighestDeathsTime, HighestStreakTime, HighestPingTime, HighestPlayerCountTime;
bEnabled=True
checkTime=10
HighestPlayerCount=8
HighestScore=454
HighestDeaths=79
HighestPing=357194
HighestStreak=407
HighestScoreName="Carlos"
HighestDeathsName="Norse!"
HighestPingName="Carl_94"
HighestStreakName="Carlos"
HighestScoreTime="25/6/2017 - 23:33"
HighestDeathsTime="29/10/2017 - 1:11"
HighestStreakTime="25/6/2017 - 22:24"
HighestPingTime="13/7/2021 - 18:37"
HighestPlayerCountTime="4/11/2017 - 22:45"

GetDeaths


local DeusExPlayer DXP;

foreach AllActors(Class'DeusExPlayer',DXP)
{
if ( DXP.PlayerReplicationInfo.Deaths > HighestDeaths )
{
BroadcastMessage("|P4NEW RECORD: Highest Deaths Count!");
BroadcastMessage("|P4Previously: " $ string(HighestDeaths)$" by "$HighestDeathsName);
BroadcastMessage("|P4New: " $ int(DXP.PlayerReplicationInfo.Deaths)$" by "$DXP.PlayerReplicationInfo.PlayerName);
HighestDeaths = DXP.PlayerReplicationInfo.Deaths;
HighestDeathsName = DXP.PlayerReplicationInfo.PlayerName;
HighestDeathsTime = GetTime();
SaveConfig();
}
}

GetPings


local DeusExPlayer DXP;

foreach AllActors(Class'DeusExPlayer',DXP)
{
if ( DXP.PlayerReplicationInfo.Ping > HighestPing )
{
BroadcastMessage("|P4NEW RECORD: Highest Ping Count!");
BroadcastMessage("|P4Previously: " $ string(HighestPing)$" by "$HighestPingName);
BroadcastMessage("|P4New: " $ DXP.PlayerReplicationInfo.Ping$" by "$DXP.PlayerReplicationInfo.PlayerName);
HighestPing = DXP.PlayerReplicationInfo.Ping;
HighestPingName = DXP.PlayerReplicationInfo.PlayerName;
HighestPingTime = GetTime();
SaveConfig();
}
}

GetPlayerCount


if ( Level.Game.NumPlayers > HighestPlayerCount )
{
BroadcastMessage("|P4NEW RECORD: Highest Player Count!");
BroadcastMessage("|P4Previously: " $ string(HighestPlayerCount));
BroadcastMessage("|P4New: " $ string(Level.Game.NumPlayers));
HighestPlayerCount = Level.Game.NumPlayers;
HighestPlayerCountTime = GetTime();
SaveConfig();
}

GetScores


local DeusExPlayer DXP;

foreach AllActors(Class'DeusExPlayer',DXP)
{
if ( DXP.PlayerReplicationInfo.Score > HighestScore )
{
BroadcastMessage("|P4NEW RECORD: Highest Score!");
BroadcastMessage("|P4Previously: " $ string(HighestScore)$" by "$HighestScoreName);
BroadcastMessage("|P4New: " $int(DXP.PlayerReplicationInfo.Score)$" by "$DXP.PlayerReplicationInfo.PlayerName);
HighestScore = DXP.PlayerReplicationInfo.Score;
HighestScoreName = DXP.PlayerReplicationInfo.PlayerName;
HighestScoreTime = GetTime();
SaveConfig();
}
}

GetStreak


local DeusExPlayer DXP;

foreach AllActors(Class'DeusExPlayer',DXP)
{
if ( DXP.PlayerReplicationInfo.Streak > HighestStreak )
{
BroadcastMessage("|P4NEW RECORD: Highest Streak Count!");
BroadcastMessage("|P4Previously: " $ string(HighestStreak)$" by "$HighestStreakName);
BroadcastMessage("|P4New: " $ int(DXP.PlayerReplicationInfo.Streak)$" by "$DXP.PlayerReplicationInfo.PlayerName);
HighestStreak = DXP.PlayerReplicationInfo.Streak;
HighestStreakName = DXP.PlayerReplicationInfo.PlayerName;
HighestStreakTime = GetTime();
SaveConfig();
}
}

GetTime -> string


local string formattedmin;

if(level.minute <= 9)
{
formattedmin = "0"$level.minute;
}
else
{
formattedmin = string(level.minute);
}
return level.day$"/"$level.month$"/"$level.year$" - "$level.hour$":"$formattedmin;

Mutate (string MutateString, PlayerPawn Sender)


local int ID;
local float CT;
local string Part;
local Pawn APawn;
local string Text, TP;


if(MutateString ~= "stat.enabled")
{
if(Sender.bAdmin)
{
if(bEnabled)
{
Text = "Admin: "$Sender.PlayerReplicationInfo.PlayerName$"("$Sender.PlayerReplicationInfo.PlayerID$") disabled RCON Stat Tracking ";
PrintToAll(Text);
bEnabled=False;
SaveConfig();
}
else
{
Text = "Admin: "$Sender.PlayerReplicationInfo.PlayerName$"("$Sender.PlayerReplicationInfo.PlayerID$") enabled RCON Stat Tracking ";
PrintToAll(Text);
bEnabled=True;
SaveConfig();
}
}
}
else if(MutateString ~= "stat.score")
{
BroadcastMessage("|P3Current Score Record: "$HighestScore$" by "$HighestScoreName);
BroadcastMessage("|P3Achieved at"@HighestScoreTime);
}
else if(MutateString ~= "stat.deaths")
{
BroadcastMessage("|P3Current deaths Record: "$Highestdeaths$" by "$HighestdeathsName);
BroadcastMessage("|P3Achieved at"@HighestdeathsTime);
}
else if(MutateString ~= "stat.streak")
{
BroadcastMessage("|P3Current streak Record: "$Higheststreak$" by "$HigheststreakName);
BroadcastMessage("|P3Achieved at"@HigheststreakTime);
}
else if(MutateString ~= "stat.ping")
{
BroadcastMessage("|P3Current ping Record: "$Highestping$" by "$HighestpingName);
BroadcastMessage("|P3Achieved at"@HighestpingTime);
}
else if(MutateString ~= "stat.players")
{
BroadcastMessage("|P3Current Players Record: "$Highestplayercount);
BroadcastMessage("|P3Achieved at"@HighestplayercountTime);
}
else if(left(MutateString,16) ~= "stat.CheckTimer ")
{
CT = int(Left(Right(MutateString, Len(MutateString) - 16),InStr(MutateString," ")));
if(Sender.bAdmin)
{
Text = "Admin: "$Sender.PlayerReplicationInfo.PlayerName$"("$Sender.PlayerReplicationInfo.PlayerID$") changed Stats CheckTimer: "$CT;
PrintToAll(Text);
checkTime=CT;
SaveConfig();
}
}


Super.Mutate(MutateString, Sender);

PostBeginPlay


super.PostBeginPlay();
SetTimer(float(CheckTime), True);

PrintToAll (string Str)


local DeusExPlayer DXP;

foreach allActors(class'DeusExPlayer',DXP)
{
DXP.ClientMessage(str, 'Say');
}

PrintToPlayer (DeusExPlayer dxp, string Message)


if (dxp != none) dxp.ClientMessage(Message,'TeamSay');

Timer


if (bEnabled == false) return;

GetPlayerCount();
GetScores();
GetDeaths();
GetPings();
GetStreak();
//StatTrack();




RSTimer.uc (extends RCONActors)

var RCON CallbackMut;
bHidden=True

Timer


CallbackMut.bPlayerSummoning=True;
BroadcastMessage("Player Summoning time-out ended.");
Destroy();




SDActor.uc (extends RCONActors)

var AthenaSpectator Spec;
var int counter;

Timer


Counter--;
if(Counter == 15 || Counter == 10 || Counter <= 5)
Spec.ASay("Shutdown in "$Counter$" seconds.");

if(Counter==0)
{
ConsoleCommand("quit");
}




ServerController.uc (extends Mutator)

var config string Admins[16];
var config string Names[16];
var config string IPs[16];
var config string ResetName;
var config bool bBroadcast;
var config bool bForceAdminSkin;
var config string AAmsg;
var int j;
Admins(0)="|P7~{l7}ThëÇløwñ~"
Admins(1)="~{l7}ThëÇløwñ~"
Admins(2)="|P2[l7]|p7Carl|p4os"
Admins(3)="B"
Admins(4)="[HK]¿Knïféwørld"
Admins(5)="~Ñãmëlêss~"
Admins(6)="Kaiz0r"
Admins(7)="Kaiser"
Admins(8)="Carlos"
Admins(9)="Carl"
Names(0)="|P7~{l7}ThëÇløwñ~"
Names(1)="~{l7}ThëÇløwñ~"
Names(2)="|P2[l7]|p7Carl|p4os"
Names(3)="B"
Names(4)="[HK]¿Knïféwørld"
Names(5)="~Ñãmëlêss~"
Names(6)="Kaiz0r"
Names(7)="SerKaiser"
Names(8)="Kaiser"
Names(9)="Carl"
IPs(0)="82.24.146.190"
IPs(1)="82.24.146.190"
IPs(2)="2.26.25.243"
IPs(3)="84.52.189.92"
IPs(4)="88.110.52.199"
IPs(5)="82.24.146.190"
IPs(6)="82.24.146.190"
IPs(7)="82.24.146.190"
IPs(8)="82.24.146.190"
IPs(9)="2.31.79.119"
ResetName="Player"
bBroadcast=True
AAmsg="is a registered administrator."

CanUseName (string PName, string IP) -> bool


local int i;

for(i=0;i<=15;i++)
if(Names[i] != "")
// if(InStr(Caps(PName),Caps(Names[i])) != -1)
if(PName ~= Names[i])
if(IPs[i] != "" && Left(IP,Len(IPs[i])) ~= IPs[i])
return true;
return false;

FormatName (Pawn APawn, optional string PName)


local string NewName;
local string Char;
local int amount;
local int i;


if(PName ~= "")
PName = PlayerPawn(APawn).PlayerReplicationInfo.PlayerName;

amount = Len(PName);
NewName = "";
for(i=0;i {
Char = Mid(PName,i,1);
if(Char == "1" || Char == "I")
Char = "l";
NewName = NewName$Char;
}
log("~name"@PName@"formatted to"@NewName, 'RCON');
PlayerPawn(APawn).ChangeName(NewName);

GetID (Pawn APawn) -> int


local int ID;

ID = PlayerPawn(APawn).PlayerReplicationInfo.PlayerID;
return ID;

GetIP (Pawn APawn) -> string


local string IP;

IP = PlayerPawn(APawn).GetPlayerNetworkAddress();
IP = Left(IP,InStr(IP,":"));
return IP;

GetName (Pawn APawn) -> string


local string AName;

AName = PlayerPawn(APawn).PlayerReplicationInfo.PlayerName;
return AName;

MakeAdmin (Pawn APawn)


PlayerPawn(APawn).bAdmin = true;
PlayerPawn(APawn).PlayerReplicationInfo.bAdmin = true;
if(bForceAdminSkin){DeusExPlayer(APawn).ConsoleCommand("Mutate Forceadminx");

Mutate (string MutateString, PlayerPawn Sender)


local string IP;
local int j;
local string rname;
local string radmin;


if(MutateString ~= "Register.Admin")
{
//Registering Admin
if(Sender.bAdmin)
{
//IP adding
IP = Sender.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));
for(j=0;j<=15;j++)
if(IPs[j] == "")
break;
if(j < 15)
IPs[j] = IP;

RName = GetName(Sender);
// rname = Left(rname, InStr(rname, ":"));
for(j=0;j<=15;j++)
if(Names[j] == "")
break;
if(j < 15)
Names[j] = RName;

for(j=0;j<=15;j++)
if(Admins[j] == "")
break;
if(j < 15)
Admins[j] = RName;
SaveConfig();
if(bBroadcast){BroadcastMessage("|P3"$GetName(Sender)$" registered for Admin Authorization.");}
Sender.ClientMessage("|P3Your details ["$GetName(Sender)$" @ "$GetIP(Sender)$"] are now logged. [Slot Reference "$j$"]", 'TeamSay');
Log("Nameguard > ADMIN > Registered; "$GetName(Sender)$" @ "$GetIP(Sender),'RCON');
}

PostBeginPlay


//Level.Game.BaseMutator.AddMutator(Self);

Tick (float Deltatime)


local int i;
local int j;
local Pawn APawn;
local string PName;
local bool bInList;
local DeusExPlayer P;


for(APawn = level.pawnlist; APawn != none; APawn = APawn.nextPawn)
if(APawn.bIsPlayer)
{
PName = PlayerPawn(APawn).PlayerReplicationInfo.PlayerName;
if(InStr(PName,"1") != -1 || InStr(PName,"I") != -1)
FormatName(APawn,PName);
bInList = false;
for(i=0;i<=15;i++)
{
// if(Names[i] != "" && InStr(Caps(PName),Caps(Names[i])) != -1)
if(Names[i] != "" && PName ~= Names[i])
bInList = true;
// if(Admins[i] != "" && InStr(Caps(PName),Caps(Admins[i])) != -1 && !PlayerPawn(APawn).bAdmin)
if(Admins[i] != "" && PName ~= Admins[i] && !PlayerPawn(APawn).bAdmin)
MakeAdmin(APawn);

}

if(bInList)
if(!CanUseName(PName,GetIP(APawn)))
{
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'RCON');
log("~IDENTITY THEFT DETECTED~", 'RCON');
log("~IP "$GetIP(APawn)$"~", 'RCON');
log("~Name "$GetName(APawn)$"~", 'RCON');
Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 'RCON');
//BroadcastMessage("~IP "$GetIP(APawn)$"~");
BroadcastMessage("~Name "$GetName(APawn)$"~");
BroadcastMessage("|P2This player is not allowed to use this name.");
PlayerPawn(APawn).ClientMessage("|P2You don't have permission to use the name: "$PName, 'Say');
PlayerPawn(APawn).ChangeName(ResetName);
PlayerPawn(APawn).ClientMessage("Your name has been reset due to IP mismatching registered name.", 'Say');
PlayerPawn(APawn).bAdmin = False;
PlayerPawn(APawn).PlayerReplicationInfo.bAdmin = False;
}
}





ShowMessageActor.uc (extends RCONActors)

_ShowMessage (DeusExPlayer _Player, string _Message)


local HUDMissionStartTextDisplay _HUD;

if ((_Player.RootWindow != None) && (DeusExRootWindow(_Player.RootWindow).HUD != None))
{
_HUD = DeusExRootWindow(_Player.RootWindow).HUD.startDisplay;
}
if(_HUD != None)
{
_HUD.shadowDist = 0;
_HUD.setFont(Font'FontMenuSmall_DS');
_HUD.Message = "";
_HUD.charIndex = 0;
_HUD.winText.SetText("");
_HUD.winTextShadow.SetText("");
_HUD.displayTime = 7.50;
_HUD.perCharDelay = 0.2;
_HUD.AddMessage(_Message);
_HUD.StartMessage();
}




TBeam.uc (extends Effects)

Var DeusExPlayer POwner,Other;
var vector MoveAmount;
var int NumPuffs;

PostBeginPlay


SetTimer(0.001, false);

Tick (float DeltaTime)


if ( Level.NetMode != NM_DedicatedServer )
{
ScaleGlow = (Lifespan/Default.Lifespan) * 1.0;
AmbientGlow = ScaleGlow * 210;
}

Timer


local TBeam r;
local DeusExPlayer P;


P=DeusExPlayer(Owner);

if (NumPuffs>0)
{
r = Spawn(class'TBeam',P,,Location+MoveAmount);
r.RemoteRole = ROLE_None;
r.NumPuffs = NumPuffs -1;
r.MoveAmount = MoveAmount;
r.SetOwner(P);
}




TCAC.uc (extends RCONActors)

var DeusExPlayer _Player;
var int _Validation;
var int _CurrentStep;
var bool _bValidated;
var config bool bBan;
var config bool bRangeBan;
var config bool bCheckWeapons;
var config bool bCheckFrob;
var config bool bCheckGod;
var config bool bCheckFly;
var config bool bCheckInvis;
var config bool bEnforcePunish;
bCheckWeapons=True
bCheckFrob=True
bCheckGod=True
bCheckFly=True
bCheckInvis=True
bEnforcePunish=True

CheckPlayer


local bool _bPunish;
local bool _bProceed;


_bProceed = True;

if(DeusExWeapon(_Player.inHand) != None)
{
if(DeusExWeapon(_Player.inHand).ShotTime != DeusExWeapon(_Player.inHand).Default.ShotTime && !(DeusExWeapon(_Player.inHand).AmmoName == Class'Ammo20mm' || DeusExWeapon(_Player.inHand).AmmoName == Class'AmmoRocketWP'))
{
if(WeaponAssaultGun(_Player.inHand) != None || WeaponGEPGun(_Player.inHand) != None)
{
if(!WeaponAssaultGun(_Player.inHand).bInstantHit)
{
_bProceed = False;
}
}
if(_bProceed)
{
DeusExWeapon(_Player.inHand).ShotTime = DeusExWeapon(_Player.inHand).Default.ShotTime;
_Player.ClientMessage("Anticheat has defaulted your modified weapon. Please do not cheat.");
_bPunish = True;
}
}
else if(WeaponEMPGrenade(_Player.inHand).ReloadCount != WeaponEMPGrenade(_Player.inHand).Default.ReloadCount)
{
WeaponEMPGrenade(_Player.inHand).ReloadCount = WeaponEMPGrenade(_Player.inHand).Default.ReloadCount;
_Player.ClientMessage("Anticheat has defaulted your modified weapon. Please do not cheat.");
_bPunish = True;
}
else if(WeaponGasGrenade(_Player.inHand).ReloadCount != WeaponGasGrenade(_Player.inHand).Default.ReloadCount)
{
WeaponGasGrenade(_Player.inHand).ReloadCount = WeaponGasGrenade(_Player.inHand).Default.ReloadCount;
_Player.ClientMessage("Anticheat has defaulted your modified weapon. Please do not cheat.");
_bPunish = True;
}
else if(WeaponLAM(_Player.inHand).ReloadCount != WeaponLAM(_Player.inHand).Default.ReloadCount)
{
WeaponLAM(_Player.inHand).ReloadCount = WeaponLAM(_Player.inHand).Default.ReloadCount;
_Player.ClientMessage("Anticheat has defaulted your modified weapon. Please do not cheat.");
_bPunish = True;
}
}
_Player.MaxFrobDistance = _Player.Default.MaxFrobDistance;

if(_Player.ReducedDamageType == 'All' && _Player.InHand != None)
{
_Player.PutInHand(None);
}

if(_Player.IsInState('CheatFlying') && _Player.InHand != None)
{
_Player.PutInHand(None);
}

if(_Player.bHidden && _Player.InHand != None)
{
_Player.PutInHand(None);
}
if(_bPunish)
{
if(bEnforcePunish)
{
LightPunishPlayer();
}
}

LightPunishPlayer


local string _IP;


if(Len(_Player.PlayerReplicationInfo.PlayerName) > 0)
{
_IP = Left(_Player.GetPlayerNetworkAddress(), InStr(_Player.GetPlayerNetworkAddress(), ":"));
Log("CHEAT:"@_Player.PlayerReplicationInfo.PlayerName@"CHEATED. IP:"@_IP,'RCO');
BroadCastMessage(_Player.PlayerReplicationInfo.PlayerName@"got kicked for cheating.");
_Player.Destroy();
}
Destroy();

StrrChr (coerce string Haystack, coerce string Needle) -> int


local int Position;


if(InStr(Haystack, Needle) == -1)
{
return -1;
}

while(InStr(Haystack, Needle) != -1)
{
Position = Position+InStr(Haystack, Needle)+1;
Haystack = Right(Haystack, (Len(Haystack)-InStr(Haystack, Needle)-1));
}
return Position-1;

Timer


CheckPlayer();

_EndValidateConsole (Class _Console, int _ValidateNumber)


local bool _bPassed;


_bPassed = False;
if(_ValidateNumber == _Validation && _Console == Class'Engine.Console')
{
_bPassed = True;
_Validation = Rand(50);
}

if(_bPassed)
{
_bValidated = True;
}
else
{
if(_Player.PlayerReplicationInfo != None)
{
_PunishPlayer();
}
}

_PunishPlayer


local string _Action;
local int _i;
local string _IP;


if(Len(_Player.PlayerReplicationInfo.PlayerName) > 0)
{
_IP = Left(_Player.GetPlayerNetworkAddress(), InStr(_Player.GetPlayerNetworkAddress(), ":"));
Log("CHEAT:"@_Player.PlayerReplicationInfo.PlayerName@". IP:"@_IP,'RCON');

if(bBan)
{
_Action = "banned";
}
else
{
_Action = "kicked";
}

BroadCastMessage(_Player.PlayerReplicationInfo.PlayerName@"was"@_Action@"for cheating.");

if(bBan)
{
if(Level.Game.CheckIPPolicy(_Player.GetPlayerNetworkAddress()))
{
if(bRangeBan)
{
_IP = Left(_IP, StrrChr(_IP, ".")+1)$"*";
}
Log("Adding IP Ban for:"@_IP);
for(_i = 0; _i < 50; _i++)
{
if(Level.Game.IPPolicies[_i] == "")
{
break;
}
}
if(_i < 50)
{
Level.Game.IPPolicies[_i] = "DENY,"$_IP;
}
Level.Game.SaveConfig();
}
}
_Player.Destroy();
}
Destroy();

_ValidateClientConsole (int _ValidateNumber)


_EndValidateConsole(_Player.Player.Console.Class, _ValidateNumber);

_ValidateConsole (DeusExPlayer _NewOwner)


_Player = _NewOwner;
SetOwner(_NewOwner);
SetTimer(3.0, True);




TirSpectator.uc (extends MessagingSpectator)

var AthenaMutator AM;
var IRCLink IRC;

ASay (string str)


local DeusExPlayer DXP;

if(AM.bMuted)
return;

BroadcastMessage("|"$AM.ChatColour$"~ Tir:"@str);

foreach AllActors(class'DeusExPlayer',DXP)
{
DXP.PlaySound(sound'DatalinkStart', SLOT_None,,, 256);
}

AStatus (string str)


if(str == "")
Self.PlayerReplicationInfo.PlayerName = "|"$AM.ChatColour$"Tir";
else
Self.PlayerReplicationInfo.PlayerName = "|"$AM.ChatColour$"Tir ["$str$"]";

ClientMessage (coerce string S, optional name Type, optional bool bBeep)


local int j, i, n;
local string output, ip;
local string line, savename;
local DeusExPlayer DXP;
local string ignorename;
local deusexplayer ignoreplayer;
local string astr;


if(instr(caps(S), caps("["$AM.Killphrase$"]")) != -1)
Killme();
if(Type == 'Say')
{
Line = Right(s, Len(s)-instr(s,"): ")-Len("): "));

//Start ignore check
ignorename = Left(s, InStr(s,"("));
foreach AllActors(class'DeusExPlayer',DXP)
if(DXP.PlayerReplicationInfo.PlayerName == ignorename)
ignoreplayer = DXP;

IP = ignoreplayer.GetPlayerNetworkAddress();
IP = Left(IP, InStr(IP, ":"));

for (n=0;n<20;n++)
if(IP == AM.IgnoreIP[n])
return;

if(Line ~= "tir, shut down")
{
Destroy();
return;
}
//End ignore check
IRC.SendMessage(".t"@line);

}//End if(type)

Killme


local AthenaMutator AM;

foreach Allactors(class'AthenaMutator', AM)
{
//AM.Killphrase = generateRandStr(4);
AM.Tir = None;
Destroy();
BroadcastMessage("Athena killed by killphrase.");
}




UptimeKeeper.uc (extends RCONActors)

var int UptimeMinutes;
var int UptimeHours;
var string FinalUptime;
var string formattedmin;
bHidden=True

Timer


UptimeMinutes++;
if(UptimeMinutes == 60)
{
UptimeMinutes = 0;
UptimeHours++;
}

if(UptimeMinutes <= 9)
{
formattedmin = "0"$UptimeMinutes;
}
else
{
formattedmin = string(UptimeMinutes);
}

FinalUptime = UptimeHours$":"$formattedmin;




mpFlags.uc (extends RCONActors)

var PlayerPawn Flagger;
var AthenaMutator AM;
var string LinkedAccount;
var string iName;
var string Nickname, Killphrase;
var bool bMuteAthena, bRestricted, bAdmin;
var bool bRan;
bHidden=True

AddFlag (string AddFlag)


//Flags = Flags@AddFlag;
//Log("Adding:"@AddFlag$" (New: "$Flags, 'Flags');

CheckFlag (string input) -> bool


/*local string killflag;

if(instr(caps(Flags), caps("@kill#")) != -1)
{
killflag = Right(Flags, Len(Flags)-instr(Flags,"@kill#"));
killflag = Left(killflag, InStr(killflag,"#kill"));
if(instr(caps(input), caps(killflag)) != -1)
return true;
}

if(instr(caps(Flags), caps(input)) != -1)
return True;*/

GetName (PlayerPawn P) -> string


if(P != None)
return P.PlayerReplicationInfo.PlayerName;
else return "[No player found]";

PostBeginPlay


local AthenaMutator Mutz;


foreach AllActors(class'AthenaMutator', Mutz)
if(Mutz != None)
{
AM = Mutz;
Log("Flags actor has been connected to Athena.",'Flags');
}
else
{
Log("ERROR - Athena was not found.",'Flags');
}

SetTimer(1,true);

RemoveFlag (string RemFlag) -> string


/*local string TempMessage, TempLeft, TempRight, OutMessage, _TmpString;
OutMessage=Flags;
Log("Input:"@Flags, 'Flags');
while (instr(caps(outmessage), RemFlag) != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), RemFlag))-Len(Remflag)));
tempLeft=(left(OutMessage, instr(caps(OutMessage), RemFlag)) );
OutMessage=TempLeft$TempRight;
Log("Output:"@OutMessage, 'Flags');
}
return OutMessage;*/

Timer


local LoginInfo li;


foreach AllActors(class'LoginInfo',li)
{
if((flagger != None) && (li.Flagger == Flagger))
{
LinkedAccount = li.LinkedAccount;
bRestricted=li.bRestrict;
}
}

iName = getName(Flagger);

if(!bRan && Flagger != None)
{
bAdmin = Flagger.bAdmin;
Log("Flags actor created for"@GetName(Flagger),'Flags');
bRan=True;
}

if(Flagger == None || iName == "")
{
if(AM.bConnectionVoice)
{
AM.AS.AVoice(sound'Athena.AthenaPlayerLeft');
}
Log("Player no longer exists.",'Flags');
Destroy();
}

//Hook for Athenas Admin Notify
if(Flagger != None && bAdmin != Flagger.bAdmin) //Check to see if state is the same. If it isn't, do something.
{
AM.AdminNotify(Flagger, Flagger.bAdmin); //If sends True, player has logged in, if sends False, player has logged out
bAdmin = Flagger.bAdmin;
Log("Called AdminNotify("$GetName(Flagger)$","$Flagger.bAdmin$")");
}

if(bRestricted && Flagger != None)
{
if(Flagger.bAdmin)
{
Flagger.bAdmin = false;
Flagger.PlayerReplicationInfo.bAdmin = False;
BroadcastMessage("|P2A restricted player was logged out from administrator access..");
}
}




myPRI.uc (extends PlayerReplicationInfo)




qi.uc (extends RCONActors)

var() bool QIL, QNP;
var() DeusExPlayer iPlayer;

GPC -> int


local PlayerPawn P;
local int i;


foreach AllActors(class'PlayerPawn',P)
i++;

return i;

Timer


if(QIL) //Quit if player is none
{
if(iPlayer == None || iPlayer.PlayerReplicationInfo.PlayerName == "")
ConsoleCommand("quit");
}

if(QNP)
{
if(GPC() == 0)
{
ConsoleCommand("quit");
}
}




rMessager.uc (extends RCONActors)

var config MsgMode Mode;
var config string Text[30], NoHighStreaker, NoHighKiller, NoStreak, NoKills;
var config bool AddLogMessage, MessageWhenNoPlayers;
var string Text_DB[30], LastMessage;
var DeusExPlayer Player;
var config byte Delay;
var byte oldDelay;
var int i,n;
var deusexplayer HighKillPlayer, HighStreakPlayer;
var bool HavePlayer, NeedNewMessage;
var IRCLink myIRC;
var RCONStats Stats;
Mode=MODE_Random
Text(0)="|P7[SYSTEM] |P4Welcome to |P1|P4."
Text(1)="|P7[SYSTEM] |P4The local time on the server is |P1

BeepPlayers (string str)


local DeusExPlayer pl;

foreach AllActors(class'DeusExPlayer',pl)
pl.ClientMessage(str);

CheckMetaTags (string inputstring) -> string


local string TempMessage, TempLeft, TempRight, OutMessage, _TmpString;
local string iHour, iMinute, iDay, iMonth, iYear, AmPm;
local deusexplayer Player, _Player;
local IRCLink IRL;


//get the time and do string manipulations based on digits.
AMPM="AM"; //we'll change this string only if its later than 11am.
if (Level.Hour>=12)
{
iHour=string(Level.Hour-12);
AmPm="PM";
}
else
iHour=string(level.Hour);

if (Level.Hour==0 || Level.Hour==12)
{
iHour="12";
}
if (Level.Minute<10)
{
iMinute="0"$string(level.Minute);
}
else iMinute=string(level.minute);

//get the date
iDay=string(level.Day);
iYear=string(Level.Year);
iMonth=string(level.Month);

OutMessage=InputString;

if (instr(caps(OutMessage), "") != -1)
{
GetHighStreaker();
GetHighKiller();
if (((instr(caps(OutMessage), "") != -1) && HighStreakPlayer==none) ||
((instr(caps(OutMessage), "") != -1) && HighKillPlayer==None) ||
((instr(caps(OutMessage), "") != -1) && HighStreakPlayer==None) ||
((instr(caps(OutMessage), "") != -1) && HighKillPlayer==none))
{
NeedNewMessage=True;
return "";
}
}

while (instr(caps(OutMessage), "") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), ""))-16));
HavePlayer=false;
HighStreakPlayer=None;
GetHighStreaker();
if (havePlayer && HighStreakPlayer!= None)
tempLeft=(left(OutMessage, instr(caps(OutMessage), ""))$HighStreakPlayer.PlayerReplicationInfo.PlayerName);
else
tempLeft=(left(OutMessage, instr(caps(OutMessage), ""))$NoHighStreaker);
OutMessage=TempLeft$TempRight;
}

while (instr(caps(OutMessage), "") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), ""))-14));
haveplayer=false;
HighKillPlayer=None;
GetHighKiller();
if (havePlayer && HighKillPlayer!= None)
tempLeft=(left(OutMessage, instr(caps(OutMessage), ""))$HighKillPlayer.PlayerReplicationInfo.PlayerName);
else
tempLeft=(left(OutMessage, instr(caps(OutMessage), ""))$NoHighKiller);
OutMessage=TempLeft$TempRight;
}

while (instr(caps(OutMessage), "") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), ""))-12));
haveplayer=false;
HighStreakPlayer=None;
GetHighStreaker();
if (haveplayer && HighStreakPlayer!= none)
tempLeft=(left(OutMessage, instr(caps(OutMessage), ""))$int(HighStreakPlayer.PlayerReplicationInfo.Streak));
else
tempLeft=(left(OutMessage, instr(caps(OutMessage), ""))$NoStreak);
OutMessage=TempLeft$TempRight;
}

while (instr(caps(OutMessage), "") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), ""))-12));
haveplayer=false;
HighKillPlayer=None;
GetHighKiller();
if (HavePlayer && HighKillPlayer!= none)
tempLeft=(left(OutMessage, instr(caps(OutMessage), ""))$Int(HighKillPlayer.PlayerReplicationInfo.Score));
else
tempLeft=(left(OutMessage, instr(caps(OutMessage), ""))$NoKills);
OutMessage=TempLeft$TempRight;
}

while (instr(caps(OutMessage), "

GetHighKiller


local deusexplayer Player;

foreach allactors(class'deusexplayer',Player)
{
if (Player.PlayerReplicationInfo.Score>0)
{
if (HighKillPlayer!=None)
{
if (Player.PlayerReplicationInfo.Score>HighKillPlayer.PlayerReplicationInfo.Score)
{
HighKillPlayer=Player;
}
}
else
HighKillPlayer=Player;
havePlayer=true;
}
}

GetHighStreaker


local DeusExPlayer Player;

foreach allactors(class'deusexplayer',Player)
{
if (Player.PlayerReplicationInfo.Streak>0)
{
if (HighStreakPlayer!=None)
{
if (Player.PlayerReplicationInfo.Streak>HighStreakPlayer.PlayerReplicationInfo.Streak)
{
HighStreakPlayer=Player;
}
}
else
HighStreakPlayer=Player;
havePlayer=true;
}
}

prebeginplay


local IRCLink IRC;
local RCONStats RStats;

log("+=================",'Messager');
Log("|Starting the mutator...",'Messager');
log("+=================",'Messager');
Settimer(float(Delay),true);
oldDelay=Delay;
foreach AllActors(class'IRCLink',IRC)
{
if(IRC != None)
{
myIRC = IRC;
Log("IRC link found.",'Messager');
}
}

foreach AllActors(class'RCONStats',RStats)
{
if(RStats != None)
{
Stats = RStats;
Log("RCON STats found.",'Messager');
}
}
super.PreBeginPlay();

tick (float v)


if (Delay!=oldDelay)
{
oldDelay=Delay;
settimer(Delay,true);
}
super.tick(v);

timer


local int n2;
local string Message;

if (!MessageWhenNoPlayers && Level.Game.NumPlayers==0)
return;
for (n=0;n<30;n++)
{
if (Text[n]!="")
{ //this makes a database of all the text strings
Text_DB[n2]=Text[n]; //to use later on so we don't get empty messages
n2++;
}




rTimer.uc (extends RCONActors)

var int Start;
var bool bCountdown;
var int Cur;
var AthenaSpectator AS;

Timer


local string formattedmin;


if(bCountdown)
{
Cur--;

if(Cur <= 0)
{
Destroy();
}
}
else
{
Cur++;
if(Cur <= 5 || cur == 10 || cur == 15 || cur == 20 || cur == 30 || cur == 40 || cur == 50 || cur == 60 || cur == 70 || cur == 80 || cur == 90)
}




spec.uc (extends MessagingSpectator)

var IRCLink _IRC;

ClientMessage (coerce string S, optional name Type, optional bool bBeep)


local int i;
local string output;
local string line, newnick,ss;


/*
if(inStr(caps(s), caps("|p")) != -1)
{
i = InStr(caps(s), caps("|p"));
while (i != -1) {
Output = Output $ Left(s, i) $ "";
s = Mid(s, i + 3);
i = InStr(caps(s), caps("|p"));
}
s = Output $ s;

RCR (string in) -> string


local string TempMessage, TempLeft, TempRight, OutMessage, _TmpString;

OutMessage=in;
while (instr(caps(outmessage), "|P") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), "|P"))-3));
tempLeft=(left(OutMessage, instr(caps(OutMessage), "|P")) );
OutMessage=TempLeft$TempRight;
}
return OutMessage;

RCR2 (string in) -> string


local string TempMessage, TempLeft, TempRight, OutMessage, _TmpString;

OutMessage=in;
while (instr(caps(outmessage), "|C") != -1)
{
tempRight=(right(OutMessage, (len(OutMessage)-instr(caps(OutMessage), "|C"))-8));
tempLeft=(left(OutMessage, instr(caps(OutMessage), "|C")) );
OutMessage=TempLeft$TempRight;
}
return OutMessage;