lythx / trakman Goto Github PK
View Code? Open in Web Editor NEWTrackmania Forever server controller written in TypeScript
Home Page: https://trakman.ptrk.eu
License: MIT License
Trackmania Forever server controller written in TypeScript
Home Page: https://trakman.ptrk.eu
License: MIT License
Hia,
is planned something like zeroswitch or server neighborhood?
for chat messages, and in general, we should choose a colour palette of sorts (what to use (by default) for votes, admin stuff, queue).
also would be useful to think of how to format the chat notices. in xaseco, private messages (sent with Chat*ToLogin
etc) are prefixed with >
, global ones with >>
.
we dont have to necessarily copy that but having some """""guidelines""""" would improve consistency overall, no one really wants everything to look like rainbow puke (unless with a plugin that does exactly that).
no way to get them directly, so we need to store them for each player for each run. Or just have a global table with all the players and all the checkpoints like xasecer.
unbanning doesnt work cuz nadeo are fucking apes
Hia,
is planned musicserver and forcemods implementation? Also add some discord ingame button.
pls design popup window
add plugins dir and plugins.ts to gitignore pls!!
we have challenge, map, track
score, time
manialink, widget .. etc need to agree what to use everywhere
happened at least 4 times on loltards, it is reproducible in daemon mode (npm run daemon), but not in normal launch mode (npm run start). no error is output in the log, so debuggin is impossible idk how to fix
Yo,
After trying this controller on TMUF (snow server)
I have this error:
<ERROR> [19 Feb 2023 21:28:18] (Dedimania.js:111) Failed to fetch dedimania records for map Snow 2011 Lolly Jump (eY8soznlJRerRcKFVWvUfZvLXni), received error: Dedimania server responded with an error Error in method_handler.php(926): Invalid Environment: TMU,Snow Code:
that all
I have a issue where not all icons are loaded, i am not sure if it is client sided or server sided since some players say everything is loaded and some say it is not.
Any causes?
(edit) i also noticed that sometimes more icons load and sometimes less icons load when i join but they never all load.
"record" is already a type in native typescript PLEASE update it :) thanks
list of ui components to design and code:
initially reported in #208, but known for quite some time: on the very first controller start, you will encounter a plethora of database errors that are related to operations executing in parallel.
quoting my friend @lythx:
fixing it would be insanely cancer
cuz
we purposefully dont await some actions as they take time on launch
but when the db gets created theres just too many calls and delay is too big
so it crashes
you could always restart a few times tho..
GET HYPED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
some of the current ui doesnt update in time (if it does at all), maybe this list will be updated idk rtbh
locals dont update on //delrec (or //prunerecs), can be fixed by emitting Controller.LocalRecords
, PlayerRecord won't do it since we kinda have nothing to send if the record is removed instead.
karma doesnt update in general atm, but for the future we'll need to update it for everyone whenever theres a new vote. might need something like Controller.KarmaVote
or whatever to handle that.
buttons afaik dont update, or it doesnt seem like they do:
Controller.PlayerJoin
, Controller.PlayerLeave
, Controller.PlayerInfoChanged
and ofc on ready.tmx records should be updated on either Controller.PlayerFinish
or Controller.PlayerRecord
to update the relative colours n shit.
need to implement record deletion inside record service for delrec/prunerecs
equal records sometimes display the position incorrectly
CANT REPRODUCE
im extremely homosexual
hey snake stop fucking editing my messages maybe
no
//s (NextChallenge) after //res (ChallengeRestart) on endscreen specifically kills the map display and like everything ever because nadeo is a good company
im so fucking ga xDDDDDDDDDD
while our solution works just fine for the majority of the cases, there still appear to be a few outliers that manage to break the matching. note that the algorithm may be unoptimised too, so thats a thing to look out for as well.
for reference, heres the (fully commented) presumably working version of the function, courtesy of xymph (WARNING PHP):
// (markdown is a bit trippy here, everything preceded by // is a comment despite the incorrect highlighting)
function stripFormatting($input, $for_tm = true) {
return
// Replace all occurrences of a null character back with a pair of dollar signs for displaying in TM, or a single dollar for log messages etc.
str_replace("\0", ($for_tm ? '$$' : '$'),
// Replace links (introduced in TMU)
preg_replace(
'/
// Strip TMF H, L & P links by stripping everything between each square bracket pair until another $H, $L or $P sequence (or EoS) is found, this allows a $H to close a $L and vice versa, as does the game
\\$[hlp](.*?)(?:\\[.*?\\](.*?))*(?:\\$[hlp]|$)
/ixu',
// Keep the first and third capturing groups if present
'$1$2',
// Replace various patterns beginning with an unescaped dollar
preg_replace(
'/
// Match a single dollar sign and any of the following:
\\$
(?:
// Strip color codes by matching any hexadecimal character and any other two characters following it (except $)
[0-9a-f][^$][^$]
// Strip any incomplete color codes by matching any hexadecimal character followed by another character (except $)
|[0-9a-f][^$]
// Strip any single style code (including an invisible UTF8 char) that is not an H, L or P link or a bracket ($[ and $])
|[^][hlp]
// Strip the dollar sign if it is followed by [ or ], but do not strip the brackets themselves
|(?=[][])
// Strip the dollar sign if it is at the end of the string
|$
)
// Ignore alphabet case, ignore whitespace in pattern & use UTF-8 mode
/ixu',
// Replace any matches with nothing (i.e. strip matches)
'',
// Replace all occurrences of dollar sign pairs with a null character
str_replace('$$', "\0", $input)
)
)
)
;
}
ignoring the comments and """fancy""" format (aka i love wasting space in my editor):
function stripColours($input, $forTM = true) {
return
str_replace("\0", ($forTM ? '$$' : '$'),
preg_replace('/\\$[hlp](.*?)(?:\\[.*?\\](.*?))*(?:\\$[hlp]|$)/ixu', '$1$2',
preg_replace('/\\$(?:[0-9a-f][^$][^$]|[0-9a-f][^$]|[^][hlp]|(?=[][])|$)/ixu', '',
str_replace('$$', "\0", $input))));
}
forTM can obviously be ignored. it is unused even in xaseco itself XD.
NOTE that the function above does not remove the other formatting codes, for that \$[SHWIPLONGTZ]\
should be used (usually as the last OR statement)
here's a list of entries that should be tested against the regex to ensure its working (use regexr or something similar, dont overcomplicate your life lol):
$0CFωα$0CFғ$0CFα$i$000$i | $3CFNexogg GF
$L[goo.gl/UJy69u]$fffмσтι$0C6$fffи|ғ
$H[manialinker]$Hheythere$P[manialinker]
$000[$5f6CMC$000]$b$f60GuessWho
$B$FFFUber Bug
TM$5$6/$0$ARU DES
|$fadǵ$faeƒ$faf.$i$fffsabø$f|
$i$adf$wP$fffazeh
$<thefunnyname$>
dollar$$dollar
expected output:
ωαғα | Nexogg GF
мσтιи|ғ
heythere
[CMC]GuessWho
Uber Bug
TM DES
ǵƒ.sabø
Pazeh
thefunnyname
dollar$$dollar
current output:
ωαғα | Nexogg GF
мσтιи|ғ
heythere
[CMC]$bGuessWho
$BUber Bug
TM$5$0 DES
|ǵƒ.sabø
Pazeh
$<thefunnyname$>
dollar$lar
gettimestring: .10
is displayed as .010
which is misleading, flat times can be bugged as well, eg. 25.00
displaying as 24.100
.
mstotime: for some reason adds 2 hours or something to the playtime (sometimes). i assume has something to do with js Date being garbo.
Hi,
just a little feature suggestion:
I would like to easily add maps from Adminserv or my discord bot without restart the controller
Just need to reload the maplist on "TrackMania.ChallengeListModified" callback (src/Listeners.ts)
Yo, the controller is crashing at the begining of the podium
[30 Apr 2023 02:05:20] (Logger.js:28) Unhandled rejection occured:
Cannot read properties of undefined (reading 'callerLogin')
TypeError: Cannot read properties of undefined (reading 'callerLogin')
at Object.callback (file:///home/TM/TMUF/Trakman/TMN/built/src/Listeners.js:245:55)
at Object.emit (file:///home/TM/TMUF/Trakman/TMN/built/src/Events.js:66:18)
at ClientSocket.handleResponseChunk (file:///home/TM/TMUF/Trakman/TMN/built/src/client/ClientSocket.js:120:24)
at ClientSocket.handleResponseStart (file:///home/TM/TMUF/Trakman/TMN/built/src/client/ClientSocket.js:107:14)
at ClientSocket.handleResponseChunk (file:///home/TM/TMUF/Trakman/TMN/built/src/client/ClientSocket.js:125:18)
at ClientSocket.handleResponseStart (file:///home/TM/TMUF/Trakman/TMN/built/src/client/ClientSocket.js:107:14)
at ClientSocket.handleResponseChunk (file:///home/TM/TMUF/Trakman/TMN/built/src/client/ClientSocket.js:125:18)
at ClientSocket.handleResponseStart (file:///home/TM/TMUF/Trakman/TMN/built/src/client/ClientSocket.js:107:14)
at ClientSocket.handleResponseChunk (file:///home/TM/TMUF/Trakman/TMN/built/src/client/ClientSocket.js:125:18)
at ClientSocket.handleResponseStart (file:///home/TM/TMUF/Trakman/TMN/built/src/client/ClientSocket.js:107:14)
i'm using the latest version [1.3.2], freshly installed
using //add to queue a tmx map breaks the server map list entirely if the said map was already on the server.
in this case, the "ChooseNextChallenge" call always responds with an error stating "challenge is not in the selection", despite the map being present in both the database and the matchsettings file.
the filepaths in either also match, thus eliminating file mismatch as the culprit.
main issue here is the inability to ever queue the map in question, even after the controller restart. the error will keep reappearing until you shutdown and relaunch the dedicated server entirely, therefore this might not be our bug at all.
readme doesnt reflect the reality anymore
we have //kick and kick from playerlist and they use different things lolll....
doesn't run
my system:
neofetch
wiseraven@dell
OS: Arch Linux x86_64
Host: G5 5590
Kernel: 5.17.3-arch1-1
Uptime: 21 days, 4 hours, 5 mins
Packages: 1250 (pacman)
Shell: bash 5.1.16
Resolution: 1920x1080
DE: GNOME 42.0
WM: Mutter
WM Theme: Adwaita
Theme: Adwaita-dark [GTK2/3]
Icons: Numix-Circle [GTK2/3]
Terminal: gnome-terminal
CPU: Intel i7-9750H (12) @ 2.600GHz
GPU: Intel CoffeeLake-H GT2 [UHD Graph
GPU: NVIDIA GeForce RTX 2060 Mobile
Memory: 5616MiB / 15812MiB
uname -a
Linux dell 5.17.3-arch1-1 #1 SMP PREEMPT Thu, 14 Apr 2022 01:18:36 +0000 x86_64 GNU/Linux
lsblk
sda 8:0 0 931,5G 0 disk
├─sda1 8:1 0 300M 0 part
├─sda2 8:2 0 914,2G 0 part /mnt/5baf9c22-b345-4dc3-8851-417eb41ee159
└─sda3 8:3 0 17G 0 part
nvme0n1 259:0 0 238,5G 0 disk
├─nvme0n1p1 259:1 0 300M 0 part /boot/efi
├─nvme0n1p2 259:2 0 221,2G 0 part /var/log
│ /var/cache
│ /home
│ /
└─nvme0n1p3 259:3 0 17G 0 part [SWAP]
lspci
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:14.3 Network controller: Intel Corporation Cannon Lake PCH CNVi WiFi (rev 10)
00:15.0 Serial bus controller: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #0 (rev 10)
00:15.1 Serial bus controller: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #1 (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake Mobile PCH SATA AHCI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0)
00:1d.5 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #14 (rev f0)
00:1f.0 ISA bridge: Intel Corporation HM470 Chipset LPC/eSPI Controller (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2060 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU106 USB 3.1 Host Controller (rev a1)
01:00.3 Serial bus controller: NVIDIA Corporation TU106 USB Type-C UCSI Controller (rev a1)
02:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:01.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:02.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
04:00.0 System peripheral: Intel Corporation JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] (rev 02)
3a:00.0 USB controller: Intel Corporation JHL6340 Thunderbolt 3 USB 3.1 Controller (C step) [Alpine Ridge 2C 2016] (rev 02)
3b:00.0 Non-Volatile memory controller: SK hynix BC511
journalctl (sorry not full (its about 2 gigabytes))
апр 02 00:47:20 dell wpa_supplicant[658]: wlan0: WPA: Group rekeying completed >
апр 02 00:49:57 dell kernel: usb 1-2: USB disconnect, device number 81
апр 02 00:49:58 dell kernel: usb 1-2: new full-speed USB device number 82 using>
апр 02 00:49:58 dell kernel: usb 1-2: New USB device found, idVendor=0c45, idPr>
апр 02 00:49:58 dell kernel: usb 1-2: New USB device strings: Mfr=1, Product=2,>
апр 02 00:49:58 dell kernel: usb 1-2: Product: USB DEVICE
апр 02 00:49:58 dell kernel: usb 1-2: Manufacturer: SONiX
апр 02 00:49:58 dell kernel: input: SONiX USB DEVICE as /devices/pci0000:00/000>
апр 02 00:49:58 dell kernel: hid-generic 0003:0C45:7697.018F: input,hidraw1: US>
апр 02 00:49:58 dell kernel: input: SONiX USB DEVICE Keyboard as /devices/pci00>
апр 02 00:49:58 dell kernel: input: SONiX USB DEVICE Wireless Radio Control as >
апр 02 00:49:58 dell kernel: input: SONiX USB DEVICE as /devices/pci0000:00/000>
апр 02 00:49:58 dell kernel: hid-generic 0003:0C45:7697.0190: input,hiddev96,hi>
апр 02 00:49:58 dell mtp-probe[3785098]: checking bus 1, device 82: "/sys/devic>
апр 02 00:49:58 dell mtp-probe[3785098]: bus: 1, device: 82 was not an MTP devi>
апр 02 00:49:58 dell systemd-logind[566]: Watching system buttons on /dev/input>
апр 02 00:49:58 dell systemd-logind[566]: Watching system buttons on /dev/input>
апр 02 00:49:58 dell mtp-probe[3785113]: checking bus 1, device 82: "/sys/devic>
апр 02 00:49:58 dell mtp-probe[3785113]: bus: 1, device: 82 was not an MTP devi>
апр 02 00:57:20 dell wpa_supplicant[658]: wlan0: WPA: Group rekeying completed >
апр 02 01:07:20 dell wpa_supplicant[658]: wlan0: WPA: Group rekeying completed >
апр 02 01:17:20 dell wpa_supplicant[658]: wlan0: WPA: Group rekeying completed >
апр 02 01:27:20 dell wpa_supplicant[658]: wlan0: WPA: Group rekeying completed >
lua -v
Lua 5.4.4 Copyright (C) 1994-2022 Lua.org, PUC-Rio
php -v
PHP 8.1.5 (cli) (built: Apr 14 2022 18:36:20) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.5, Copyright (c) Zend Technologies
with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans
python --version
Python 3.10.4
ruby --version
ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux]
perl --version
This is perl 5, version 34, subversion 1 (v5.34.1) built for x86_64-linux-thread-multi
Copyright 1987-2022, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
gcc --version
gcc (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
pls fix :D
im so fucking gay holy shit i love men hahahahahahahah holy shit
https://instagram.fbeg5-1.fna.fbcdn.net/v/t51.2885-15/300792508_559396782540888_6207724973983813330_n.jpg?stp=dst-jpg_e35&cb=2d435ae8-0fbdf7c6&_nc_ht=instagram.fbeg5-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=mkOY_whzj2EAX--UlJ2&tn=dd3tBC0utWAH-jGW&edm=AJ9x6zYBAAAA&ccb=7-5&ig_cache_key=MjkxMjU3NjY4OTAwMjAwNzQ5Mw%3D%3D.2-ccb7-5&oh=00_AT9jjdrpLHGiA5hL3SzVwve4tPLtPHonLQ5vuFy95oiPPw&oe=630E254D&_nc_sid=cff2a4
Figure out how to handle errors there's like 34589576 ways and none of them work...
http://dedimania.net/tmstats/?do=stat&Account=ciekma_test&Show=PLAYERS
shows no players
http://dedimania.net/tmstats/?do=stat&Account=ciekma_test
no players(all in spec instead which simply isnt the case) + wrong gamemode (teams, not ta)
if played changed name, name is not updated on dedimania despite the records being registered just fine
typescript good js bad 😠😠😠
need to connect to maniakarma api to be able to supply global karma for tracks. while this is not 100% necessary (if anything its a chore to add), it will let us have feature parity with xaseco in the karma department (gfxkd confirmd???). api is obviously undocumented, and is rather obscure. on failure, the http codes returned do not conform to any standards and at times seem random.
most of the information thats needed was obtained via vardump in request, so it should be accurate enough for reproducing it in our code. see below:
Authentication Request [@Controller.Ready?]
Host: worldwide.mania-karma.com
Path: /api/tmforever-trackmania-v4.php
?Action=Auth
&login=autisticserv
&name=JGZmZsKsJDBGNUEkMEY2dSQxRjZ0JDFGN2kkMUY4cyQxRjl0JDJGOWljICQyRjlTJDFGOGVyJDFGN3YkMEY2ZSQwRjVyJGZmZiE=
&game=TmForever
&zone=United+Kingdom%7CEngland%7CLondon
&nation=GBR
User-Agent: XAseco/1.16 mania-karma/2.0.1 TmForever/2011-02-21 php/8.1.7 Linux/5.18.2-arch1-1 x86_64
login
is the server login, name
is base64encoded (??) server name, game
is obvious, zone
is the full path to the server, missing world, nation
is the 3-letter code of the server nation. useragent, likely, can be dropped.
Authentication Response
Code: 200 OK
Message:
<?xml version="1.0" encoding="utf-8" ?>
<result api="4.0.0">
<status>200</status>
<authcode>5dc12ba0c4c30d4be274d6e9d9707d3e</authcode>
<import_done>true</import_done>
<api_url>http://europe.mania-karma.com/api/tmforever-trackmania-v4.php</api_url>
</result>
authcode
here is important, this is going to be used in every request after authentication, import_done
is likely always true
, api_url
is the URL we'll have to use with the authcode
from before for all the following API requests.
Ping Request [@Controller.BeginChallenge?]
Host: europe.mania-karma.com
Path: api/tmforever-trackmania-v4.php?
Action=Ping
&login=autisticserv
&authcode=5dc12ba0c4c30d4be274d6e9d9707d3e
User-Agent: XAseco/1.16 mania-karma/2.0.1 TmForever/2011-02-21 php/8.1.7 Linux/5.18.2-arch1-1 x86_64
note the authcode
and changed Host
. this request is made on every challenge start in xaseco, i dont know whether its useful.
Ping Response
Code: 200 OK
Message:
<?xml version="1.0" encoding="utf-8" ?>
<releases>
<xaseco1xx>1.0.7</xaseco1xx>
<xaseco2xx>1.0.7</xaseco2xx>
<aseco220c>0.9.9</aseco220c>
<rcp4live>1.0</rcp4live>
</releases>
lol dont even ask. seems like irrelevant information about latest supported version for some controllers. funnily enough not even true since current version is 2.0.1 XD.
Receive Votes Request [@Controller.PlayerJoin]
Host: europe.mania-karma.com
Path: api/tmforever-trackmania-v4.php?
Action=Get
&login=autisticserv
&authcode=5dc12ba0c4c30d4be274d6e9d9707d3e
&uid=sUGewrlQqp05JcWLBzVIbxmdJFk
&map=UG9qZWJhbmEgVHJhc2EgTnIxICEhISEhIDwz
&author=brantt
&env=Stadium
&player=redgreendevil
User-Agent: XAseco/1.16 mania-karma/2.0.1 TmForever/2011-02-21 php/8.1.7 Linux/5.18.2-arch1-1 x86_64
yeah, this is sent on playerjoin, not beginchallenge. login
is the server login, authcode
is the authentication code from before, uid
is the map UId, map
is base64encoded (??) map name, author
is the map author, env
is the map environment and player
is the arriving player's login.
Receive Votes Response
Code: 200 OK
Message:
<?xml version="1.0" encoding="utf-8" ?>
<result api="4.0.0">
<status>200</status>
<uid>sm7g0aAHLMG9QAVapzt8TzLbPhh</uid>
<image_present>true</image_present>
<votes>
<karma>56</karma>
<fantastic percent="13.40" count="52" />
<beautiful percent="17.27" count="67" />
<good percent="40.21" count="156" />
<bad percent="10.05" count="39" />
<poor percent="5.41" count="21" />
<waste percent="13.66" count="53" />
</votes>
<players>
<player login="redgreendevil" vote="0" />
</players>
</result>
image_present
is somethnig i have no clue about. could be the tmx image its referring to. karma
is the current map karma, calculated with mk, rest of course should be understandable (just like the player
nodes).
Send Votes Request [@Controller.EndChallenge?]
Host: europe.mania-karma.com
Path: api/tmforever-trackmania-v4.php?
Action=Vote
&login=autisticserv
&authcode=5dc12ba0c4c30d4be274d6e9d9707d3e
&uid=SnZUQoHMfN0tG4UIu3ochGcALO0
&map=JGIkbiRmODBLciRmZmZvJGY4MEwkZmZmbyRmODBMIDEy
&author=acedepuma
&atime=11450
&ascore=0
&nblaps=0
&nbchecks=2
&mood=Day
&env=Stadium
&votes=ciekma_czakwal=3|redgreendevil=-3
&tmx=
User-Agent: XAseco/1.16 mania-karma/2.0.1 TmForever/2011-02-21 php/8.1.7 Linux/5.18.2-arch1-1 x86_64
login
is the server login, authcode
is the authentication code, uid
is the map UId, map
is the base64encoded (?) map name, author
is the map author, atime
is the author time, ascore
is the author score (stunsts mode), nblaps
is laps amount for multilap maps, nbchecks
is the checkpoint amount of the map, mood
is the map mood, env
is the map environment, votes
is an array of vote pairs (login=vote) joined by a pipe (|
) and tmx
is always empty, as its a leftover from tm2 version that included mx karma (sort of).
Send Votes Response
Code: 200 OK
i believe thats all we can possibly get, as those are all the api requests from the xaseco mk plugin. might wanna hardcode some values that we dont have access to for now, like the server zone (genuinely useless information)
Hia,
another idea is planned IRC? I used this https://plugins.xaseco.org/info.php?id=24 and for that I used Discord IRC Bot to relay it. I was able manage servers from Discord and IRC simmoultanously.
Same for restarting
file:///home/petr/dox/Programs/tm/trakman/built/src/Socket.js:85
reject(new Error(`${response.errorString} Code: ${response.errorCode}`));
^
Error: Change in progress. Code: -1000
at Timeout._onTimeout (file:///home/petr/dox/Programs/tm/trakman/built/src/Socket.js:85:32)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
if handshake failed (due to timeout etc) it still displays as success in the log (and nothing happens afterwards)
<info> Main.js:8 (main) handshake success
-push challenges to database on startup
-push logins to database on login
-push records to database on finish
-chat styling in Chat.js
-handle more events (add callbacks to Listeners.js file)
//less important
-storing setting like server password etc. in database and loading it on start (file Config.js/ConfigLoader.js)
need to support rounds-based gamemodes in the future: rounds (0), teams (2), laps (3) & cup (5).
Client, Listeners and so on should be static for plugin reasons. :D
privileges needs to be a separate table from players (most players arent likely to be more than 0)
privileges commands in general need a rework as they allow certain things that shouldnt be possible, eg demoting a person of higher rank than you (or equal, if that matters).. i didnt fix it back then lolol
Since we don't want unnecessary crashes (which happen in xaseco quite often as far as i know), we should think about on which errors the process should be exited. Obviously there are cases when controller needs to crash such as error in initializing services or losing connection with the server on socket, however exiting process on every failed database query or client call seems unnecessary (especially considering that external plugins irrelevant to core contoller functionality may use these methods). My suggestion is that in methods like these instead of throwing right away we just log the error and then return it. That would allow us to check for error on method call and then decide if we throw the program or not. For example if 'authorize' call in main retuns error we throw because there is no sense in continuing, but if a 'displayManialink' call from a plugin returns error we just log it since server can run without it. Maybe theres some better way to do it tho, also it would be nice to hear from our expert mr. Waseraven about what caused most crashes in XASECO cuz we might run into similar problems
Apparently they improve performance by making this language "multi-threaded". Might be a good idea to use them in the future. https://nodejs.org/api/cluster.html
it only yields one mapid while the query wants two so yeah... riop....
they are such awesome gentlemen its crazy
preferably we want an actual name other than "TRAKMAN" (not saying it's bad)
suggest anything that comes to your mind, acronyms are preferred but not a must.
Some words you could potentially use:
Controller
Mania
TypeScript (TS)
what we have so far:
NAME (New Age Mania Evolution)
CORE (Controller Redux)
SCORE (Script Controller Redux)
tx
we should add more admin commands, likely including those already in xaseco for feature parity.
ill list them all here, with checkmark indicating completeness/redundancy.
commands exclusive to our project arent in this list of course.
these commands will need voting system to work first:
these commands will need the queue/jukebox system to work first:
these commands will need the ui system to work first:
the service class is awful, it does almost the exact same thing in each case but each of the cases is written out. i do not get this
should be a part of the wiki probably. half of the readme should be in the wiki instead as well.
the script is still not public tho: https://github.com/wsrvn/xaseco-database-migration
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.