levrik / node-modern-rcon

A modern RCON client implementation written in ES2015
MIT License
29 stars 5 forks source link

Constants for COMMAND and RESPONSE_AUTH are the same #1

Closed electricessence closed 6 years ago

electricessence commented 6 years ago

This simply seems problematic to me. Can you explain?

levrik commented 6 years ago

It's defined like that in the spec. See https://developer.valvesoftware.com/wiki/Source_RCON_Protocol#Requests_and_Responses and http://wiki.vg/RCON#3:_Login

electricessence commented 6 years ago

Ok got it. It's the same for different operations. Just finished this: https://github.com/electricessence/rcon-ts (fork of your repo)

levrik commented 6 years ago

@electricessence Why didn't you contribute typings to this repo? Just curious 🙂

electricessence commented 6 years ago

I'm all for starting a pull request, but I've gone beyond just adding a .d.ts. Once you switch to TS, certain patterns show up. The .js and *.d.ts files are in NPM.

electricessence commented 6 years ago

I'm still working out the kinks too. Remember to include them in your package.json as "typings":"[name].d.ts". rcon.d.ts.zip

Here's the current d.ts file as it's being rendered. It's going to be different than yours but might be useful with a few tweaks.