mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
added initial callback handling
This commit is contained in:
@@ -38,6 +38,7 @@ pub fn init() -> Extension {
|
|||||||
)
|
)
|
||||||
.command("local_ip", util::get_local_address)
|
.command("local_ip", util::get_local_address)
|
||||||
.command("uuid", util::get_uuid)
|
.command("uuid", util::get_uuid)
|
||||||
|
.command("callback", util::test_callback)
|
||||||
.command("log", util::log_info)
|
.command("log", util::log_info)
|
||||||
.group(
|
.group(
|
||||||
"cot_router",
|
"cot_router",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
use arma_rs::Context;
|
||||||
use log::{error, info, warn};
|
use log::{error, info, warn};
|
||||||
use std::net::{IpAddr, UdpSocket};
|
use std::net::{IpAddr, UdpSocket};
|
||||||
use crate::structs::LogPayload;
|
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"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user