초기커밋
This commit is contained in:
30
GameServer/Contents/UserReport/UserReportCheat.cs
Normal file
30
GameServer/Contents/UserReport/UserReportCheat.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using ServerCore; using ServerBase;
|
||||
using ServerCommon;
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
[ChatCommandAttribute("userreport", typeof(ChatCommandUserReport), AuthAdminLevelType.Developer, AuthAdminLevelType.GmNormal, AuthAdminLevelType.GmSuper)]
|
||||
internal class ChatCommandUserReport : ChatCommandBase
|
||||
{
|
||||
public override async Task invoke(Player player, string token, string[] args)
|
||||
{
|
||||
Log.getLogger().info($"HandleUserReport");
|
||||
|
||||
if (args.Length < 1)
|
||||
{
|
||||
Log.getLogger().error($"Invalid Argument");
|
||||
return;
|
||||
}
|
||||
|
||||
(var result, var nickname_attrib) = await NicknameHelper.findNickname(args[0]);
|
||||
if (result.isFail())
|
||||
{
|
||||
return;
|
||||
}
|
||||
NullReferenceCheckHelper.throwIfNull(nickname_attrib, () => $"nickname_attrib is null !!! - {player.toBasicString()}");
|
||||
|
||||
var user_report_action = player.getEntityAction<UserReportAction>();
|
||||
await user_report_action.UserReport(nickname_attrib.UserGuid, args[0], "이유", "신고", "신고합니다.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user