Guild icon
Teeworlds
discord.gg/teeworlds / general
Teeworlds Discord Server.
Between 2020-08-21 00:00:00Z and 2020-08-22 00:00:00Z
Avatar
justabutterflier 2020-08-21 01:55:50Z
01:56
may i ask someone what does it do
01:56
not very detailed (edited)
Avatar
where is it from? can you link it?
Avatar
justabutterflier 2020-08-21 01:56:35Z
what is security token
01:56
sure
Avatar
cool
Avatar
justabutterflier 2020-08-21 01:57:20Z
bool HasSecurityToken(int ClientID) const { return m_aSlots[ClientID].m_Connection.SecurityToken() != NET_SECURITY_TOKEN_UNSUPPORTED; }
01:57
i mean
01:57
why we need to know this
01:57
why is it important?
Avatar
Nobody knows what you want, you should either link it to github or tell us where this is from, e.g. what file, what Project (ddnet? Vanilla?)
Avatar
justabutterflier 2020-08-21 01:58:40Z
k
Avatar
because i know of this, i can tell you without these information: its simply a function that returns true if the slot with the clientid that got passed (its i in this case) has a security token
Avatar
justabutterflier 2020-08-21 02:00:08Z
ok i can understand this :D wait for explanation ok?
02:00
explaining* sorry
Avatar
The security token is a thing from ddnet to avoid spoofing, the server and client communicate and send tokens, the server checks if it matches and if yes, the connection is secured, if it doesnt match, you cant connect
Avatar
justabutterflier 2020-08-21 02:01:32Z
yea boi
02:01
thanks
Avatar
(iirc you can still bypass the ddnet tokens and spoof anyways)
Avatar
justabutterflier 2020-08-21 02:03:08Z
I was hoping that maybe there is someone here who works at the interface between the server and the client, and is generally responsible for this, so I can ask him why we need to know if the player has a token.
02:03
so you are this man
02:03
thanks :)
02:03
(iirc you can still bypass the ddnet tokens and spoof anyways)
@fokkonaut luckily I don't need it
02:04
Are you trying to learn coding?
Avatar
justabutterflier 2020-08-21 02:04:54Z
a bit (edited)
02:05
working on rcon cmds on xpanic
Avatar
justabutterflier 2020-08-21 02:06:20Z
i know enough to make some not bad features for xpanic but i know i'm still not so good to say "yay i'm developer!"
02:07
character.cpp is my house and engine\server\server.cpp was like a cold forest without phone and zippo
02:07
:D
02:07
sorry for my grammar
Avatar
i can imagine
02:07
i went through that too
02:08
fun fact: my zippo went empty today
Avatar
justabutterflier 2020-08-21 02:08:16Z
oh
02:08
you mean original zippo or just a thing which creates a fire? :D
Avatar
Original Zippo
Avatar
justabutterflier 2020-08-21 02:08:36Z
i dunno how to name zippo in the different way
02:08
wow
Avatar
lighter
Avatar
justabutterflier 2020-08-21 02:08:44Z
k
02:10
so may i ask you is it legal to use character.cpp function for some player through cgamecontext pointer then m_applayers[i] , getcharacter and the function?
02:10
Avatar
implement rcon commands using ddracecommands.h
02:11
and ddracecommands.cpp
02:11
register the ConFunction in gamecontext.h
02:11
check how its done for other commands
Avatar
justabutterflier 2020-08-21 02:12:16Z
saw this but thought i don't rly need this because other cmds are working not bad (didn't used character funcs)
02:12
k
Avatar
yes you can do that, you can also use GetPlayerChar(pResult->GetInteger(0)) to access it directly
02:12
but important:
02:13
before accessing the player or the character, check if it exists
Avatar
justabutterflier 2020-08-21 02:13:07Z
yee
Avatar
you know how that works?
Avatar
justabutterflier 2020-08-21 02:13:19Z
yes :)
02:13
player != character
Avatar
justabutterflier 2020-08-21 02:13:36Z
and if player are spec, he have no character so we can't use character funcs
02:13
are you talking about this or i just missed? (edited)
Avatar
Before you access the character or player pointer, you check if the memory exists, check out other ddracecommands
02:14
if (!pPlayer) return;
Avatar
justabutterflier 2020-08-21 02:14:46Z
+
02:17
but why
02:17
memory does not exists but player exists
02:17
character
Avatar
If you enter a client id that is not online, e.g. 60, then the server cant access it
02:26
It will crash
02:26
also, if you already know that the character exists, then you dont need to check for the player
02:26
Player always exists as long as a client is online, and character exists as long as the player is actually playing and having a tee
02:28
There is one weird exception: Thats for /spec. /spec doesnt delete your character, it just doesnt process it anymore. Memory is still saved so you get all your character variables back to how it was (e.g. Jetpack, freeze, jumps, weapons) after you resume
Avatar
justabutterflier 2020-08-21 02:30:36Z
k
02:30
thanks
02:30
but
02:31
i'm sure there is getplayerchar(e.g. 0)
02:31
i'm zero id and i'm exist
02:31
my tee exists
Avatar
0 is your client id
Avatar
justabutterflier 2020-08-21 02:31:34Z
but server thinks it is not
Avatar
justabutterflier 2020-08-21 02:31:43Z
i mean
Avatar
you need to specify your arguments
Avatar
justabutterflier 2020-08-21 02:32:19Z
?
Avatar
show me how you register your command
Avatar
justabutterflier 2020-08-21 02:32:23Z
k
02:35
Console()->Register("setzomb", "i[id]", CFGFLAG_SERVER, ConInfect, this, "Infect someone by id");
02:36
@fokkonaut
02:36
ah
02:36
sry
02:36
What was your problem?
Avatar
justabutterflier 2020-08-21 02:36:51Z
nono
02:36
i mean sry for ping
02:37
i thought you got away because i'm too slow so i pinged you (edited)
Avatar
Ok, show me the function to it
Avatar
justabutterflier 2020-08-21 02:37:51Z
Avatar
I did not understand you problem yet
Avatar
justabutterflier 2020-08-21 02:37:57Z
Avatar
okay look
02:38
pUserData is not of type CGameContext
Avatar
justabutterflier 2020-08-21 02:38:37Z
pUser?
Avatar
the user is of type CServer
02:38
Register the command in ddracecommands .h and .cpp
Avatar
justabutterflier 2020-08-21 02:38:59Z
tried
02:39
that why is it pUserData
Avatar
do it
02:39
No, dont copy paste
02:39
Do it in there
Avatar
justabutterflier 2020-08-21 02:39:18Z
wdym
Avatar
What file is this?
Avatar
justabutterflier 2020-08-21 02:39:37Z
server.cpp and .h
Avatar
where do you have to go?
Avatar
justabutterflier 2020-08-21 02:40:49Z
?
02:40
to character.cpp
Avatar
justabutterflier 2020-08-21 02:41:04Z
no?
Avatar
ddracecommands.h
Avatar
justabutterflier 2020-08-21 02:41:13Z
but why?
Avatar
i just told you
Avatar
justabutterflier 2020-08-21 02:41:30Z
ok
02:41
argument is good :D
Avatar
i told you why
02:42
because look where you register the cmd, you pass a this
02:42
this this is of type CServer, because this is where it gets called
02:42
So you cant cast the pUserData to CGameContext
02:42
that will acces wrong memory
Avatar
justabutterflier 2020-08-21 02:42:58Z
but if i will use pUser
02:43
instead of pUserData
02:43
is it similar?
Avatar
That doesnt matter
02:43
Its just the name
02:43
you can also name it pNotUser xD
Avatar
justabutterflier 2020-08-21 02:43:23Z
thought so
02:43
k
02:43
truly i tried it in ddracecommands before but stucked into lnk2019
02:45
truly = tbh here
Avatar
good night✌️
Avatar
justabutterflier 2020-08-21 02:49:35Z
gn
02:49
are you going to sleep?
Cellegen | HU joined the server. 2020-08-21 08:01:50Z
Avatar
@justabutterflier are you recreating infClass?
Avatar
justabutterflier 2020-08-21 08:39:28Z
xpanic isn't infclass, different modes
Avatar
someone recently wanted to recreate it to 0.7
08:55
are you doing the same thing? (edited)
Clodorck joined the server. 2020-08-21 10:19:40Z
Avatar
ah no, @gerdoe supports xpanic on 0.6
Avatar
Hey there
11:32
I get some issues
11:32
it cannot do delta unpack or something
11:32
if you answer please ping
Avatar
@8-Ball which server?
Avatar
@Learath2 general DDRace
Avatar
0.7 client or 0.6?
12:51
the latest
Avatar
@8-Ball the latest as from github? There was a fix yesterday that should fix an issue
13:29
Shall I redevelop?
13:30
@Learath2
13:31
recompile?
Avatar
Yep, recompiling should fix it
13:35
lmk if it doesn't
Avatar
Hey guys, quick question
21:16
A friend of mine asks for what's the best tw Version to download for Mac
Avatar
Ok thx
21:18
Why he have a virus now
Avatar
you can download teeworlds 0.7 from teeworlds.com
21:20
0.8 is not out yet
Exported 170 message(s)