Skip to main content

Overview

This changelog documents all notable changes to the CoD4 Unleashed Server project. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
For the most up-to-date changelog, see CHANGELOG.md in the repository.

Unreleased

Current development version with the following additions:

Added

CoD4 Unleashed now supports both the original 1.7 client protocol and the newer 1.8 Steam protocol:
  • Players using CoD4 1.7 can connect
  • Players using CoD4 1.8 (Steam version) can connect
  • Server automatically detects client protocol version
  • Both versions can play on the same server simultaneously
Benefits:
  • Larger player base (both Steam and non-Steam players)
  • Future-proof for Steam client updates
  • No need to run separate servers
New GSC function to detect which protocol version a player is using:
OnPlayerConnect()
{
    protocol = self getProtocol();
    
    if (protocol == 6)
    {
        self iPrintLn("You are using CoD4 1.7");
    }
    else if (protocol == 7)
    {
        self iPrintLn("You are using CoD4 1.8 Steam");
    }
}
Use cases:
  • Display different messages based on client version
  • Track player client distribution
  • Apply version-specific workarounds
  • Server statistics and analytics
Full HTTPS support for secure web requests:
// Make HTTPS requests from GSC
response = httpGet("https://api.example.com/data");
Features:
  • SSL/TLS certificate validation
  • Supports modern HTTPS sites
  • Required for most modern APIs
  • Uses libcurl for robust implementation
Requirements:
  • libcurl must be compiled with SSL support
  • OpenSSL libraries required (Windows: install Win32 OpenSSL)

Version 1.1.1 (Hotfix) - 2019-03-09

Hotfix release addressing JSON parsing issues.

Fixed

Issue: The JSON parser was incorrectly handling boolean values (true and false).Fix: Boolean values now parse correctly in JSON strings:
// Before fix (1.1.0): booleans didn't parse correctly
jsonStr = "{\"enabled\": true, \"disabled\": false}";
data = jsonParse(jsonStr);
// data.enabled and data.disabled were undefined/incorrect

// After fix (1.1.1): works properly
data = jsonParse(jsonStr);
if (data.enabled)
    iPrintLnBold("Feature is enabled!");
Affected users: Anyone using JSON module with boolean values should update to 1.1.1.

Version 1.1.0 - 2019-03-09

Major release with HTTP 1.1 support, JSON functionality, and project rename.

Added

Complete HTTP 1.1 protocol implementation:Features:
  • Persistent connections (keep-alive)
  • Chunked transfer encoding
  • Better performance for multiple requests
  • Modern HTTP/1.1 compliant
Usage:
// Uses HTTP 1.1 automatically
response = httpGet("http://example.com/api");
Benefits:
  • Faster API calls
  • Support for modern web services
  • Better compatibility with CDNs
  • Reduced connection overhead
Native JSON parsing and generation in GSC scripts:Module location: unleashed\json in bin/ directoryUsage:
#include unleashed\json;

// Parse JSON from API response
response = httpGet("http://api.example.com/players");
data = jsonParse(response);

if (isDefined(data))
{
    playerName = data.name;
    playerScore = data.score;
    
    // Access nested objects
    if (isDefined(data.stats))
    {
        kills = data.stats.kills;
        deaths = data.stats.deaths;
    }
}

// Generate JSON
jsonStr = jsonStringify(myDataStructure);
Supported types:
  • Strings
  • Numbers
  • Booleans (fixed in 1.1.1)
  • Objects
  • Arrays
  • Null values
Check if a variable is an array:
if (isArray(myVar))
{
    // It's an array, safe to iterate
    for (i = 0; i < myVar.size; i++)
    {
        // Process array elements
    }
}
else
{
    // Not an array
}
Use cases:
  • Prevent errors when iterating
  • Validate function parameters
  • Dynamic type checking
  • Safer array operations
Unix timestamp functions for time handling:

getEpochTime()

Get current Unix timestamp (seconds since Jan 1, 1970):
timestamp = getEpochTime();
// Returns: 1552147200 (example)

// Use for:
// - Time-based events
// - Session tracking
// - Cooldown timers
// - Database timestamps

