Git Product home page Git Product logo

g5ws's Introduction

PhlexPlexico

Site: phlexplexi.co
Hey there! I'm just a typical software developer from Canada. I usually spend my time in learning new (to me!) technologies and absorbing enough knowledge to get by. I'm a terrible designer so I just don't get front end frameworks, but that doesn't stop me from learning and trying new things. I currently work on enterprise resource planning systems for my job, but enjoy working with CS:GO (Sourcepawn), APIs (Node.js), and some small work with 3DS hardware/software (C/C++).
If you would like, feel free to contact me on Twitter, email, or the various socials on my site! I'm always willing to help as much as I can!๐Ÿค™

g5ws's People

Contributors

kyoto44 avatar phlexplexico avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

g5ws's Issues

[Feature Request] Please update README with G5WS CVARs

Spending months on/off trying to figure out why match DEMOs would not upload, turns out - missing a cvar get5_upload_demos 1.

Please update README or Wiki with cvars and their default/possible values for other people sake :)

Last map demo isn't being uploaded

Have no idea what's happened but on the latest release demo from the last map isn't attempted to be uploaded.

0|G5API  | POST /match/25/finish 200 18.744 ms - 21
0|G5API  | ::ffff:172.19.0.2 - - [07/Dec/2022:14:40:00 +0000] "POST /match/25/finish HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"
0|G5API  | POST /match/25/map/2/finish 200 28.454 ms - 21
0|G5API  | ::ffff:172.19.0.2 - - [07/Dec/2022:14:40:00 +0000] "POST /match/25/map/2/finish HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"

[Enhancement] POST match backups to a server

After each round we should be posting a backup to the API server that this plugin is connected to. This would give us more flexibility in restoring matches across servers if a server is deemed unstable, or unusable.

[Enhancement] Clean Up Repo

There should only be the code that is related to the API, remove any references to old code, and rework through each function.

[Enhancement] Bring More Player Info Across

When Get5 0.9 releases, there will be an array of new units for damage, flash times, etc. This ticket is to track any new stats that we can bring across so we can be as verbose as possible and store plenty of new information based on the match.

[get5.smx] json_decode: no object or array found at position 0

