Skip to content

Releases

v1.5.0.0

Choose a tag to compare

@ej-mentol ej-mentol released this 12 Oct 04:22

Added

  • New cvars:
    • cf_bind_ip — local IPv4 address bound by both listener and sender sockets (default 0.0.0.0 = all interfaces).
    • cf_say_only — when 1, only say / say_team commands are accepted from UDP.
      • Commands containing ;, CR, LF or NUL are rejected as a whole.
      • Default 0 (off).
  • New console commands:
    • cf_status — shows listener/sender socket states, OS routing probe to cf_server_ip, packet counters (RX, TX, filtered, denied), pong count, RTT, and configuration warnings.
    • cf_ifaces — lists local IPv4 interfaces via SIO_GET_INTERFACE_LIST and marks the route used for cf_server_ip.
    • cf_ping — sends a diagnostic round-trip ping probe to cf_server_ip:cf_server_port.
    • cf_reload — re-reads cvars, recreates listener/sender sockets, and resets statistics counters.
  • Ping/pong diagnostics:
    • cf_ping queues packet tag 0x10 (ping <nonce>).
    • A peer may reply with 0x1F + PONG <nonce> <ip>:<port>.
    • Successful pong updates measured RTT and the peer-seen external IP address in cf_status.
    • Backwards-compatible: peers ignoring ping continue functioning normally.
  • In-game console diagnostics from network threads:
    • Errors (bind failures, WSA socket errors, packets dropped by cf_allow_ip or cf_say_only) are always logged with WSA codes and descriptive hints.
    • Successful socket bindings and routing details are logged when cf_debug 1.
  • udp_test_client.py reference peer client:
    • Interface selection (-b / --bind) and target routing (-s, -sp).
    • Answers 0x10 pings with 0x1F PONG.
    • Renders GoldSrc color codes (0x01–0x04) as ANSI terminal colors.
    • Suppresses duplicate packets within a 200 ms sliding window (--show-dups to disable).

Changed

  • CHAT (0x12) packets now carry the message author's SteamID64 instead of always the local player's:
    • On Sven Co-op, resolved directly via the engine studio player table (player_info_sc_t).
    • Falls back to hud_player_info_t on standard GoldSrc engines, then to the local player ID for own messages.
    • Evaluated via CSteamID::IsValid() and BIndividualAccount(): returns 0 for bots, LAN games, or when the engine provides no valid ID.
    • When cf_debug 1, logs the resolved source (src studio, hud, local, or none).
  • Safe client hook: wraps HUD_GetStudioModelInterface only when exported by the client library (returns 0 if absent).
  • Dynamic runtime configuration:
    • CVars are safely polled once per second in HUD_Frame and immediately on cf_reload.
    • Changing cf_bind_ip or cf_listen_port automatically re-binds the sockets.
    • cf_enabled and cf_listen_only apply dynamically at runtime without restarting worker threads.
  • Socket isolation: listener binds exclusively using SO_EXCLUSIVEADDRUSE on Windows (replacing SO_REUSEADDR) to prevent silent port hijacking.
  • Console output: all plugin messages now share a unified [CF] prefix.
  • Packet cleanup: CleanMessage preserves GoldSrc color bytes (0x01–0x04) and formatting (\n, \r, \t), stripping all other control codes.

Fixed

  • Fixed silent listener thread termination on socket errors or bind failures (the thread now logs the WSA error, sleeps, and retries).
  • Thread-safety: worker threads no longer access engine cvar_t* pointers directly (network config is snapshotted via thread-safe structure).
  • Receive buffer enlarged from 256 to 512 bytes to accommodate longer command strings.
  • Prevented static variable ODR violation in inline queue push logic (dropCount_ moved to member variable).

Upgrade notes

  • Receivers / Parsers
    • Ignore unknown packet tag bytes for forward compatibility.
    • The 8-byte SteamID field in CHAT (0x12) now contains the author's SteamID64 instead of the local player's. Fall back to the player name when this field is 0.
  • Peer on a LAN IP (not 127.0.0.1)
    • Set cf_server_ip to the peer's IP address.
    • Use cf_ifaces and cf_status to verify OS routing.
    • If bound to a specific IP, the peer must target that same interface (e.g. a peer bound to 192.168.0.15 will not receive packets sent to 127.0.0.1).
  • cf_allow_ip
    • Compares the UDP datagram source IP. A peer on the same PC sending to a LAN IP arrives from that LAN IP, not from 127.0.0.1.
  • Port conflicts
    • If cf_listen_port is already occupied, the plugin reports WSA 10048 in the console instead of silently sharing the port. Change cf_listen_port or terminate the conflicting application.
  • Security
    • Any host reaching cf_listen_port can execute console commands. Use cf_say_only 1 to restrict input strictly to chat messages, or bind locally via cf_bind_ip 127.0.0.1.
  • Compatibility
    • No existing CVars were renamed or removed; existing configurations remain fully functional.

