ILadis / Impostor-TS3voice

A plugin for the Among Us private server Impostor that integrates the current game state with a TeamSpeak 3 server.
3 stars 0 forks source link

Does it work with Impostor v1.4.0? #1

Closed j0nas500 closed 3 years ago

j0nas500 commented 3 years ago

Does this plugin work properly with the new Impostor version for Among Us Update 2021.4.2?

For me, the log showed that the person was recognised by the plugin, but no channels were created in Teamspeak or the users moved.

So I wonder if I have made a mistake somewhere or if the plugin does not (yet) support the latest Impostor version.

ILadis commented 3 years ago

I have not tested the plugin with the latest Impostor version 1.4.0. So there is a chance that it does not work.

As of now there is no dev build for version 1.4.0 available on their build server. Also their latest Impostor API NuGet package is still for version 1.3.0. So I wonder how I could even test it right now?

Could you share a full log of the plugin?
And regarding configuration: did you specify the correct TS3_CHANNEL_ORDER environment variable?

To get the channel id you can login via server query an issue the following command:

$ nc localhost 10011
< TS3
< Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
> login client_login_name=serveradmin client_login_password=...
< error id=0 msg=ok
> use 1
< error id=0 msg=ok
> channellist
< cid=1 pid=0 channel_order=0 channel_name=...

You then have to set TS3_CHANNEL_ORDER to the cid of the channel you like to use as the parent channel.

j0nas500 commented 3 years ago

I use Docker for Impostor, but it should also work with the Build Server. You were just in the wrong branch (dev). The correct link for version 1.4.0 can be found in the branch master: https://ci.appveyor.com/project/Impostor/Impostor/branch/master/artifacts

My output with Server Query is as follows:

$ nc localhost 10011
< TS3
< Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
> login client_login_name=serveradmin client_login_password=...
< error id=0 msg=ok
> use 1
< error id=0 msg=ok
> channellist
< cid=1 pid=0 channel_order=0 channel_name=Default\sChannel total_clients=2 channel_needed_subscribe_power=0|cid=2 pid=0 channel_order=1 channel_name=Among\sUs total_clients=0 channel_needed_subscribe_power=0|cid=5 pid=0 channel_order=2 channel_name=Test total_clients=0 channel_needed_subscribe_power=0
< error id=0 msg=ok
> exit

My .env looks like this:

TS3_SERVER_ID=1
TS3_USERNAME=serveradmin
TS3_PASSWORD=...
TS3_CHANNEL_ORDER=1

My docker-compose.yml:

version: '3.4'

services:
  impostor:
    image: aeonlucid/impostor:nightly
    container_name: impostor
    ports:
      - 22023:22023/udp
      - 22023:22023/tcp
      - 22024:22024/udp
      - 22024:22024/tcp
    environment:
      - TS3_SERVER_ID=${TS3_SERVER_ID:?err}
      - TS3_USERNAME=${TS3_USERNAME:?err}
      - TS3_PASSWORD=${TS3_PASSWORD:?err}
      - TS3_CHANNEL_ORDER=${TS3_CHANNEL_ORDER:?err}
    volumes:
      - /home/jonas/amongus/auserver/config.json:/app/config.json # For easy editing of the config
      - /home/jonas/amongus/auserver/plugins:/app/plugins         # Only needed if using plugins
      - /home/jonas/amongus/auserver/libraries:/app/libraries     # Only needed if using external libraries
      - /home/jonas/amongus/auserver/ImpostorHQ/configs:/app/configs     # ImpostorHQ Configs
      - /home/jonas/amongus/auserver/ImpostorHQ/hqplugins:/app/hqplugins     # ImpostorHQ Plugins
      - /home/jonas/amongus/auserver/ImpostorHQ/dashboard:/app/dashboard     # ImpostorHQ Dashboard

The Log:

