mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-14 05:13:14 -04:00
Add OnPlayerReportedChat Trigger Handling
This commit is contained in:
@@ -3,8 +3,7 @@ package script.player.base;
|
||||
import script.*;
|
||||
import script.library.*;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.Vector;
|
||||
import java.util.*;
|
||||
|
||||
public class base_player extends script.base_script
|
||||
{
|
||||
@@ -287,6 +286,7 @@ public class base_player extends script.base_script
|
||||
private static final boolean FORCE_SKIP_TUTORIAL = utils.checkConfigFlag("GameServer", "skipTutorial");
|
||||
private static final boolean WALL_OF_MIST_DISABLED = utils.checkConfigFlag("GameServer", "fsWallOfMistDisabled");
|
||||
private static final boolean VETERAN_REWARDS_ENABLED = utils.checkConfigFlag("GameServer", "enableVeteranRewards");
|
||||
public static final String REPORT_URL = getConfigSetting("GameServer", "chatReportUrl");
|
||||
|
||||
public int OnCustomizeFinished(obj_id self, obj_id object, String params) throws InterruptedException
|
||||
{
|
||||
@@ -12309,5 +12309,17 @@ public class base_player extends script.base_script
|
||||
leaderboard.handleGcwLeaderboardDataRequestCsInternalOnly(self, idx);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
public int OnPlayerReportedChat(obj_id self, obj_id reported, String chatLog) throws InterruptedException {
|
||||
Map<Object, Object> data = new HashMap<>();
|
||||
data.put("log", chatLog);
|
||||
data.put("reporterOID", self);
|
||||
data.put("reporterSID", getPlayerStationId(self));
|
||||
data.put("reporterChar", getPlayerName(self));
|
||||
data.put("reportedOID", reported);
|
||||
data.put("reportedSID", getPlayerStationId(reported));
|
||||
data.put("reportedChar", getPlayerName(reported));
|
||||
web_api.sendDataAsPost(REPORT_URL, data);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user