v1.4.5.2

Choose a tag to compare

@ej-mentol ej-mentol released this 03 Jul 05:17

v1.4.5.2

Fixed

  • Race on cvar_t::string in OutputDebugStringA/QueueTask, read from a foreign thread while main thread could mutate it. Moved to mutex-guarded snapshot
  • udp_test_client: dedup now scoped by tag, no longer suppresses identical text arriving on different channels

Small update

Choose a tag to compare

@ej-mentol ej-mentol released this 22 May 08:44

Security: Independent Listener Filtering (cf_allow_ip)
Incoming command security is now decoupled from the outgoing log destination:

  • Added a new CVar: cf_allow_ip (Defaults to *).
  • The plugin now accepts incoming UDP console commands from the IP address specified in this CVar, regardless of the
    cf_server_ip setting.
  • How it works: By default (*), the plugin accepts commands from any IP address to ensure out-of-the-box
    compatibility on local networks. If your control bot or script is on a specific machine (e.g., 192.168.0.10), you
    should explicitly restrict access by setting cf_allow_ip "192.168.0.10" in your configuration.

v1.4.5

Choose a tag to compare

@ej-mentol ej-mentol released this 22 May 08:00

Protocol & Core

  • Updated UDP Protocol: Transitioned to a new binary packet structure. Each packet now includes an 8-byte SteamID64
    field (Layout: [1-byte Tag] [8-byte SteamID64 LE] [Message Body]).
  • SteamID Integration: The plugin now captures the local player's SteamID64 and forwards it with chat messages,
    allowing for precise player identification.
  • Safe Shutdown: Enhanced thread management and resource deallocation. The plugin now explicitly waits for worker
    threads to terminate and close network sockets. While this ensures a clean exit and prevents crashes, it may cause
    a slight delay when closing the game.
  • Internal Stability: Added safety checks for message buffers and implemented a reentry guard for system log
    capturing to prevent infinite recursion.
  • Version Bump: Core plugin updated to version 1.4.5.

UDP Test Client (Python)

  • Interface Selection: Added an interactive startup menu to select the network interface/IP address for binding the
    listener.
  • CLI Arguments: Added support for command-line arguments:
    -b / --bind: Specify bind IP.
    -s / --server: Specify target server IP.
    -lp / -sp: Customize listen and send ports.
    --show-dups: Toggle to disable duplicate filtering.
  • Duplicate Suppression: Implemented a default 200ms window to filter redundant messages (e.g., engine loopbacks on
    listen servers).
  • SteamID Formatting: Automatic conversion of raw SteamID64 to the legacy STEAM_0:Y:Z format for more familiar
    console output.
  • UI Improvements: Aligned all message tags ([CHAT], [SYS], etc.) for consistent vertical formatting and added a
    startup hint for --help.
  • Stability: Refined KeyboardInterrupt handling for a cleaner exit (no stack traces) when pressing Ctrl+C.

Chat Forwarder v1.4.4

Choose a tag to compare

@ej-mentol ej-mentol released this 20 Apr 09:51
fix(client): dedup only suppresses SYS, not CHAT/GAME/NET

Previously the first-arriving tag would win regardless of priority,
so if SYS arrived before CHAT the user's chat message would be dropped.

Now only tags in DEDUP_SUPPRESS_TAGS (SYS by default) are ever silently
dropped. All other tags (CHAT, GAME, NET, STUFF) always display and
register their content into the dedup buffer so subsequent SYS echoes
of the same message are suppressed correctly in both arrival orders:

  SYS first  -> shown, registered -> CHAT shown -> 2nd SYS DROPPED
  CHAT first -> shown, registered -> SYS DROPPED

Chat Forwarder v1.4.3

Choose a tag to compare

@ej-mentol ej-mentol released this 31 Dec 08:04
  • Forward game chat, logs, and commands via UDP (0x12-0x16 protocol)
  • Add autonomous build script (build_plugin.ps1)
  • Add standalone Python test client with ANSI colors
  • Document protocol and configuration in README.md
  • Preserve GoldSrc color codes (0x01-0x04) in forwarded messages