docker-compose up
Starting impostor ... done
Attaching to impostor
impostor    | [10:15:21 INF] Starting Impostor v1.4.0-docker.391
impostor    | [10:15:22 INF] Matchmaker is listening on 0.0.0.0:22023, the public server ip is 127.0.0.1:22023.
impostor    | [10:15:22 INF] Announcements server is listening on 0.0.0.0:22024
impostor    | [10:15:22 INF] Loading plugins.
impostor    | [10:15:22 INF] Enabling plugin ImpostorHQ Impostor HeadQuarters API (0.0.7 stable) by anti, Dimaguy.
impostor    | [10:15:22 INF] Enabling plugin de.ladis.impostor.plugin ImpostorTS3mod (1.0.0) by ladis.
impostor    | [10:15:22 INF] Plugin is being enabled.
impostor    | [10:15:22 INF] Executor stopped.
impostor    | [10:15:22 INF] Loaded 2 plugins.
impostor    | [10:15:22 INF] Application started. Press Ctrl+C to shut down.
impostor    | [10:15:22 INF] Hosting environment: Production
impostor    | [10:15:22 INF] Content root path: /app
impostor    | [10:15:22 INF] ! WebApi server: bound insecure listener.
impostor    | [10:15:22 INF] ImpostorHQ : API Server listening on: 0.0.0.0:22023. Dashboard listening on: 0.0.0.0:22024/client.html
impostor    | [10:15:22 INF] ImpostorHQ Plugin System : Loaded "Test / Example plugin." by "anti"
impostor    | [10:15:22 INF] ImpostorHQ Plugin System : Loaded "Fashion Plugin" by "anti"
impostor    | [10:15:22 INF] ImpostorHQ Plugin System : Loaded "High Court" by "anti"
impostor    | [10:15:22 INF] ImpostorHQ Plugin System : Loaded "DDoS Info" by "anti"
impostor    | [10:15:22 INF] ImpostorHQ Plugin System : Loaded "Hall of Shame" by "anti"
impostor    | [10:15:22 INF] ImpostorHQ Plugin System : Loaded "Disk status" by "anti"
impostor    | [10:15:22 INF] ImpostorHQ Plugin System : Greetings from the test plugin! Warning: This should not be used in production environments!
impostor    | [10:15:22 INF] Fashion: loaded 2 skins.
impostor    | [10:15:22 INF] ImpostorHQ : Loaded 0 bans.
impostor    | [10:15:22 INF] ImpostorHQ Plugin System : Loaded 6 plugins.
impostor    | [10:15:23 INF] ImpostorHQ Hall of Shame : Acquired lock onto the justice plugin: True, Type: ImpostorHQ.Plugin.HighCourt.MainClass, Null: False
impostor    | [10:15:58 INF] [UUOPHS] Game created, preparing voice channel.
impostor    | [10:15:58 INF] UUOPHS - Player Jonas (1) is joining.
impostor    | [10:15:58 INF] [UUOPHS] Player joined, moving clients into voice channel.
impostor    | [10:15:58 INF] Moving client: Jonas
impostor    | [10:15:59 WRN] Received RpcFlag for unregistered NetId 3.
impostor    | [10:15:59 WRN] Received RpcFlag for unregistered NetId 3.

The Result: ts3 Nothing happens

ILadis commented 3 years ago

Is the TeamSpeak 3 server running in the same container as the Impostor server? If not that may be the issue here.

The TeamSpeak 3 server query interface host and port is currenlty hard coded into the plugin and set to localhost:10011. You may be able to adjust your docker configuration and expose the TeamSpeak 3 server query interface to the plugin on localhost:10011.

The plugin perdiodically sends version commands to the TeamSpeak 3 server. If you can see those in your TeamSpeak 3 server log the plugin could reach the query interface.

j0nas500 commented 3 years ago

Oke I have now also set up Impostor from the build. How do I have to specify the environment variables? Just add it to the start command? ./Impostor.Server TS3_SERVER_ID=1 TS3_USERNAME=serveradmin TS3_PASSWORD=... TS3_CHANNEL_ORDER=1

ILadis commented 3 years ago

That depends on what operating system you are using. On Linux you can do something like this:

env TS3_SERVER_ID=1 TS3_USERNAME=serveradmin TS3_PASSWORD=... TS3_CHANNEL_ORDER=1 ./Impostor.Server

On Windows I would recommend to write a short .bat file:

@echo off
set TS3_SERVER_ID=1
set TS3_USERNAME=serveradmin
set TS3_PASSWORD=...
set TS3_CHANNEL_ORDER=1
start ./Impostor.Server
j0nas500 commented 3 years ago

Oke thank you very much. Everything works with the latest Impostor version.

ILadis commented 3 years ago

Glad I could help. I guess the README could have a little more details on how to set up the plugin.