Browse Source

Added ServerPrefix (Default: {SERVERPREFIX}) tag.

pull/3/head
JustinAJ 10 years ago
parent
commit
d29448fa79
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 4
      RenX.Core/RenX_Tags.cpp
  3. 2
      RenX.Core/RenX_Tags.h

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

4
RenX.Core/RenX_Tags.cpp

@ -75,6 +75,7 @@ TagsImp::TagsImp()
this->INTERNAL_SERVER_PORT_TAG = this->getUniqueInternalTag();
this->INTERNAL_SOCKET_HOSTNAME_TAG = this->getUniqueInternalTag();
this->INTERNAL_SOCKET_PORT_TAG = this->getUniqueInternalTag();
this->INTERNAL_SERVER_PREFIX_TAG = this->getUniqueInternalTag();
/** Player tags*/
this->INTERNAL_NAME_TAG = this->getUniqueInternalTag();
@ -171,6 +172,7 @@ TagsImp::TagsImp()
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}"));
this->serverPrefixTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("ServerPrefixTag"), STRING_LITERAL_AS_REFERENCE("{SERVERPREFIX}"));
/** Player tags */
this->nameTag = Jupiter::IRC::Client::Config->get(configSection, STRING_LITERAL_AS_REFERENCE("NameTag"), STRING_LITERAL_AS_REFERENCE("{NAME}"));
@ -267,6 +269,7 @@ void TagsImp::processTags(Jupiter::StringType &msg, const RenX::Server *server,
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()));
msg.replace(this->INTERNAL_SERVER_PREFIX_TAG, server->getPrefix());
if (player != nullptr)
{
msg.replace(this->INTERNAL_STEAM_TAG, server->formatSteamID(player));
@ -369,6 +372,7 @@ void TagsImp::sanitizeTags(Jupiter::StringType &fmt)
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);
fmt.replace(this->serverPrefixTag, this->INTERNAL_SERVER_PREFIX_TAG);
/** Player tags */
fmt.replace(this->nameTag, this->INTERNAL_NAME_TAG);

2
RenX.Core/RenX_Tags.h

@ -64,6 +64,7 @@ namespace RenX
Jupiter::StringS INTERNAL_SERVER_PORT_TAG;
Jupiter::StringS INTERNAL_SOCKET_HOSTNAME_TAG;
Jupiter::StringS INTERNAL_SOCKET_PORT_TAG;
Jupiter::StringS INTERNAL_SERVER_PREFIX_TAG;
/** Player tags */
Jupiter::StringS INTERNAL_NAME_TAG;
@ -160,6 +161,7 @@ namespace RenX
Jupiter::StringS serverPortTag;
Jupiter::StringS socketHostnameTag;
Jupiter::StringS socketPortTag;
Jupiter::StringS serverPrefixTag;
/** Player tags */
Jupiter::StringS nameTag;

Loading…
Cancel
Save