After the update, this happened :(

{
 "gamestate": 0,
 "available": 1,
 "plugin_version": "0.7.2-dev+516"
}
RecordSteamInterfaceCreation (PID 17149): STEAMHTTP_INTERFACE_VERSION003 / HTTP
Match config loading initialized.
L 01/29/2021 - 21:34:54: [get5.smx] json_decode: no object or array found at position 0
L 01/29/2021 - 21:34:54: [get5.smx] Failed to load match config: invalid match json
sm plugins list
[SM] Listing 19 plugins:
  01 "Admin Help" (1.10.0.6502) by AlliedModders LLC
  02 "Client Preferences" (1.10.0.6502) by AlliedModders LLC
  03 "Sound Commands" (1.10.0.6502) by AlliedModders LLC
  04 "Get5 API Integration - RIPEXT" (2.0.2) by splewis/phlexplexico
  05 "Admin File Reader" (1.10.0.6502) by AlliedModders LLC
  06 "Admin Menu" (1.10.0.6502) by AlliedModders LLC
  07 "Basic Commands" (1.10.0.6502) by AlliedModders LLC
  08 "Basic Ban Commands" (1.10.0.6502) by AlliedModders LLC
  09 "Basic Chat" (1.10.0.6502) by AlliedModders LLC
  10 "Basic Info Triggers" (1.10.0.6502) by AlliedModders LLC
  11 "Basic Votes" (1.10.0.6502) by AlliedModders LLC
  12 "Fun Votes" (1.10.0.6502) by AlliedModders LLC
  13 "Nextmap" (1.10.0.6502) by AlliedModders LLC
  14 "Get5" (0.7.2-dev+516) by splewis
  15 "Anti-Flood" (1.10.0.6502) by AlliedModders LLC
  16 "Reserved Slots" (1.10.0.6502) by AlliedModders LLC
  17 "Basic Comm Control" (1.10.0.6502) by AlliedModders LLC
  18 "Fun Commands" (1.10.0.6502) by AlliedModders LLC
  19 "Player Commands" (1.10.0.6502) by AlliedModders LLC

sm-ripext 1.3.0

Deprecated HTTPClient methodmap
Introduced HTTPRequest methodmap
pls update if possible

[Enhancement] Use new G5APIs and proper HTTP Requests

https://github.com/bottiger1/sourcemod-async

This will basically rewrite the entire plugin, but it's better as we should have better requests instead of sending everything in GETs. This will also remove the dependency of System2 and SteamWorks as well, leaving us with just to include async.

The G5API will still hold the legacy route, but we will create a new route for these calls, and use the same API key format to authenticate based on match.

How to add logdebug

How to add logdebug what plugin trying to send to a G5API?

I got a problem with error:

L 04/25/2022 - 19:34:13: [G5WS.smx] [ERR] API request failed, HTTP status code: 500
L 04/25/2022 - 19:34:13: [G5WS.smx] [ERR] Response:
{
    "message": "Not a correct API Key"
}

But when I create a manual POST request from Insomnia program. API responds without errors.

I want to check what request G5WS trying to create, and search for an error.

Exception: Not enough space on the heap

I am constantly getting this kind of error. I don't know how bad it can affect plugin functionality. Running server in a docker container, (Ryzen 5 3600/64 GB DDR4).

L 11/28/2022 - 13:56:32: [G5WS.smx] Failed to add http param key=xxxxxxxxxxxxxxxxxxxxxxxx
L 11/28/2022 - 13:56:32: [SM] Exception reported: Not enough space on the heap
L 11/28/2022 - 13:56:32: [SM] Blaming: G5WS.smx
L 11/28/2022 - 13:56:32: [SM] Call stack trace:
L 11/28/2022 - 13:56:32: [SM]   [1] Line 291, /home/runner/work/G5WS/G5WS/tmp/addons/sourcemod/scripting/include/json.inc::json_encode
L 11/28/2022 - 13:56:32: [SM]   [2] Line 272, /home/runner/work/G5WS/G5WS/tmp/addons/sourcemod/scripting/include/json.inc::json_encode
L 11/28/2022 - 13:56:32: [SM]   [3] Line 722, /home/runner/work/G5WS/G5WS/tmp/addons/sourcemod/scripting/include/json/object.inc::JSON_Object.Encode
L 11/28/2022 - 13:56:32: [SM]   [4] Line 224, G5WS.sp::Get5_OnPlayerDeath
L 11/28/2022 - 13:56:32: [SM]   [6] Call_Finish
L 11/28/2022 - 13:56:32: [SM]   [7] Line 756, get5/scripting/get5/stats.sp::Stats_PlayerDeathEvent

No demo record

If use 0.13, then for some reason the demo recording does not work, I get this message in the server log:

L 05/01/2023 - 14:14:18: [G5WS] get5_web_api_url now set to
L 05/01/2023 - 14:14:18: server_cvar: "mp_maxrounds" "30"
L 05/01/2023 - 14:14:22: [get5] Calling Get5_OnDemoFinished()
L 05/01/2023 - 14:14:22: [G5WS] About to enter UploadDemo. SO YES WE ARE. Our match ID is 8
L 05/01/2023 - 14:14:22: [G5WS] Trying to create request to url match/8/map/0/demo
L 05/01/2023 - 14:14:22: [G5WS] Added http header value key=ONYTBCEAZ2AOXK6YUH647DF2 to request
L 05/01/2023 - 14:14:22: [G5WS] Adding the API Key to the body is deprecated. Will be replaced once G5API 1.7.0 is released.
L 05/01/2023 - 14:14:22: [G5WS] Added param key=ONYTBCEAZ2AOXK6YUH647DF2 to request
L 05/01/2023 - 14:14:22: [G5WS] Our api url: http://g5test.bunker56.ru/api/
L 05/01/2023 - 14:14:22: [G5WS] Our demo string: 2023-05-01_14-08-09_8_map1_de_anubis.dem
L 05/01/2023 - 14:14:22: [G5WS] Added param demoFile=2023-05-01_14-08-09_8_map1_de_anubis.dem to request
src/common/httpclient.cpp (808) : pHost && *pHost
src/common/httpclient.cpp (808) : pHost && *pHost
L 05/01/2023 - 14:14:22: [G5WS] Trying to create request to url match/8/map/0/demo/upload
No minidump written, nothing to upload.
L 05/01/2023 - 14:14:22: [G5WS] Added http header value key=ONYTBCEAZ2AOXK6YUH647DF2 to request
L 05/01/2023 - 14:14:22: [G5WS] Uploading demo to server...
src/common/httpclient.cpp (808) : pHost && *pHost
src/common/httpclient.cpp (808) : pHost && *pHost
L 05/01/2023 - 14:14:22: [get5] Calling Get5_OnEvent(data={
"matchid": "8",
"event": "demo_finished",
"map_number": 0,
"filename": "2023-05-01_14-08-09_8_map1_de_anubis.dem"
})
L 05/01/2023 - 14:14:22: [get5] Skipping demo upload as upload URL is not set.

Server:
Debian 11
Docker version 23.0.5, build bc4487a
CS:GO:
Metamod:Source version 1.11.0-dev+1148
SourceMod Version: 1.11.0.6934

G5WS - last Master
get5 @ 6560baa
Compiled with SM 1.10.6545

When using 0.10.5, everything is fine

[Enhancement] Add New Forwards

New Forwards are coming into get5 via this PR splewis/get5#729

Since the baseline apistats is changing we need to add additional calls and whatnot to our plugin.

Additionally, it appears that the MatchID is being converted from an integer to a string, so we'll need to adjust the match ID and how it is sent across to G5API (which will still deal with it as an integer until further notice).

sm-json v3.0 implmenetation ?

With the current update of sm-json v3.0 Splewis get5 was recently updated today. It seems that it has broken the plugin with new json format being used. Can you check the same ?

The plugin is working fine expect for a few errors

So the plugin is working fine, everything gets logged except for the rounds we played a few rounds but G5V still reported 0==0 kills map banning and such all logged fine

I also found some error in the console

L 11/17/2022 - 14:39:47: [SM] Exception reported: Unable to open /home/container/csgo/get5_backup_match2_map0_round4.cfg for reading. errno: 2
L 11/17/2022 - 14:39:47: [SM] Blaming: G5WS.smx
L 11/17/2022 - 14:39:47: [SM] Call stack trace:
L 11/17/2022 - 14:39:47: [SM]   [0] SteamWorks_SetHTTPRequestRawPostBodyFromFile
L 11/17/2022 - 14:39:47: [SM]   [1] Line 669, G5WS.sp::Get5_OnRoundStart
L 11/17/2022 - 14:39:47: [SM]   [3] Call_Finish
L 11/17/2022 - 14:39:47: [SM]   [4] Line 1543, get5/scripting/get5.sp::Event_RoundStart
L 11/17/2022 - 14:39:42: [G5WS.smx] Failed to add http param key=6UZYPUEASV5H4ZOBNN7NKSL3
L 11/17/2022 - 14:39:42: [G5WS.smx] Failed to add http param PlayerDeathValues={"matchid":"2","assist":null,"no_scope":false,"event":"player_death","round_number":3,"map_number":0,"headshot":false,"round_time":17937,"thru_smoke":false,"attacker":{"side":"ct","is_bot":false,"steamid":"76561199171549369","name":"a5cvwdq2","user_id":3},"bomb":false,"attacker_blind":false,"player":{"side":"t","is_bot":false,"steamid":"76561198090495661","name":"Bonin","user_id":2},"friendly_fire":false,"weapon":{"name":"negev","id":37},"penetrated":0,"suicide":false}

UpdatePlayerStats not working

Hello! I downloaded the latest version of your plugin, and also the latest version of the Get5 plugin. There are problems with the collection of player statistics. According to the log, it appears that the url /match/8493/map/0/player/players/update is called
Instead of steamid, "players" is written to the database. Can you help figure it out?


8|G5API    | ::1 - - [22/May/2023:17:14:02 +0000] "POST /match/8493/map/0/update HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"
8|G5API    | POST /match/8493/map/0/player/players/update 200 4.804 ms - 21
8|G5API    | ::ffff:127.0.0.1 - - [22/May/2023:17:14:02 +0000] "POST /match/8493/map/0/player/players/update HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"
8|G5API    | PUT /match/8493/map/0/round/28/backup 200 2.427 ms - 22
8|G5API    | ::ffff:127.0.0.1 - - [22/May/2023:17:14:10 +0000] "PUT /match/8493/map/0/round/28/backup HTTP/1.1" 200 22 "-" "Valve/Steam HTTP Client 1.0 (730)"
8|G5API    | POST /match/8493/map/0/update 200 4.398 ms - 21
8|G5API    | ::ffff:127.0.0.1 - - [22/May/2023:17:14:57 +0000] "POST /match/8493/map/0/update HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"
8|G5API    | POST /match/8493/map/0/player/players/update 200 10.862 ms - 21
8|G5API    | ::1 - - [22/May/2023:17:14:57 +0000] "POST /match/8493/map/0/player/players/update HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"
8|G5API    | POST /match/8493/map/0/player/players/update 200 7.239 ms - 21
8|G5API    | ::1 - - [22/May/2023:17:14:57 +0000] "POST /match/8493/map/0/player/players/update HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"
8|G5API    | POST /match/8493/finish 200 5.187 ms - 21
8|G5API    | ::ffff:127.0.0.1 - - [22/May/2023:17:14:57 +0000] "POST /match/8493/finish HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"
8|G5API    | POST /match/8493/map/0/finish 200 4.272 ms - 21
8|G5API    | ::1 - - [22/May/2023:17:14:57 +0000] "POST /match/8493/map/0/finish HTTP/1.1" 200 21 "-" "Valve/Steam HTTP Client 1.0 (730)"

[Enhancement] Add possible dono message every X rounds

Maybe have a configurable message that plays every half/start of game, and allow users to enable and disable it with a convar (much like SVG usage and demo uploads). Just a simple message stating that if they like the API to consider starring/donating/get the word out to others about the tool.

[FEATURE REQUEST] Add Compression again and add 7Z Executable Condition

It seems Compression has been fixed after the update of System2 recently. Also system2 has support to check 7Zip and force 32bit version if 64 bit version is missing. Can you add that condition also to make it support better. People have to be sure to give permission to 7z to execute with 775 and have same user access in order to write compressed file in the directory.

Issue with stats such as MVP

I've just recently started experimenting with SourceMod plugins, as I'm hosting some casual competetive servers for my Discord server - so far, I'm amazed by the work which have been done with the G5V, G5API and G5-WebApi, it works like a charm.

However, I'm encountering an issue with some of the statistics, which I can't seem to solve myself.

Statistics such as MVP, kast and contribution_score is not being registered/sent to the G5API? It's part of the database, and it is being registered as a zero value.

I'm running Get5 0.7.1 and Get5 API Integration - RIPEXT 2.0.3 (the plugin info states 2.0.2 in the current release).

Does anyone have suggestions to solve the issue I'm encountering?


If anyone should encounter this issue, upgrading Get5 to development build will solve it.

Rename plugin

Since we're moving away from using sm-json and steamworks, we should rename this to be in the same name as the other libraries.

G5WS? Get5-WebStats?

[BUG] Data Sent Before JSON Struct on Windows

image

Hello!
All functions of my G5V and G5API are working properly, except match stats. After I created and started the match, the stats didn't work. G5V only shows "No stats are found for the current match." when the match was stated. I also checked G5API to see if any update requests from my game server have been sent to G5API but none was sent. This is my debug log from my game server and get5_debuginfo.
Game server:
image

get5_debuginfo:
https://pastebin.com/JpRrHRhC
Thank you!

[Enhancement] Compile Script

Create a script that will pull down all required .inc files and build the plugin. Using a shell script should be fine work for this, as it should make for an easy test to see if it compiles or not.

G5WS Returns 405 on every match end

G5WS Returns the following message

L 08/29/2022 - 16:17:59: [G5WS.smx] Failed to find cvar: "get5_backup_path"
L 08/29/2022 - 16:17:59: [G5WS.smx] Request failed, status code = 405

I have tried disabling SSL redirects but it had no effects
Unfortunately due to this issue G5V doesnt get any match data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.