mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-19 16:14:44 +00:00
Persistent gag
This commit is contained in:
parent
d398be55df
commit
7ea5ababe9
|
|
@ -17,6 +17,33 @@
|
|||
|
||||
package dtBan
|
||||
{
|
||||
|
||||
//Keep track of gags (Disconnecting and Reconnecting)
|
||||
function GameConnection::onDrop(%client, %reason)
|
||||
{
|
||||
%ip = %client.getAddress();
|
||||
%ip = getSubStr(%ip, 3, strLen(%ip));
|
||||
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
|
||||
%ip = strReplace(%ip, ".", "_");
|
||||
|
||||
$chatGagged[%ip] = $chatGagged[%client.guid] = (%client.isGagged == 1); //save status of this
|
||||
|
||||
parent::onDrop(%client, %reason);
|
||||
}
|
||||
|
||||
//Reapply the gag
|
||||
function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch )
|
||||
{
|
||||
parent::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch );
|
||||
|
||||
%ip = %client.getAddress();
|
||||
%ip = getSubStr(%ip, 3, strLen(%ip));
|
||||
%ip = getSubStr(%ip, 0, strstr(%ip, ":"));
|
||||
%ip = strReplace(%ip, ".", "_");
|
||||
|
||||
%client.isGagged = ($chatGagged[%ip] || $chatGagged[%client.guid]); //restore status
|
||||
}
|
||||
|
||||
function ClassicLoadBanlist()
|
||||
{
|
||||
$ClassicPermaBans = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue