diff --git a/src/lib.rs b/src/lib.rs index d4f29ad..ba792f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,6 +38,7 @@ pub fn init() -> Extension { ) .command("local_ip", util::get_local_address) .command("uuid", util::get_uuid) + .command("callback", util::test_callback) .command("log", util::log_info) .group( "cot_router", diff --git a/src/util.rs b/src/util.rs index 2f0e843..07b19d4 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,3 +1,4 @@ +use arma_rs::Context; use log::{error, info, warn}; use std::net::{IpAddr, UdpSocket}; use crate::structs::LogPayload; @@ -43,3 +44,9 @@ pub fn get_local_address() -> String { }, } } + +pub fn test_callback(ctx: Context) -> &'static str { + let _ = ctx.callback_data("armatak_test_callback", "123", "321"); + + "Testing Callback" +}