Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0c3e3ef
Moved changes to public repository.
SaiFi0102 Aug 21, 2015
0875192
Fixed typo in caio readme
SaiFi0102 Aug 21, 2015
8e6e4e3
Merge branch '3.3.5' of https://github.com/TrinityCore/TrinityCore.gi…
SaiFi0102 Aug 21, 2015
89acc9e
Update CAIO_README.md
SaiFi0102 Aug 21, 2015
c1c2709
-Using LuaVal for script key and handler key type
SaiFi0102 Aug 23, 2015
c0cd8c7
Readme typo
SaiFi0102 Aug 23, 2015
f39140a
Fixed a bug with AIOMsg::Add()
SaiFi0102 Aug 24, 2015
dea78cb
Merge TrinityCore/TrinityCore 3.3.5 into CAIO-3.3.5
Rochet2 May 31, 2026
85ce08d
CAIO: merge TC 3.3.5, enforce 255-byte AIO packets, and harden protoc…
Rochet2 May 31, 2026
b2a5f57
Fix GCC CI, AIO reassembly, and init/removeaddon bugs.
Rochet2 May 31, 2026
d02d6c1
Update smallfolk_cpp submodule to master (v2.0.1).
Rochet2 May 31, 2026
b460ede
Add AIO.MsgCacheTime and MsgCacheDelay for long-message reassembly.
Rochet2 Jun 1, 2026
c5cdb02
Enforce AIO block argument limit and drop unused init flag.
Rochet2 Jun 1, 2026
d49cbe4
Document stock AIO server parity and future AddOnInit work.
Rochet2 Jun 1, 2026
bfd1398
Style: normalize CAIO formatting to TrinityCore 3.3.5
Rochet2 Jun 1, 2026
824aa91
Style: strip trailing whitespace and tabs from CAIO tree
Rochet2 Jun 1, 2026
a297325
Style: align CAIO indentation with TrinityCore conventions
Rochet2 Jun 1, 2026
4230c2a
Style: restore multi-line AIO log message formatting
Rochet2 Jun 1, 2026
c2ca5ae
Fix GCC CI: LuaVal init block and sign-compare warnings.
Rochet2 Jun 1, 2026
b9f17b2
Fix GCC CI: more sign-compare and LuaVal index fixes.
Rochet2 Jun 1, 2026
99b759d
CAIO: hygiene, modern commands, refactor AIO whisper handling
Rochet2 Jun 1, 2026
1cf5a48
Fix GCC CI: FindByKey visibility, LuaVal casts, AIO scripts.
Rochet2 Jun 1, 2026
221db22
Fix GCC CI: public AIO dispatch, uint32 message ids, casts.
Rochet2 Jun 2, 2026
761186d
Fix AIOScript::HandleAddonBlock out-of-line definition for GCC.
Rochet2 Jun 2, 2026
850b1d6
Fix ScriptMgr constructor member initializer order for -Wreorder
Rochet2 Jun 2, 2026
3593022
Apply WITH_CAIO_EXAMPLES to all dynamic script modules for PCH reuse
Rochet2 Jun 2, 2026
1bba5c9
Skip lua_client_scripts install when the directory is absent
Rochet2 Jun 2, 2026
208acbd
Implement CAIO review follow-ups: split headers, AddOnInit, hardening.
Rochet2 Jun 4, 2026
65e091e
Harden CAIO: safe parsing, path checks, AIOScript split, tests.
Rochet2 Jun 4, 2026
4e14c2e
Fix GetProjectNameOfScriptModule to use its module argument.
Rochet2 Jun 6, 2026
614dc24
Fix AIOScript registration and unload for split translation unit.
Rochet2 Jun 6, 2026
997815c
Fix AIO compile errors: qualify MAX_BLOCK_ARGS and grant ScriptMgr fr…
Rochet2 Jun 6, 2026
eaf7251
Allow CreateAIOHandlers to construct private AIOHandlers.
Rochet2 Jun 6, 2026
7394d37
Propagate WITH_CAIO_EXAMPLES to all dynamic script PCH consumers.
Rochet2 Jun 6, 2026
6695242
Treat nil LuaVal from loads as AIO parse error.
Rochet2 Jun 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/gcc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Dependencies
run: |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-11
Expand All @@ -17,7 +19,7 @@ jobs:
run: |
mkdir bin
cd bin
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DWITH_CAIO_EXAMPLES=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
cd ..
- name: Build
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "dep/smallfolk_cpp/smallfolk_cpp"]
path = dep/smallfolk_cpp/smallfolk_cpp
url = https://github.com/Rochet2/smallfolk_cpp.git
674 changes: 674 additions & 0 deletions CAIO LICENSE.txt

