|
|
@ -71,6 +71,10 @@ TagsImp::TagsImp() |
|
|
|
this->INTERNAL_USER_TAG = this->getUniqueInternalTag(); |
|
|
|
this->INTERNAL_SERVER_NAME_TAG = this->getUniqueInternalTag(); |
|
|
|
this->INTERNAL_MAP_TAG = this->getUniqueInternalTag(); |
|
|
|
this->INTERNAL_SERVER_HOSTNAME_TAG = this->getUniqueInternalTag(); |
|
|
|
this->INTERNAL_SERVER_PORT_TAG = this->getUniqueInternalTag(); |
|
|
|
this->INTERNAL_SOCKET_HOSTNAME_TAG = this->getUniqueInternalTag(); |
|
|
|
this->INTERNAL_SOCKET_PORT_TAG = this->getUniqueInternalTag(); |
|
|
|
|
|
|
|
/** Player tags*/ |
|
|
|
this->INTERNAL_NAME_TAG = this->getUniqueInternalTag(); |
|
|
@ -163,6 +167,10 @@ TagsImp::TagsImp() |
|
|
|
this->userTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("UserTag"), STRING_LITERAL_AS_REFERENCE("{USER}")); |
|
|
|
this->serverNameTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("ServerNameTag"), STRING_LITERAL_AS_REFERENCE("{SERVERNAME}")); |
|
|
|
this->mapTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("MapTag"), STRING_LITERAL_AS_REFERENCE("{MAP}")); |
|
|
|
this->serverHostnameTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("ServerHostnameTag"), STRING_LITERAL_AS_REFERENCE("{SERVERHOST}")); |
|
|
|
this->serverPortTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("ServerPortTag"), STRING_LITERAL_AS_REFERENCE("{SERVERPORT}")); |
|
|
|
this->socketHostnameTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("SocketHostnameTag"), STRING_LITERAL_AS_REFERENCE("{SOCKHOST}")); |
|
|
|
this->socketPortTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("SocketPortTag"), STRING_LITERAL_AS_REFERENCE("{SOCKPORT}")); |
|
|
|
|
|
|
|
/** Player tags */ |
|
|
|
this->nameTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("NameTag"), STRING_LITERAL_AS_REFERENCE("{NAME}")); |
|
|
@ -255,6 +263,10 @@ void TagsImp::processTags(Jupiter::StringType &msg, const RenX::Server *server, |
|
|
|
msg.replace(this->INTERNAL_USER_TAG, server->getUser()); |
|
|
|
msg.replace(this->INTERNAL_SERVER_NAME_TAG, server->getName()); |
|
|
|
msg.replace(this->INTERNAL_MAP_TAG, server->getMap()); |
|
|
|
msg.replace(this->INTERNAL_SERVER_HOSTNAME_TAG, server->getHostname()); |
|
|
|
msg.replace(this->INTERNAL_SERVER_PORT_TAG, Jupiter::StringS::Format("%u", server->getPort())); |
|
|
|
msg.replace(this->INTERNAL_SOCKET_HOSTNAME_TAG, server->getSocketHostname()); |
|
|
|
msg.replace(this->INTERNAL_SOCKET_PORT_TAG, Jupiter::StringS::Format("%u", server->getSocketPort())); |
|
|
|
if (player != nullptr) |
|
|
|
{ |
|
|
|
msg.replace(this->INTERNAL_STEAM_TAG, server->formatSteamID(player)); |
|
|
@ -353,6 +365,10 @@ void TagsImp::sanitizeTags(Jupiter::StringType &fmt) |
|
|
|
fmt.replace(this->userTag, this->INTERNAL_USER_TAG); |
|
|
|
fmt.replace(this->serverNameTag, this->INTERNAL_SERVER_NAME_TAG); |
|
|
|
fmt.replace(this->mapTag, this->INTERNAL_MAP_TAG); |
|
|
|
fmt.replace(this->serverHostnameTag, this->INTERNAL_SERVER_HOSTNAME_TAG); |
|
|
|
fmt.replace(this->serverPortTag, this->INTERNAL_SERVER_PORT_TAG); |
|
|
|
fmt.replace(this->socketHostnameTag, this->INTERNAL_SOCKET_HOSTNAME_TAG); |
|
|
|
fmt.replace(this->socketPortTag, this->INTERNAL_SOCKET_PORT_TAG); |
|
|
|
|
|
|
|
/** Player tags */ |
|
|
|
fmt.replace(this->nameTag, this->INTERNAL_NAME_TAG); |
|
|
|