feat(protocols): extend functionality of protocol macro

This commit is contained in:
DJMrTV 2025-02-01 19:42:45 +01:00
commit 1679590bf3
6 changed files with 38 additions and 12 deletions

View file

@ -5,11 +5,10 @@ use crate::rmc::response::{ErrorCode, RMCResponse, RMCResponseResult};
use crate::rmc::structures::{string, any, RmcSerialize};
use crate::rmc::structures::any::Any;
pub fn login_ex(name: &str) -> RMCResponseResult{
pub fn login_ex(rmcmessage: &RMCMessage, name: &str) -> RMCResponseResult{
// todo: figure out how the AuthenticationInfo struct works, parse it and validate login info
//return rmcmessage.error_result_with_code(ErrorCode::Core_InvalidArgument);
unreachable!()
return rmcmessage.error_result_with_code(ErrorCode::Core_InvalidArgument);
}
pub fn login_ex_raw_params(rmcmessage: &RMCMessage) -> RMCResponseResult{
@ -35,6 +34,5 @@ pub fn login_ex_raw_params(rmcmessage: &RMCMessage) -> RMCResponseResult{
}
}
//login_ex(&str)
rmcmessage.error_result_with_code(ErrorCode::Authentication_UnderMaintenance)
login_ex(rmcmessage, &str)
}