epochTimeToString()

Convert timestamp to readable string:
timestamp = getEpochTime();
timeStr = epochTimeToString(timestamp);
// Returns: "2019-03-09 12:00:00" (example)

iPrintLn("Server time: " + timeStr);
Example: Cooldown system
setCooldown(player, ability, seconds)
{
    if (!isDefined(player.cooldowns))
        player.cooldowns = [];
    
    player.cooldowns[ability] = getEpochTime() + seconds;
}

checkCooldown(player, ability)
{
    if (!isDefined(player.cooldowns[ability]))
        return true; // Not on cooldown
    
    currentTime = getEpochTime();
    
    if (currentTime >= player.cooldowns[ability])
    {
        player.cooldowns[ability] = undefined;
        return true; // Cooldown expired
    }
    
    remaining = player.cooldowns[ability] - currentTime;
    player iPrintLn("Cooldown: " + remaining + " seconds");
    return false; // Still on cooldown
}
Force a player to spectate a specific client:
// Make player1 spectate player2
player1 setSpectatedClient(player2);

// Use cases:
// - Custom spectator modes
// - Admin overview tools
// - Tournament spectating
// - Kill cams
// - Coaching systems
Example: Admin spectate command
adminSpectate(admin, targetName)
{
    target = findPlayerByName(targetName);
    
    if (!isDefined(target))
    {
        admin iPrintLn("Player not found");
        return;
    }
    
    // Put admin in spectator
    admin [[game["allies"]]](); // Join spectator team
    wait 0.5;
    
    // Force spectate target
    admin setSpectatedClient(target);
    admin iPrintLn("Now spectating: " + target.name);
}

Changed

Previous name: CoD4X Server (unofficial)New name: CoD4: UnleashedReasons for rename:
  • Avoid confusion with other projects
  • Establish unique identity
  • Better branding
  • Clear distinction from stock CoD4
Impact:
  • Binary names changed to cod4u_*
  • Documentation updated
  • URLs and references updated
  • No functional changes
Improved build system:
  • Better compiler flags
  • Updated documentation
  • Cleaner build scripts
  • Better Windows support
Old function: httpPostRequest() (deprecated)New function: httpPost() (recommended)
// OLD (still works but deprecated)
response = httpPostRequest(url, data);

// NEW (recommended)
response = httpPost(url, data);
Why deprecated:
  • Inconsistent naming
  • HTTP 1.1 support in new function
  • Better parameter handling
  • More features
While httpPostRequest() still works for backward compatibility, new code should use httpPost().

Version 1.0 - 2016-08-13

Initial release of CoD4 Unleashed Server.
First public release featuring:
  • Custom dedicated server improvements
  • Enhanced functionality over stock CoD4 server
  • Plugin API support
  • Extended scripting functions
  • Improved performance and stability
  • Linux and Windows support

Upgrade Guide

From 1.1.0 to 1.1.1

1

Download new version

Download version 1.1.1 binary or compile from source.
2

Replace binary

Replace cod4u_lnx or cod4u_win32.exe with new version.
3

Test JSON booleans

If you use JSON with boolean values, test that they parse correctly now.

From 1.0 to 1.1.0

1

Backup current server

Backup your entire server directory before upgrading.
2

Install new binary

Download and install version 1.1.0.
3

Update scripts

If you use httpPostRequest(), consider updating to httpPost() (optional, old function still works).
4

Add JSON module

Copy the unleashed\json module from the new bin/ directory if you want to use JSON features.
5

Test thoroughly

Test all your custom mods and plugins with the new version.

Unreleased

View unreleased changes on GitHub

Version 1.1.1

Download v1.1.1 release

Version 1.1.0

Download v1.1.0 release

Version 1.0

Download v1.0 release

Release Schedule

CoD4 Unleashed follows semantic versioning:
  • Major versions (x.0.0): Breaking changes, major features
  • Minor versions (1.x.0): New features, backward compatible
  • Patch versions (1.1.x): Bug fixes, no new features
To stay updated on new releases:
  • Watch the GitHub repository
  • Join the community forum
  • Check the releases page regularly

Build docs developers (and LLMs) love