Large diffs are not rendered by default.

185 changes: 185 additions & 0 deletions CAIO_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
## Introduction

CAIO is a server-client communication system for WoW AddOns. It is an extension of [AIO](https://github.com/Rochet2/AIO) to support C++ server side handling.
AIO is designed for sending lua addons and data between players and server.

Currently CAIO only supports TrinityCore 3.3.5 branch. [Compare and review](https://github.com/TrinityCore/TrinityCore/compare/3.3.5...SaiFi0102:CAIO-3.3.5).

## Supported AIO version

AIO version **1.75** — must match `AIO_VERSION` in your server and client `AIO.lua` files (for example `C:\Users\tqbat\Documents\Cores\stuff\AIO`).

## Install

+ Clone this repository/branch or merge with your own TrinityCore 3.3.5 branch
+ `git submodule update --init --recursive` (required for `dep/smallfolk_cpp/smallfolk_cpp` — [smallfolk_cpp](https://github.com/Rochet2/smallfolk_cpp); pin the submodule commit in production, e.g. `git -C dep/smallfolk_cpp/smallfolk_cpp checkout <sha>` after init)
+ Build/Install TrinityCore
+ [Install(Add) (C)AIO scripts](#api-reference) — see also `doc/CAIO_SCRIPT_EXAMPLE.md`
+ Run SQL files from `TrinityCore_Installation_Dir/sql/CAIO` (`Auth.sql` on auth DB, `World.sql` on world DB)
+ Copy `AIO_Client` from your AIO tree to `WoW_Installation_Dir/Interface/AddOns/AIO_Client` (use the same AIO repo/commit as the server expects)
+ Copy server-side client addon sources into `TrinityCore_Installation_Dir/lua_client_scripts` (one folder per addon, e.g. `lua_client_scripts/ExampleWindow/ExampleWindow.lua`)
+ Set `AIO.MsgMaxLen` to **255** in `worldserver.conf` (WoW addon whisper limit; matches client `AIO.lua` when `AIO_SERVER` is false)
+ Optional: build with `-DWITH_CAIO_EXAMPLES=ON` to include the `ExampleWindow` test script (ships `worldserver/lua_client_scripts/ExampleWindow/ExampleWindow.lua` for install)

## Build notes (TrinityCore 3.3.5 + CAIO)

+ OpenSSL **3.x** is detected by upstream `cmake/macros/FindOpenSSL.cmake` after the 3.3.5 merge (no manual `-D_OPENSSL_VERSION` needed in most cases).
+ Boost **1.86** with MSVC may still fail on very old 3.3.5 code paths; **Boost 1.81** is a safe choice if you hit `std::_snprintf` errors in Boost headers.
+ Example CMake configure:

```powershell
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DSCRIPTS=static -DTOOLS=0 `
-DOPENSSL_INCLUDE_DIR="C:/Program Files/OpenSSL-Win64/include" `
-DSSL_EAY_RELEASE="C:/Program Files/OpenSSL-Win64/lib/VC/x64/MD/libssl.lib" `
-DLIB_EAY_RELEASE="C:/Program Files/OpenSSL-Win64/lib/VC/x64/MD/libcrypto.lib" `
-DMYSQL_INCLUDE_DIR="C:/Program Files/MySQL/MySQL Server 8.0/include" `
-DMYSQL_LIBRARY="C:/Program Files/MySQL/MySQL Server 8.0/lib/libmysql.lib" `
-DBoost_DIR="C:/local/boost_1_81_0/lib64-msvc-14.3/cmake/Boost-1.81.0"
```

## Stock AIO server parity (C++ vs `AIO.lua` with `AIO_SERVER = true`)

+ **Transport:** `LANG_ADDON` whispers with `S`/`C` prefix are required on 3.3.5; the client receives them as `CHAT_MSG_ADDON` (same as stock Eluna server). Not a CAIO gap.
+ **Init hooks:** C++ `AddInitArgs` appends extra handler blocks to the init reply. `AddOnInit` on `AIOScript` mutates the full outgoing init table before send (stock `AIO.AddOnInit` parity).
+ **Pre-init gating:** Stock server does **not** queue pre-init blocks (`AIO_INITED` is client-only). CAIO matches that.
+ **Block arg limit:** Server rejects blocks with `n > 15` (same as stock server Lua).
+ **Message cache:** `AIO.MsgCacheTime` / `AIO.MsgCacheDelay` match `AIO_MSG_CACHE_TIME` / `AIO_MSG_CACHE_DELAY` in `AIO.lua`.

## Todo

+ Implement obfuscation (optional, deferred)
+ Implement compression (optional, deferred)
+ Add individual RBAC permissions per `.caio` subcommand (optional; all subcommands use `RBAC_PERM_COMMAND_CAIO` today)

## API reference

### Creating a CAIO script

```cpp
class ExampleCAIOScript : public AIOScript
{
public:
ExampleCAIOScript()
: AIOScript("ExampleScriptName")
{
using namespace std::placeholders;

// Loads addon files; path from AIO.ClientScriptPath in worldserver.conf
AddAddon("ExampleAddon", "example_addon.lua");
AddAddon("AnotherAddon", "example_addon.lua", 192);

AddHandler("Print", std::bind(&ExampleCAIOScript::HandlePrint, this, _1, _2));
AddInitArgs("ExampleScriptName", "Init", std::bind(&ExampleCAIOScript::InitArg, this, _1));
}

void HandlePrint(Player* sender, LuaVal const& args)
{
LuaVal inputVal = args.get(4);
if (!inputVal.isstring())
return;
}

private:
std::string storedString;
};
```

### smallfolk_cpp LuaVal reference

https://github.com/Rochet2/smallfolk_cpp (v2.x on `master` — linked as CMake target `smallfolk_cpp::smallfolk`, include `smallfolk.h`)

Use `LuaVal::nil` (not `LuaVal::nil()`) for default optional arguments. Type tag accessor is `typetag()`.

### CAIO reference and functions

**AIOScript.h** (included from `ScriptMgr.h`)

```cpp
class AIOScript : public ScriptObject
{
protected:
AIOScript(LuaVal const& scriptKey);
void AddHandler(LuaVal const& handlerKey, HandlerFunc function);
void AddInitArgs(LuaVal const& scriptKey, LuaVal const& handlerKey, ...);
void AddOnInit(InitMessageFunc func); // mutates full init reply (AIO.AddOnInit parity)
bool AddAddon(std::string const& addonName, std::string const& addonFile, uint32 permission = AIO_DEFAULT_ADDON_PERMISSION);
};
```

**AIOMsg.h**

```cpp
class AIOMsg
{
public:
AIOMsg();
AIOMsg(LuaVal const& scriptKey, LuaVal const& handlerKey,
LuaVal const& a1 = LuaVal::nil, LuaVal const& a2 = LuaVal::nil, LuaVal const& a3 = LuaVal::nil,
LuaVal const& a4 = LuaVal::nil, LuaVal const& a5 = LuaVal::nil, LuaVal const& a6 = LuaVal::nil);
AIOMsg& Add(LuaVal const& scriptKey, LuaVal const& handlerKey,
LuaVal const& a1 = LuaVal::nil, LuaVal const& a2 = LuaVal::nil, LuaVal const& a3 = LuaVal::nil,
LuaVal const& a4 = LuaVal::nil, LuaVal const& a5 = LuaVal::nil, LuaVal const& a6 = LuaVal::nil);
AIOMsg& AppendLast(LuaVal const& a1 = LuaVal::nil, LuaVal const& a2 = LuaVal::nil, LuaVal const& a3 = LuaVal::nil,
LuaVal const& a4 = LuaVal::nil, LuaVal const& a5 = LuaVal::nil, LuaVal const& a6 = LuaVal::nil);
std::string dumps() const;
};
```

**Player.h** / **PlayerAIO.h**

```cpp
// Player.h — no LuaVal in the public player API
void Player::SendSimpleAIOMessage(std::string const& message);
void Player::ForceReloadAddons();
void Player::ForceResetAddons();

// PlayerAIO.h — use from CAIO scripts
namespace Trinity::AIO {
void Message(Player* player, AIOMsg& msg);
void Handle(Player* player, LuaVal const& scriptKey, LuaVal const& handlerKey, ...);
void Handle(Player* player, char const* scriptKey, char const* handlerKey, ...);
}
```

**World.h**

```cpp
struct AIOAddon { /* name, file, permission */ };

std::string GetAIOPrefix() const;
std::string GetAIOClientScriptPath() const;
void ForceReloadPlayerAddons(uint32 permission = AIO_DEFAULT_ADDON_PERMISSION);
void ForceResetPlayerAddons(uint32 permission = AIO_DEFAULT_ADDON_PERMISSION);
void AIOMessageAll(AIOMsg& msg, uint32 permission = AIO_DEFAULT_ADDON_PERMISSION);
void SendAllSimpleAIOMessage(std::string const& message, uint32 permission = AIO_DEFAULT_ADDON_PERMISSION);
bool ReloadAddons();
bool AddAddon(AIOAddon const& addon);
bool RemoveAddon(std::string const& addonName, uint32* permission = nullptr);
```

## CAIO game commands

+ .caio version
+ .caio addaddon $addonName [$permission] "$addonFile"
+ .caio removeaddon $addonName
+ .caio reloadaddons
+ .caio forcereload $playerName
+ .caio forcereset $playerName
+ .caio forcereloadall [$permission]
+ .caio forceresetall [$permission]
+ .caio send $playerName "Message"
+ .caio sendall [$permission] "Message"

Note: By default every player has permission 195. Permission 195 will be used if not specified.

## Reporting issues and submitting fixes

Issues can be reported via the [Github issue tracker](https://github.com/SaiFi0102/TrinityCore/issues). Fixes can be submitted as pull requests on the Github repository.

## Authors, Contributors &amp; Thanks

+ Saif
+ CAIO
+ Rochet2
+ [AIO](https://github.com/Rochet2/AIO)
+ [smallfolk_cpp](https://github.com/Rochet2/smallfolk_cpp) to handle and transmit Lua data in C++
2 changes: 1 addition & 1 deletion cmake/macros/ConfigureScripts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endfunction()

# Stores the project name of the given module in the variable
function(GetProjectNameOfScriptModule module variable)
string(TOLOWER "scripts_${SCRIPT_MODULE}" GENERATED_NAME)
string(TOLOWER "scripts_${module}" GENERATED_NAME)
set(${variable} "${GENERATED_NAME}" PARENT_SCOPE)
endfunction()

Expand Down
1 change: 1 addition & 0 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ foreach(SCRIPT_MODULE ${SCRIPT_MODULE_LIST})
set_property(CACHE ${SCRIPT_MODULE_VARIABLE} PROPERTY STRINGS default disabled static dynamic)
endforeach()

option(WITH_CAIO_EXAMPLES "Build optional CAIO ExampleWindow test script" 0)
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 1)
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
Expand Down
6 changes: 6 additions & 0 deletions cmake/showoptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ else()
message("* Build with scripts : No")
endif()

if(WITH_CAIO_EXAMPLES)
message("* CAIO ExampleWindow : Yes")
else()
message("* CAIO ExampleWindow : No (default)")
endif()

if(TOOLS)
message("* Build map/vmap tools : Yes (default)")
else()
Expand Down
5 changes: 5 additions & 0 deletions dep/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ if(SERVERS)
add_subdirectory(mysql)
add_subdirectory(readline)
add_subdirectory(gsoap)
set(SMALLFOLK_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(SMALLFOLK_BUILD_BENCHMARK OFF CACHE BOOL "" FORCE)
set(SMALLFOLK_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(SMALLFOLK_ENABLE_CLANG_TIDY OFF CACHE BOOL "" FORCE)
add_subdirectory(smallfolk_cpp/smallfolk_cpp)
endif()

if(SERVERS AND BUILD_EFSW)
Expand Down
1 change: 1 addition & 0 deletions dep/smallfolk_cpp/smallfolk_cpp
Submodule smallfolk_cpp added at 750580
37 changes: 37 additions & 0 deletions doc/CAIO_MESSAGE_FORMAT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# CAIO / AIO message format

This matches [Rochet2 AIO](https://github.com/Rochet2/AIO) block layout as used by CAIO and `smallfolk_cpp`.

## Serialized message

One whisper addon payload is a **smallfolk** dump of an array of blocks:

```lua
{
{ n, scriptKey, handlerKey, arg1, arg2, ... },
{ n, scriptKey2, handlerKey2, ... },
}
```

- `n` — number of arguments **including** `handlerKey` (CAIO sets `block[1]` accordingly). Server rejects `n > 15` (stock `AIO_SERVER` limit).
- `scriptKey` — block name (`AIO`, `AIOExample`, …); must be registered with `AIO.RegisterEvent` on the client or `AIOScript` on the server.
- Arguments from index 4 onward are handler parameters (`unpack(data, 3, n+2)` on the Lua side).

Use `AIOMsg` / `AIO.Msg():Add(...)` rather than building tables manually.

## Wire encoding (3.3.5)

On TrinityCore, AIO uses **`CHAT_MSG_WHISPER` with `LANG_ADDON`** (not a separate addon channel packet). The client still sees **`CHAT_MSG_ADDON`**; this matches stock `AIO.lua` server behaviour.

- Prefix: `S` + `AIO.Prefix` + `\t` (server→client) or `C` + prefix + `\t` (client→server).
- Short message: two bytes `\1\1` then the smallfolk string.
- Long message: 2-byte message id + 2-byte part count + 2-byte part id + chunk.
- Each whisper packet must fit in **255 bytes** total (WoW addon limit). Configure `AIO.MsgMaxLen` (default **255**). Long payloads split using `chunkLen = MsgMaxLen - headerBytes` where `headerBytes = 1 + len(prefix) + 1 + 6`.

## Version handshake

On init, client sends `AIO` / `Init` with protocol version **1.75**. Server defines `AIO_VERSION` / `AIO_VERSION_STRING` in `src/server/game/AIO/AIO.h`.

## Compression / obfuscation

Not implemented on this branch. Addon files are sent with an `U` (uncompressed) prefix only.
75 changes: 75 additions & 0 deletions doc/CAIO_SCRIPT_EXAMPLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# CAIO script example

Inherit `AIOScript` to register server-side AIO handlers. See [smallfolk_cpp](https://github.com/Rochet2/smallfolk_cpp) for `LuaVal` usage.

```cpp
class ExampleAIOScript : public AIOScript
{
public:
ExampleAIOScript()
: AIOScript("ExampleScriptName")
{
using namespace std::placeholders;

// Loads addon files; path from AIO.ClientScriptPath in worldserver.conf
AddAddon("ExampleAddon", "example_addon.lua");

// Optional permission-gated addon (RBAC id)
AddAddon("AnotherAddon", "example_addon.lua", 192);

AddHandler("Print", std::bind(&ExampleAIOScript::HandlePrint, this, _1, _2));
AddHandler("Save", std::bind(&ExampleAIOScript::HandleSave, this, _1, _2));

AddInitArgs("ExampleScriptName", "Init", std::bind(&ExampleAIOScript::InitArg, this, _1), std::bind(&ExampleAIOScript::InitArg, this, _1));
AddInitArgs("ExampleScriptName", "Init", std::bind(&ExampleAIOScript::InitArg2, this, _1));
AddInitArgs("AnotherScript", "InitB");
}

void HandlePrint(Player* sender, LuaVal const& args)
{
LuaVal inputVal = args.get(4);
LuaVal sliderVal = args.get(5);

if (!inputVal.isstring() || !sliderVal.isnumber())
return;

sender->GetSession()->SendNotification("HandlePrint -> Stored String: %s, Input: %s, Slider Value: %f",
storedString.c_str(), inputVal.str().c_str(), sliderVal.num());
}

void HandleSave(Player* sender, LuaVal const& args)
{
LuaVal saveVal = args.get(4);

if (!saveVal.isstring())
return;

storedString = saveVal.str();
sender->GetSession()->SendNotification("Saved");
}

LuaVal InitArg(Player* /*sender*/)
{
LuaVal arg(TTABLE);
arg.set("key", 12.3);
arg["key2"] = false;
return arg;
}

LuaVal InitArg2(Player* /*sender*/)
{
return LuaVal("LuaVal will implicitly create a string LuaVal for this arg");
}

private:
std::string storedString;
};
```

Register the script in a loader (see `src/server/scripts/AIO/aio_script_loader.cpp` and `WITH_CAIO_EXAMPLES`).

To send messages to the client from C++, use `Trinity::AIO::Handle` / `Trinity::AIO::Message` from `PlayerAIO.h` (keeps `Player.h` free of `LuaVal`).

For full init-message rewriting (stock `AIO.AddOnInit`), call `AddOnInit` with a callback that receives `(Player*, LuaVal& initMessage)` after the init blocks are assembled and before send.

Handler `args` is always a table; handler parameters start at index **4**. Always check value types before use.
2 changes: 2 additions & 0 deletions sql/CAIO/Auth.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REPLACE INTO `rbac_permissions` (`id`, `name`) VALUES (5000, 'Command: caio');
REPLACE INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES (192, 5000);
24 changes: 24 additions & 0 deletions sql/CAIO/World.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- CAIO command result strings
REPLACE INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`)
VALUES (60002, 'Force reload message sent to %s', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`)
VALUES (60003, 'Force reset message sent to %s', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`)
VALUES (60004, 'There was a problem reloading client addons. Force reload was not sent.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`)
VALUES (60005, 'Addon with name \'%s\' already exists or file not found.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`)
VALUES (60006, 'Addon with name \'%s\' not found.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

-- CAIO commands
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio', 5000, 'Syntax: .caio $subcommand\nType .caio to see the list of possible subcommands or .help caio $subcommand to see info on subcommands');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio version', 5000, 'Syntax: .caio version\nShows the AIO version');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio addaddon', 5000, 'Syntax: .caio addaddon $addonName [$permission] "$addonFile"\nAdds an addon to addon list for players with $permission and force reloads all affected player addons');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio removeaddon', 5000, 'Syntax: .caio removeaddon $addonName\nRemoves an addon from addon list and force reloads all affected player addons');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio reloadaddons', 5000, 'Syntax: .caio reloadaddons\nReloads all client addons loaded on the server and forces reload on all players.');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio forcereload', 5000, 'Syntax: .caio forcereload $playerName\nForce reloads player\'s addons. Player addons are synced with server.');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio forcereset', 5000, 'Syntax: .caio forcereset $playerName\nForce resets player\'s addons. Player addons are deleted and downloaded again.');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio forcereloadall', 5000, 'Syntax: .caio forcereloadall [$permission]\nForce reloads players of $permission and above. Affected players\' addons are synced with the server.');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio forceresetall', 5000, 'Syntax: .caio forceresetall [$permission]\nForce resets players of $permission and above. Affected players\' addons are deleted and downloaded again.');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio send', 5000, 'Syntax: .caio send $playerName "Message"\nSends an addon message to player');
REPLACE INTO `command` (`name`, `permission`, `help`) VALUES ('caio sendall', 5000, 'Syntax: .caio sendall [$permission] "Message"\nSends an addon message to all players of $permission and above');
Loading
Loading