diff --git a/Bot/Main.cpp b/Bot/Main.cpp index 465f246..49f25a6 100644 --- a/Bot/Main.cpp +++ b/Bot/Main.cpp @@ -105,7 +105,9 @@ int main(int argc, const char **args) else if ("-config"_jrs.equalsi(args[i]) && ++i < argc) configFileName = args[i]; else if ("-pluginsdir"_jrs.equalsi(args[i]) && ++i < argc) - Jupiter::setPluginDirectory(Jupiter::ReferenceString(args[i])); + Jupiter::Plugin::setDirectory(Jupiter::ReferenceString(args[i])); + else if ("-configsdir"_jrs.equals(args[i]) && ++i < argc) + Jupiter::Plugin::setConfigDirectory(Jupiter::ReferenceString(args[i])); else if ("-configFormat"_jrs.equalsi(args[i]) && ++i < argc) puts("Feature not yet supported!"); else @@ -120,13 +122,21 @@ int main(int argc, const char **args) } fputs("Config loaded. ", stdout); + const Jupiter::ReadableString &pDir = Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("Config"), STRING_LITERAL_AS_REFERENCE("PluginsDirectory")); if (pDir.isNotEmpty()) { - Jupiter::setPluginDirectory(pDir); + Jupiter::Plugin::setDirectory(pDir); printf("Plugins will be loaded from \"%.*s\"." ENDL, pDir.size(), pDir.ptr()); } + const Jupiter::ReadableString &cDir = Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("Config"), STRING_LITERAL_AS_REFERENCE("PluginConfigsDirectory")); + if (cDir.isNotEmpty()) + { + Jupiter::Plugin::setDirectory(cDir); + printf("Plugin configs will be loaded from \"%.*s\"." ENDL, cDir.size(), cDir.ptr()); + } + puts("Loading plugins..."); const Jupiter::ReadableString &pluginList = Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("Config"), STRING_LITERAL_AS_REFERENCE("Plugins")); if (pluginList.isEmpty()) @@ -138,7 +148,7 @@ int main(int argc, const char **args) for (unsigned int i = 0; i < nPlugins; i++) { Jupiter::ReferenceString plugin = Jupiter::ReferenceString::getWord(pluginList, i, WHITESPACE); - if (Jupiter::loadPlugin(plugin) == nullptr) fprintf(stderr, "WARNING: Failed to load plugin \"%.*s\"!" ENDL, plugin.size(), plugin.ptr()); + if (Jupiter::Plugin::load(plugin) == nullptr) fprintf(stderr, "WARNING: Failed to load plugin \"%.*s\"!" ENDL, plugin.size(), plugin.ptr()); else printf("\"%.*s\" loaded successfully." ENDL, plugin.size(), plugin.ptr()); } } @@ -167,7 +177,7 @@ int main(int argc, const char **args) index = 0; while (index < Jupiter::plugins->size()) if (Jupiter::plugins->get(index)->shouldRemove() || Jupiter::plugins->get(index)->think() != 0) - Jupiter::freePlugin(index); + Jupiter::Plugin::free(index); else ++index; Jupiter_checkTimers(); diff --git a/ChannelRelay/ChannelRelay.cpp b/ChannelRelay/ChannelRelay.cpp index 3721634..dda4f09 100644 --- a/ChannelRelay/ChannelRelay.cpp +++ b/ChannelRelay/ChannelRelay.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -25,23 +25,23 @@ using namespace Jupiter::literals; -int ChannelRelayPlugin::init() +bool ChannelRelayPlugin::initialize() { - Jupiter::ReferenceString str = Jupiter::IRC::Client::Config->get(this->getName(), "Types"_jrs); + Jupiter::ReferenceString str = this->config.get(Jupiter::ReferenceString::empty, "Types"_jrs); unsigned int words = str.wordCount(WHITESPACE); if (words == 0) - return 1; + return false; while (words != 0) ChannelRelayPlugin::types.concat(str.getWord(--words, WHITESPACE).asInt()); - return 0; + return true; } int ChannelRelayPlugin::OnRehash() { ChannelRelayPlugin::types.erase(); - return ChannelRelayPlugin::init(); + return this->initialize() ? 0 : -1; } void ChannelRelayPlugin::OnChat(Jupiter::IRC::Client *server, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &message) @@ -86,11 +86,6 @@ void ChannelRelayPlugin::OnChat(Jupiter::IRC::Client *server, const Jupiter::Rea // Plugin instantiation and entry point. ChannelRelayPlugin pluginInstance; -extern "C" __declspec(dllexport) bool load() -{ - return pluginInstance.init() == 0; -} - extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin() { return &pluginInstance; diff --git a/ChannelRelay/ChannelRelay.h b/ChannelRelay/ChannelRelay.h index a662c11..b5e6faa 100644 --- a/ChannelRelay/ChannelRelay.h +++ b/ChannelRelay/ChannelRelay.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -26,13 +26,11 @@ class ChannelRelayPlugin : public Jupiter::Plugin { public: // Jupiter::Plugin void OnChat(Jupiter::IRC::Client *server, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &message) override; - const Jupiter::ReadableString &getName() override { return name; } int OnRehash() override; - int init(); + virtual bool initialize() override; private: Jupiter::String_Strict types; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "ChannelRelay"); }; #endif // _CHANNELRELAY_H_HEADER \ No newline at end of file diff --git a/Config.ini b/Config.ini index c5d495b..72980ab 100644 --- a/Config.ini +++ b/Config.ini @@ -1,674 +1,148 @@ -; Example Configuration File -; The configuration file should be named: Config.ini -; Eventually, the configuration file format itself will be an option. -; -; Definitions: -; A String is a series of characters (Text) -; An Integer is a whole number. -; A Bool is either true or false. -; A Float is a decimal number. -; -; [Config] -; This block is used to define settings that are global in nature. -; Currently, there is a "Servers" option to specify what sections -; to look at for server configuration options, and a "Plugins" -; option that specifies which plugins to load from the Plugins -; folder. -; DO NOT INCLUDE A PLUGIN'S FILE EXTENSION (.dll or .so). -; -; Required Settings: -; Servers=String (Format: Server1 Server2) -; -; Optional Settings: -; Plugins=String (Format: Plugin1 Plugin2) -; PluginsDirectory=String (Default: Plugins\) -; - -[Config] -Servers=CnCIRC -Plugins=CoreCommands PluginManager ExtraCommands RenX.Core RenX.Commands RenX.Logging RenX.Medals RenX.SetJoin - -; [Default] -; -; This block is referenced only when a setting is not -; specified in a server's block. If a value is located -; neither in the server's block nor this one, then a -; crash or other unexpected behavior may occur. It is -; therefore recommended to have some sort of default -; value for all possible settings. -; -; Channel Configuring: -; Channels are given "types", which can determine various things such -; as auto-parting. A Channel of type -1 will automatically part itself. -; Channels can be configured in two ways: Active and Passive. -; Active channels are joined automatically. Passive channels are not, -; but can still be configured. -; -; Active Channels: -; Channel.Integer=String (Format: #Example [Password]) -; Channel.Integer.Type=Integer (-1 is auto-part) -; -; Passive Channels: -; Channel.String.Type=Integer -; -; Client address and port: -; The client address and port settings are entirely optional. These are -; only used under very special circumstances, and should otherwise -; not be specified. Unless you have a valid reason to need to bind the -; client to a specific address/port (such as connection limiations on a -; per-IP basis), do not set these. -; -; Settings: -; Hostname=String ("irc.cncirc.net" if unspecified) -; Port=Positive Integer (194 or 994 if unspecified) -; SSL=Bool -; STARTTLS=Bool (True if unspecified) -; Certificate=String (No SSL certificate used if unspecified) -; Key=String (Certificate file used if unspecified) -; SASL.Password=String (SASL disabled if unspecified) -; SASL.Account=String (Nickname if unspecified) -; Nick=String ("Jupiter" if unspecified) -; AltNick=String -; RealName=String ("Jupiter IRC Client" if unspecified) -; Channel.Type=Integer -; RawData.Integer=String (Example: OPER UserName Password) -; LogFile=String -; AutoJoinOnKick=Bool -; AutoPartMessage=String -; AutoReconnectDelay=Integer (Measured in seconds) -; MaxReconnectAttempts=Integer -; PrintOutput=Bool -; Prefix=String -; ClientAddress=String (Unused if unspecified) -; ClientPort=Integer (Unused if above is unspecified; defaults to 0) -; - -[Default] -Port=6667 -Nick=Jupiter -AltNick=Jupiter` -RealName=Jupiter IRC Framework by Agent -AutoPartMessage=Auto-Parting Enabled -AutoReconnect=1 -MaxReconnectAttempts=3 -AutoReconnectDelay=5 -PrintOutput=1 -Channel.Type=-1 -Prefix=! - -; [(ServerName)] -; -; Anything which can be set within the Default block can -; also be applied here. Values here supercede any value -; which is set within the Default block. -; - -[CnCIRC] -; CnCIRC includes the Renegade X IRC server. :) -Hostname=irc.cncirc.net -Nick=RenXBot -AltNick=RXBot` -Channel.1=#RenX-IRC -Channel.1.Type=1 -Channel.2=#RenX-IRC.Admin -Channel.2.Type=2 -SASL.Password=your_NickServ_Password -LogFile=CnCIRC.txt - -[CT] -Hostname=irc.ConstructiveTyranny.com -Nick=RenXBot -Channel.1=#RenX-IRC -Channel.1.Type=1 -RawData.1=PRIVMSG NickServ :IDENTIFY your_NickServ_Password -LogFile=CT.txt - -[EKT] -Hostname=irc.EliteKamikazeTeam.com -Nick=RenXBot -Channel.1=#RenX-IRC -Channel.1.Type=1 -RawData.1=PRIVMSG NickServ :IDENTIFY your_NickServ_Password -LogFile=EKT.txt - -[St0rm] -Hostname=irc.st0rm.net -Nick=RenXBot -AltNick=RXBot` -Channel.1=#RenX-IRC -Channel.1.Type=1 -RawData.1=PRIVMSG NickServ :IDENTIFY your_NickServ_Password -LogFile=St0rm.txt - -; [DefaultCommands] -; You can modify the access requirements for any command here. -; Values set here will be set across all servers that do not have -; server-specific values set. -; -; To disable a command, set its access requirement to -1. -; -; Syntax: CommandTrigger=AccessLevel -; - -[DefaultCommands] -msg=1 - -; [(ServerName)Commands] -; You can modify the access requirements for any command here, on a -; per-server basis. Values specified here supercede those which are set -; in the DefaultCommands block. -; - -[CnCIRCCommands] -msg=0 - -; *************************************** -; Module Configurations -; *************************************** - -; [RenX] -; -; Define servers for the RenX module to connect to here. -; The "Servers" setting here operates similarly to the "Servers" setting -; in the [Config] section. Specify a space-deliminated list here to point -; to configuration sections for each individual Renegade-X server. -; -; Settings: -; Servers=String (Format: Server1 Server2) -; TranslationsFile=String (Default: Translations.ini) -; CommandsFile=String (Default: RenXGameCommands.ini) -; TagDefinitions=String (Default: RenX.Tags) -; - -[RenX] -Servers=RenX-Server1 RenX-Server2 -; !!!!! READ THIS !!!!! -; MAKE SURE TO SCROLL DOWN AND CHECK OUT THE SETTINGS -; FOR THE ANTI-CHEAT. THE SETTINGS FOR THE ANTI-CHEAT -; ARE UNDER [RenX.ExcessiveHeadshots]. -; !!!!! READ THIS !!!!!! - -; Here is where you define each individual Renegade-X server! -; Server types are tied to channel types, such that servers will -; report only to a specific channel type, and commands executed -; in a channel will only affect servers with the same type as that -; channel. If left unspecified the type will be 0, which is the same -; as the default channel type. -; -; AdminChanType defines the type for administrator channels. -; This channel will include more verbose output, such as player IP -; addresses, Steam IDs, and events unaccounted for. -; -; Settings: -; Hostname=String (Default: Localhost) -; Port=Integer (Default: 7777) -; ClientAddress=String (Unused if unspecified) -; Password=String (Default: renx) -; ChanType=Integer (Default: 0) -; AdminChanType=Integer (Default: 0) -; CommandPrefix=String (Empty if unspecified) -; IRCPrefix=String (Unused if unspecified) -; Rules=String (Default: Anarchy!) -; ReconnectDelay=Integer (Default: 60; seconds between reconnect attempts) -; MaxReconnectAttempts=Integer (Default: -1; A negative value means no limit) -; UUIDMode=Integer (Default: 0; Steam=0, Nickname=1) -; RCONBan=Bool (Default: true) -; LocalIPBan=Bool (Default: true) -; LocalSteamBan=Bool (Default: true) -; LocalNameBan=Bool (Default: false) -; SteamFormat=Integer (Default: 16; Hex=16, Integer=10, Octal=8) -; NeverSay=Bool (Forces the bot to PM players instead of using "say"; Default: false) -; - -[RenX-Server1] -Hostname=Localhost -Port=7777 -Password=renx -ChanType=1 -AdminChanType=2 -CommandPrefix=! -Rules=Hacking, cheating, or exploitation of any form is strictly prohibited. Please respect all players. - -[RenX-Server2] -Hostname=Localhost -Port=7778 -Password=renx -ChanType=3 -AdminChanType=2 -CommandPrefix=! -IRCPrefix=07[Marathon] - -; [RenX.Tags] -; -; ***** Global Tags ***** -; DateTag=String (Default: {DATE}) -; TimeTag=String (Default: {TIME}) -; -; ***** Server Tags ***** -; RCONVersionTag=String (Default: {RVER}) -; GameVersionTag=String (Default: {GVER}) -; XRCONVersionTag=String (Default: {XVER}) -; RulesTag=String (Default: {RULES}) -; -; ***** Player Tags ****** -; NameTag=String (Default: {NAME}) -; RawNameTag=String (Default: {RNAME}) -; IPTag=String (Default: {IP}) -; SteamTag=String (Default: {STEAM}) -; UUIDTag=String (Default: {UUID}) -; IDTag=String (Default: {ID}) -; AdminTag=String (Default: {ADMIN}) -; TeamColorTag=String (Default: {TCOLOR}) -; ShortTeamTag=String (Default: {TEAMS}) -; LongTeamTag=String (Default: {TEAML}) -; PingTag=String (Default: {PING}) -; ScoreTag=String (Default: {SCORE}) -; CreditsTag=String (Default: {CREDITS}) -; KillsTag=String (Default: {KILLS}) -; DeathsTag=String (Default: {DEATHS}) -; KDRTag=String (Default: {KDR}) -; SuicidesTag=String (Default: {SUICIDES}) -; HeadshotsTag=String (Default: {HEADSHOTS}) -; VehicleKillsTag=String (Default: {VEHICLEKILLS}) -; BuildingKillsTag=String (Default: {BUILDINGKILLS}) -; DefenceKillsTag=String (Default: {DEFENCEKILLS}) -; WinsTag=String (Default: {WINS}) -; LosesTag=String (Default: {LOSES}) -; BeaconPlacementsTag=String (Default: {BEACONPLACEMENTS}) -; AccessTag=String (Default: {ACCESS}) -; -; ***** Victim Tags ***** -; VictimNameTag=String (Default: {VNAME}) -; VictimIPTag=String (Default: {VRNAME}) -; VictimSteamTag=String (Default: {VSTEAM}) -; VictimUUIDTag=String (Default: {VUUID}) -; VictimIDTag=String (Default: {VID}) -; VictimAdminTag=String (Default: {VADMIN}) -; VictimTeamColorTag=String (Default: {VTCOLOR}) -; VictimShortTeamTag=String (Default: {VTEAMS}) -; VictimLongTeamTag=String (Default: {VTEAML}) -; VictimPingTag=String (Default: {VPING}) -; VictimScoreTag=String (Default: {VSCORE}) -; VictimCreditsTag=String (Default: {VCREDITS}) -; VictimKillsTag=String (Default: {VKILLS}) -; VictimDeathsTag=String (Default: {VDEATHS}) -; VictimKDRTag=String (Default: {VKDR}) -; VictimSuicidesTag=String (Default: {VSUICIDES}) -; VictimHeadshotsTag=String (Default: {VHEADSHOTS}) -; VictimVehicleKillsTag=String (Default: {VVEHICLEKILLS}) -; VictimBuildingKillsTag=String (Default: {VBUILDINGKILLS}) -; VictimDefenceKillsTag=String (Default: {VDEFENCEKILLS}) -; VictimWinsTag=String (Default: {VWINS}) -; VictimLosesTag=String (Default: {VLOSES}) -; VictimBeaconPlacementsTag=String (Default: {VBEACONPLACEMENTS}) -; VictimAccessTag=String (Default: {VACCESS}) -; -; ***** Other Tags ***** -; WeaponTag=String (Default: {WEAPON}) -; ObjectTag=String (Default: {OBJECT}) -; MessageTag=String (Default: {MESSAGE}) -; NewNameTag=String (Default: {NNAME}; used exclusively for NameChangeFormat) -; WinScoreTag=String (Default: {WINSCORE}; used exclusively for GameOver formats) -; LoseScoreTag=String (Default: {LOSESCORE}; used exclusively for GameOver formats) -; - -[RenX.Tags] - -; [RenX.Commands] -; TBanTime=Integer (Default: 86400; Time in seconds) -; PlayerInfoFormat=String (Default: 03[Player Info]{TCOLOR} Name: {RNAME} - ID: {ID} - Team: {TEAML} - Vehicle Kills: {VEHICLEKILLS} - Building Kills {BUILDINGKILLS} - Kills {KILLS} - Deaths: {DEATHS} - KDR: {KDR} - Access: {ACCESS}") -; AdminPlayerInfoFormat=String (Default: PlayerInfoFormat - IP: {IP} - Steam ID: {STEAM}) -; - -[RenX.Commands] -TBanTime=86400 - -; [RenX.ModSystem] -; ModsFile=String (Default: Mods.ini) -; - -[RenX.ModSystem] -ModsFile=Mods.ini - -; [RenX.ExcessiveHeadshots] -; This is a completely optional statistic-based anti-cheat. -; The average aimbotter with rate-of-fire hacks will generally manage -; a headshot-kill ratio of about .66. -; -; These settings are all entirely optional; if they're not specified, -; then they will still default to the values listed below. -; -; HOW IT WORKS: -; Each setting is used for matching conditions in a flag-testing process. -; When the proper number of flags have been thrown, the player will -; be immediately banned from the server. To set the number of flags, -; set the "Flags" setting. -; -; Settings: -; HeadshotKillRatio=Float (Headshots/Kills) -; Kills=Integer (How many kills before a flag is set) -; KillDeathRatio=Float (Kills / Deaths) -; KillsPerSecond=Float (Kills / Player game time in seconds) -; MaxGameTime=Integer (Seconds after joining before dropping flag) -; Flags=Integer (Must be AT LEAST 2) -; -; Example scenario using default settings: -; A player joins your server. Within 2 minutes, they've racked 10 kills. -; Since they've been in-game for less than 180 seconds, they have 1 -; flag against them. Since they've reached 10 kills, they have another -; flag against them. Since they've obtained 10 kills in 120 seconds, their -; KPS is 0.08, which does not set off a flag. They now have 3 flags. If -; they get one more flag on this kill, they will be banned. The final flag -; in this scenario is the headshot-kill ratio. If half of their kills are from -; headshots, the final flag is set, and they're banned. If it's below half, -; they get to stay and enjoy the game. -; - -[RenX.ExcessiveHeadshots] -HeadshotKillRatio=0.5 -Kills=10 -KillDeathRatio=5.0 -KillsPerSecond=0.1 -MaxGameTime=180 -Flags=4 - -; [RenX.Logging] -; -; This plugin logs game events to IRC public and administrative channels. -; To prevent an event from logging to public channels, set the below -; corresponding setting to "false". Some events are set to "false" by default. -; -; To disable an event completely, set its logging format to an empty string. -; For an example, refer to the default CommandFormat value. -; -; Settings: -; JoinPublic=Bool (Default: true) -; PartPublic=Bool (Default: true) -; NameChangePublic=Bool (Default: true) -; TeamChangePublic=Bool (Default: true) -; PlayerPublic=Bool (Default: false) -; ChatPublic=Bool (Default: true) -; TeamChatPublic=Bool (Default: true) -; HostChatPublic=Bool (Default: true) -; HostPagePublic=Bool (Default: false) -; OtherPublic=Bool (Default: false) -; DeployPublic=Bool (Default: true) -; MineDeployPublic=Bool (Default: false) -; DisarmPublic=Bool (Default: true) -; MineDisarmPublic=Bool (Default: false) -; ExplodePublic=Bool (Default: false) -; SuicidePublic=Bool (Default: true) -; KillPublic=Bool (Default: true) -; DiePublic=Bool (Default: true) -; DestroyPublic=Bool (Default: true) -; CapturePublic=Bool (Default: true) -; NeutralizePublic=Bool (Default: true) -; CharacterPurchasePublic=Bool (Default: false) -; ItemPurchasePublic=Bool (Default: false) -; WeaponPurchasePublic=Bool (Default: false) -; RefillPurchasePublic=Bool (Default: false) -; VehiclePurchasePublic=Bool (Default: false) -; VehicleSpawnPublic=Bool (Default: true) -; SpawnPublic=Bool (Default: true) -; BotJoinPublic=Bool (Default: true) -; VehicleCratePublic=Bool (Default: false) -; DeathCratePublic=Bool (Default: false) -; MoneyCratePublic=Bool (Default: false) -; CharacterCratePublic=Bool (Default: false) -; SpyCratePublic=Bool (Default: false) -; RefillCratePublic=Bool (Default: false) -; StealPublic=Bool (Default: true) -; DonatePublic=Bool (Default: true) -; GamePublic=Bool (Default: true) -; GameOverPublic=Bool (Default: true) -; ExecutePublic=Bool (Default: false) -; SubscribePublic=Bool (Default: false) -; RCONPublic=Bool (Default: false) -; AdminLoginPublic=Bool (Default: true) -; AdminGrantPublic=Bool (Default: true) -; AdminLogoutPublic=Bool (Default: true) -; AdminPublic=Bool (Default: false) -; VoteCallPublic=Bool (Default: true) -; VoteOverPublic=Bool (Default: true) -; VoteCancelPublic=Bool (Default: true) -; VotePublic=Bool (Default: false) -; MapChangePublic=Bool (Default: true) -; MapLoadPublic=Bool (Default: true) -; MapPublic=Bool (Default: false) -; DemoRecordPublic=Bool (Default: true) -; DemoRecordStopPublic=Bool (Default: true) -; DemoPublic=Bool (Default: false) -; LogPublic=Bool (Default: false) -; CommandPublic=Bool (Default: false) -; ErrorPublic=Bool (Default: false) -; VersionPublic=Bool (Default: true) -; AuthorizedPublic=Bool (Default: true) -; OtherPublic=Bool (Default: false) -; -; ***** Formats ***** -; JoinPublicFormat=String (Default: 12[Join] {NAME} joined the game fighting for the {TEAML}!) -; JoinAdminFormat=String (Default: 12[Join] {NAME} joined the game fighting for the {TEAML} from {IP} using Steam ID {STEAM}.) -; JoinNoSteamAdminFormat=String (Default: 12[Join] {NAME} joined the game fighting for the {TEAML} from {IP}, but is not using Steam.) -; PartFormat=String (Default: 12[Part] {NAME} has left the {TEAML}.) -; PlayerExecuteFormat=String (Default: {NAME}07 executed: {MESSAGE}) -; PlayerFormat=String (Default: 12[Player] {MESSAGE}) -; NameChangeFormat=String (Default: {NAME} has changed their name to {NNAME}.) -; TeamChangeFormat=String (Default: {NAME} switched teams!) -; ChatFormat=String (Default: {NAME}: {MESSAGE}) -; TeamChatFormat=String (Default: {NAME}: {MESSAGE}) -; HostChatFormat=String (Default: 12Host0: {MESSAGE}) -; HostPageFormat=String (Default: 12(Host -> {RNAME}): {MESSAGE}) -; OtherChatFormat=String (Default: 06[Other Chat] {MESSAGE}) -; DeployFormat=String (Default: {NAME} deployed a {OBJECT}) -; MineDeplyFormat=String (Default: DeployFormat) -; DisarmFormat=String (Default: {NAME} disarmed {VNAME}'s {OBJECT}) -; MineDisarmFormat=String (Default: DisarmFormat) -; DisarmNoOwnerFormat=String (Default: {NAME} disarmed a {OBJECT}) -; MineDisarmNoOwnerFormat=String (Default: DisarmNoOwnerFormat) -; SuicideFormat=String (Default: {NAME} suicided (death by 12{WEAPON}).) -; KillFormat=String (Default: {NAME} killed {VNAME} ({TCOLOR}{CHAR}/{WEAPON} vs {VTCOLOR}{VCHAR}).) -; KillFormat2=String (Default: {TCOLOR}{NAME} killed {VNAME} (12{WEAPON}).) -; DieFormat=String (Default: {NAME} died (12{WEAPON}).) -; DieFormat2=String (Default: {TCOLOR}{NAME} died (12{WEAPON}).) -; DestroyBuildingFormat=String (Default: {NAME} destroyed the {VTCOLOR}{OBJECT} (12{WEAPON}).) -; DestroyBuildingFormat2=String (Default: {TCOLOR}{NAME} destroyed the {VTCOLOR}{OBJECT} (12{WEAPON}).) -; DestroyDefenceFormat=String (Default: {NAME} destroyed a {VTCOLOR}{OBJECT} (12{WEAPON}).) -; DestroyDefenceFormat2=String (Default: {TCOLOR}{NAME} destroyed a {VTCOLOR}{OBJECT} (12{WEAPON}).) -; DestroyVehicleFormat=String (Default: {NAME} destroyed a {VTCOLOR}{OBJECT} (12{WEAPON}).) -; DestroyVehicleFormat2=String (Default: {TCOLOR}{NAME} destroyed a {VTCOLOR}{OBJECT} (12{WEAPON}).) -; CaptureFormat=String(Default: {NAME} captured the {VTCOLOR}{VNAME}.) -; NeutralizeFormat=String(Default: {NAME} neutralized the {VTCOLOR}{VNAME}.) -; CharacterPurchaseFormat=String(Default: {NAME} purchased a {TCOLOR}{VCHAR}.) -; ItemPurchaseFormat=String(Default: {NAME} purchased a {TCOLOR}{OBJECT}.) -; WeaponPurchaseFormat=String(Default: {NAME} purchased a {TCOLOR}{WEAPON}.) -; RefillPurchaseFormat=String(Default: {NAME} purchased a {TCOLOR}refill.) -; VehiclePurchaseFormat=String(Default: {NAME} purchased a {TCOLOR}{VVEH}.) -; VehicleSpawnFormat=String(Default: A {TCOLOR}{VEH} has spawned.) -; SpawnFormat=String(Default: {NAME} spawned as a {TCOLOR}{VCHAR}.) -; BotJoinFormat=String(Default: {NAME} online.) -; VehicleCrateFormat=String(Default: {NAME} picked up a {VVEH} vehicle crate.) -; DeathCrateFormat=String(Default: {NAME} picked up a 12death crate.) -; MoneyCrateFormat=String(Default: {NAME} picked up 09{OBJECT} credits from a 12money crate.) -; CharacterCrateFormat=String(Default: {NAME} picked up a {TCOLOR}{VCHAR} 12character crate.) -; SpyCrateFormat=String(Default: {NAME} picked up a {TCOLOR}{VCHAR} 12spy crate.) -; RefillCrateFormat=String(Default: {NAME} picked up a {TCOLOR}refill crate.) -; StealFormat=String(Default: {NAME} stole {VNAME}'s {OBJECT}!) -; StealNoOwnerFormat=String(Default: {NAME} stole a 12{OBJET}!) -; DonateFormat=String(Default: {NAME} donated 09{OBJECT} credits to {VNAME}.) -; GameOverFormat=String (Default: 03[Game]{TCOLOR} The {TEAML} won by {MESSAGE}) -; GameOverTieNoWinFormat=String (Default: 03[Game]10 The battle ended in a {MESSAGE} - Victory handed to  {TCOLOR}{TEAML}) -; GameOverTieFormat=String (Default: 03[Game]10 The battle ended in a {MESSAGE}) -; GameOverScoreFormat=String (Default: 03[Game]{TCOLOR} {TEAML}: {WINSCORE} | {VTCOLOR}{VTEAML}: {LOSESCORE}) -; GameFormat=String (Default: 03[Game] {MESSAGE}) -; ExecuteFormat=String (Default: 07{NAME} executed: {MESSAGE}) -; SubscribeFormat=String (Default: 03{NAME} has subscribed to the RCON data stream.) -; RCONFormat=String (Default: 05[RCON] {MESSAGE}) -; AdminLoginFormat=String (Default: 07[Admin] {NAME} has logged in with 07{ADMIN} IRCNORMAL privledges.) -; AdminGrantFormat=String (Default: 07[Admin] {NAME} has been granted 07{ADMIN} IRCNORMAL privledges.) -; AdminLogoutFormat=String (Default: 07[Admin] {NAME} has logged out of their 07{ADMIN} IRCNORMAL privledges.) -; AdminFormat=String (Default: 07[Admin] {MESSAGE}) -; VoteCallFormat=String(Default: ) -; VoteOverSuccessFormat=String(Default: ) -; VoteOverFailFormat=String(Default: ) -; VoteCancelFormat=String(Default: ) -; VoteFormat=String(Default: ) -; MapChangeFormat=String(Default: ) -; MapLoadFormat=String(Default: ) -; MapFormat=String(Default: ) -; DemoRecordFormat=String(Default: ) -; RCONDemoRecordFormat=String(Default: ) -; DemoRecordStopFormat=String(Default: ) -; DemoFormat=String(Default: ) -; LogFormat=String (Default: 07[Log] {MESSAGE}) -; CommandFormat=String (Default: ) -; ErrorFormat=String (Default: 04[Error] {MESSAGE}) -; VersionFormat=String (Default: 03Renegade X RCON connection established; using RCON verison {RVER} for game version {GVER}) -; AuthorizedFormat=String (Default: 03RCON authorization completed.) -; OtherFormat=String (Default: 06[Other] {MESSAGE}) -; - -[RenX.Logging] -ExecuteFormat= - -; [RenX.ExtraLogging] -; -; This plugin enables the dumping RCON's raw output to the console -; and to a file. This is helpful for debugging purposes, as well as just -; general logging. -; -; Settings: -; LogFile=String (File logging disabled if unspecified) -; - -[RenX.ExtraLogging] -LogFile=RenX.txt - -; [RenX.Ladder] -; LadderDatabase=String (Default: Ladder.db; name of file to store ladder entries in) -; OnlyPure=Bool (Default: false; when true, only "pure" games should count) -; OutputTimes=Bool (Default: true; when true, sort/write statistics are shown) -; MaxLadderCommandPartNameOutput=Integer (Default: 5; how many partial matches to show in "ladder" command) -; - -[RenX.Ladder] - -; [RenX.Announcements] -; -; This plugin sends global messages to players based on text within a -; file. -; For format specifiers, please see the format table at: -; http://www.cplusplus.com/reference/ctime/strftime/ -; -; Settings: -; File=String (Default: Announcements.txt; File containing announcements) -; Delay=Integer (Default: 60; Number of seconds between announcements) -; Random=Bool (Default: false; True causes announcements to have no order) -; DateFormat=String (Default: %A, %B %d, %Y; see above for format specifiers) -; TimeFormat=String (Default: %H:%M:%S; see above for format specifiers) -; - -[RenX.Announcements] -File=Announcements.txt -Delay=60 -Random=false -DateTag={DATE} -TimeTag={TIME} -RulesTag={RULES} -DateFormat=%A, %B %d, %Y -TimeFormat=%H:%M:%S - -; [RenX.Medals] -; -; DataFile=String (Default: Medals.ini) -; JoinMessageFile=String (Default: Medals.Join.ini) -; KillCongratDelay=Integer (Default: 60) -; VehicleKillCongratDelay=Integer (Default: 60) -; KDRCongratDelay=Integer (Default: 60) -; - -[RenX.Medals] -DataFile=Medals.ini -JoinMessageFile=Medals.Join.ini - -; [RenX.Greetings] -; -; Put each greeting message on its own line in your GreetingsFile. -; NameTag will be replaced by the player's name; IPTag replaced -; with the player's IP; SteamTag replaced with the player's Steam ID; -; and UUIDTag replace with the player's UUID. -; -; GreetingsFile=String (Default: RenX.Greetings.txt) -; NameTag=String (Default: {NAME}) -; IPTag=String (Default: {IP}) -; SteamTag=String (Default: {STEAM}) -; UUIDTag=String (Default: {UUID}) -; SendPrivate=Bool (Default: True; Send as a private message?) -; SendMode=Integer (Default: 0; 0 = Random Order, 1 = Sequential Order, 2 = Send All) -; - -[RenX.Greetings] -GreetingsFile=RenX.Greetings.txt -NameTag={NAME} - -; [RenX.IRCJoin] -; -; PublicOnly=Bool (Default: true; true to only relay for public channels) -; NameTag=String (Default: {NAME}) -; ChannelTag=String (Default: {CHAN} -; PartReasonTag=String (Default: {REASON} -; Join.MsgAlways=Bool (Default: false; Message when server is empty) -; Join.MinAccess=Integer (Default: 0; minimum access level to relay) -; Join.MaxAccess=Integer (Default: -1; max access level to relay (-1 to disable)) -; Join.Format=String (Default: {NAME} has joined {CHAN}!) -; Part.MsgAlways=Bool (Default: false; Message when server is empty) -; Part.MinAccess=Integer (Default: 0; minimum access level to relay) -; Part.MaxAccess=Integer (Default: -1; max access level to relay (-1 to disable)) -; Part.Format=String (Default: {NAME} has left {CHAN} ({REASON})!) -; Part.FormatNoReason=String (Default: {NAME} has left {CHAN}!) -; - -[RenX.IRCJoin] -PublicOnly=true -NameTag={NAME} -ChannelTag={CHAN} -PartReasonTag={REASON} -Join.MsgAlways=false -Join.MinAccess=0 -Join.MaxAccess=-1 -Join.Format={NAME} has joined {CHAN}!) -Part.MsgAlways=false -Part.MinAccess=0 -Part.MaxAccess=-1 -Part.Format={NAME} has left {CHAN} ({REASON})! -Part.FormatNoReason={NAME} has left {CHAN}! - -; [RenX.Warn] -; MaxWarns=Integer (Default: 3) -; WarnAction=Integer (Default: -1; -1 = Kick; 0 = Perm Ban; Other Number (Seconds) = Timed Ban) -; - -[RenX.Warn] - -; [RenX.MinPlayers] -; PlayerThreshold=Integer (Default: 20; number of players + bots to normalize) -; - -[RenX.MinPlayers] - -; [RenX.SetJoin] -; SetJoinFile=String(Default: RenX.SetJoin.ini) -; - -[RenX.SetJoin] - -; [SetJoins] -; Join messages are stored here. -; Note: Usage of the "setjoin" command syncs the memory-stored -; file to the drive, which will destroy all comments in the process. -; -; String(User)=String(SetJoin) -; - -[SetJoins] - +; File: Config.ini +; +; Definitions: +; A String is a series of characters (Text) +; An Integer is a whole number. +; A Bool is either true or false. +; A Float is a decimal number. +; +; [Config] +; This block is used to define settings that are global in nature. +; Currently, there is a "Servers" option to specify what sections +; to look at for server configuration options, and a "Plugins" +; option that specifies which plugins to load from the Plugins +; folder. +; DO NOT INCLUDE A PLUGIN'S FILE EXTENSION (.dll or .so). +; +; Required Settings: +; Servers=String (Format: Server1 Server2) +; +; Optional Settings: +; Plugins=String (Format: Plugin1 Plugin2) +; PluginsDirectory=String (Default: Plugins\) +; + +[Config] +Servers=CnCIRC +Plugins=CoreCommands PluginManager ExtraCommands RenX.Core RenX.Commands RenX.Logging RenX.Medals RenX.SetJoin + +; [Default] +; +; This block is referenced only when a setting is not +; specified in a server's block. If a value is located +; neither in the server's block nor this one, then a +; crash or other unexpected behavior may occur. It is +; therefore recommended to have some sort of default +; value for all possible settings. +; +; Channel Configuring: +; Channels are given "types", which can determine various things such +; as auto-parting. A Channel of type -1 will automatically part itself. +; Channels can be configured in two ways: Active and Passive. +; Active channels are joined automatically. Passive channels are not, +; but can still be configured. +; +; Active Channels: +; Channel.Integer=String (Format: #Example [Password]) +; Channel.Integer.Type=Integer (-1 is auto-part) +; +; Passive Channels: +; Channel.String.Type=Integer +; +; Client address and port: +; The client address and port settings are entirely optional. These are +; only used under very special circumstances, and should otherwise +; not be specified. Unless you have a valid reason to need to bind the +; client to a specific address/port (such as connection limiations on a +; per-IP basis), do not set these. +; +; Settings: +; Hostname=String ("irc.cncirc.net" if unspecified) +; Port=Positive Integer (194 or 994 if unspecified) +; SSL=Bool +; STARTTLS=Bool (True if unspecified) +; Certificate=String (No SSL certificate used if unspecified) +; Key=String (Certificate file used if unspecified) +; SASL.Password=String (SASL disabled if unspecified) +; SASL.Account=String (Nickname if unspecified) +; Nick=String ("Jupiter" if unspecified) +; AltNick=String +; RealName=String ("Jupiter IRC Client" if unspecified) +; Channel.Type=Integer +; RawData.Integer=String (Example: OPER UserName Password) +; LogFile=String +; AutoJoinOnKick=Bool +; AutoPartMessage=String +; AutoReconnectDelay=Integer (Measured in seconds) +; MaxReconnectAttempts=Integer +; PrintOutput=Bool +; Prefix=String +; ClientAddress=String (Unused if unspecified) +; ClientPort=Integer (Unused if above is unspecified; defaults to 0) +; + +[Default] +Port=6667 +Nick=Jupiter +AltNick=Jupiter` +RealName=Jupiter IRC Framework by Agent +AutoPartMessage=Auto-Parting Enabled +AutoReconnect=1 +MaxReconnectAttempts=3 +AutoReconnectDelay=5 +PrintOutput=1 +Channel.Type=-1 +Prefix=! + +; [(ServerName)] +; +; Anything which can be set within the Default block can +; also be applied here. Values here supercede any value +; which is set within the Default block. +; + +[CnCIRC] +; CnCIRC includes the Renegade X IRC server. :) +Hostname=irc.cncirc.net +Nick=RenXBot +AltNick=RXBot` +Channel.1=#RenX-IRC +Channel.1.Type=1 +Channel.2=#RenX-IRC.Admin +Channel.2.Type=2 +SASL.Password=your_NickServ_Password +LogFile=CnCIRC.txt + +[CT] +Hostname=irc.ConstructiveTyranny.com +Nick=RenXBot +Channel.1=#RenX-IRC +Channel.1.Type=1 +Channel.2=#RenX-IRC.Admin +Channel.2.Type=2 +RawData.1=PRIVMSG NickServ :IDENTIFY your_NickServ_Password +LogFile=CT.txt + +; [DefaultCommands] +; You can modify the access requirements for any command here. +; Values set here will be set across all servers that do not have +; server-specific values set. +; +; To disable a command, set its access requirement to -1. +; +; Syntax: CommandTrigger=AccessLevel +; + +[DefaultCommands] +msg=1 + +; [(ServerName)Commands] +; You can modify the access requirements for any command here, on a +; per-server basis. Values specified here supercede those which are set +; in the DefaultCommands block. +; + +[CnCIRCCommands] +msg=0 + ;EOF \ No newline at end of file diff --git a/Configs/ChannelRelay.ini b/Configs/ChannelRelay.ini new file mode 100644 index 0000000..9579c29 --- /dev/null +++ b/Configs/ChannelRelay.ini @@ -0,0 +1,7 @@ +; File: ChannelRelay.ini +; + +; Defines the channel types to relay in a space delimited list +; Types=String (Default: ) + +;EOF \ No newline at end of file diff --git a/Configs/HTTPServer.ini b/Configs/HTTPServer.ini new file mode 100644 index 0000000..de289ba --- /dev/null +++ b/Configs/HTTPServer.ini @@ -0,0 +1,10 @@ +; File: HTTPServer.ini +; +; BindAddress=String (Default: 0.0.0.0) +; BindPort=Integer (Default: 80) +; + +BindAddress=0.0.0.0 +BindPort=80 + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Announcements.ini b/Configs/RenX.Announcements.ini new file mode 100644 index 0000000..03ec963 --- /dev/null +++ b/Configs/RenX.Announcements.ini @@ -0,0 +1,13 @@ +; File: RenX.Announcements +; +; Settings: +; Random=Bool (Default: false; True causes announcements to have no order) +; AnnouncementsFile=String (Default: Announcements.txt; File containing announcements) +; Delay=Integer (Default: 60; Number of seconds between announcements) +; + +Random=false +AnnouncementsFile=Announcements.txt +Delay=60 + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Commands.ini b/Configs/RenX.Commands.ini new file mode 100644 index 0000000..d4c09a8 --- /dev/null +++ b/Configs/RenX.Commands.ini @@ -0,0 +1,13 @@ +; File: RenX.Commands.ini +; +; TBanTime=Integer (Default: 86400; Time in seconds) +; PlayerInfoFormat=String (Default: 03[Player Info]{TCOLOR} Name: {RNAME} - ID: {ID} - Team: {TEAML} - Vehicle Kills: {VEHICLEKILLS} - Building Kills {BUILDINGKILLS} - Kills {KILLS} - Deaths: {DEATHS} - KDR: {KDR} - Access: {ACCESS}") +; AdminPlayerInfoFormat=String (Default: PlayerInfoFormat - IP: {IP} - Steam ID: {STEAM}) +; BuildingInfoFormat=String (Default: {BCOLOR} {BNAME} - 07{BHP}%) +; StaffTitle=String (Default: Moderator) +; + +[RenX.Commands] +TBanTime=86400 + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Core.ini b/Configs/RenX.Core.ini new file mode 100644 index 0000000..8f09a83 --- /dev/null +++ b/Configs/RenX.Core.ini @@ -0,0 +1,262 @@ +; File: RenX.Core.ini +; +; Define servers for the RenX module to connect to here. +; The "Servers" setting here operates similarly to the "Servers" setting +; in the main Config.ini file. Specify a space-deliminated list here to point +; to configuration sections for each individual Renegade-X server. +; +; Settings: +; Servers=String (Format: Server1 Server2) +; TranslationsFile=String (Default: Translations.ini) +; CommandsFile=String (Default: RenXGameCommands.ini) +; TagDefinitions=String (Default: RenX.Tags) +; + +Servers=Server1 Server2 + +; Here is where you define each individual Renegade-X server! +; Server types are tied to channel types, such that servers will +; report only to a specific channel type, and commands executed +; in a channel will only affect servers with the same type as that +; channel. If left unspecified the type will be 0, which is the same +; as the default channel type. +; +; AdminChanType defines the type for administrator channels. +; This channel will include more verbose output, such as player IP +; addresses, Steam IDs, and events unaccounted for. +; +; Settings: +; Hostname=String (Default: Localhost) +; Port=Integer (Default: 7777) +; ClientAddress=String (Unused if unspecified) +; Password=String (Default: renx) +; ChanType=Integer (Default: 0) +; AdminChanType=Integer (Default: 0) +; CommandPrefix=String (Empty if unspecified) +; IRCPrefix=String (Unused if unspecified) +; BanFromStr=String (Default: the server) +; Rules=String (Default: Anarchy!) +; ReconnectDelay=Integer (Default: 10000; milliseconds between reconnect attempts) +; MaxReconnectAttempts=Integer (Default: -1; A negative value means no limit) +; RCONBan=Bool (Default: false) +; LocalSteamBan=Bool (Default: true) +; LocalIPBan=Bool (Default: true) +; LocalHWIDBan=Bool (Default: true) +; LocalRDNSBan=Bool (Default: false) +; LocalNameBan=Bool (Default: false) +; SteamFormat=Integer (Default: 16; Hex=16, Integer=10, Octal=8) +; NeverSay=Bool (Forces the bot to PM players instead of using "say"; Default: false) +; ResolvePlayerRDNS=Bool (Default: true) +; ClientUpdateRate=Integer (Default: 2500) +; BuildingUpdateRate=Integer (Default: 7500) +; PingUpdateRate=Integer (Default: 60000) +; PingTimeoutThreshold=Integer (Default: 10000) +; + +[Server1] +Hostname=Localhost +Port=7777 +Password=renx +ChanType=1 +AdminChanType=2 +CommandPrefix=! +Rules=Hacking, cheating, or exploitation of any form is strictly prohibited. Please respect all players. + +[Server2] +Hostname=Localhost +Port=7778 +Password=renx +ChanType=3 +AdminChanType=4 +CommandPrefix=! +IRCPrefix=07[Marathon] + +; [RenX.Tags] +; +; ***** Global Tags ***** +; DateTag=String (Default: {DATE}) +; TimeTag=String (Default: {TIME}) +; +; ***** Server Tags ***** +; RCONVersionTag=String (Default: {RVER}) +; GameVersionTag=String (Default: {GVER}) +; RulesTag=String (Default: {RULES}) +; UserTag=String (Default: {USER}) +; ServerNameTag=String (Default: {SERVERNAME}) +; MapTag=String (Default: {MAP}) +; MapGUIDTag=String (Default: {MGUID}) +; ServerHostnameTag=String (Default: {SERVERHOST}) +; ServerPortTag=String (Default: {SERVERPORT}) +; SocketHostnameTag=String (Default: {SOCKHOST}) +; SocketPortTag=String (Default: {SOCKPORT}) +; ServerPrefixTag=String (Default: {SERVERPREFIX}) +; +; ***** Player Tags ****** +; NameTag=String (Default: {NAME}) +; RawNameTag=String (Default: {RNAME}) +; IPTag=String (Default: {IP}) +; HWIDTag=String (Default: {HWID}) +; RDNSTag=String (Default: {RDNS}) +; SteamTag=String (Default: {STEAM}) +; UUIDTag=String (Default: {UUID}) +; IDTag=String (Default: {ID}) +; CharacterTag=String (Default: {CHAR}) +; VehicleTag=String (Default: {VEH}) +; AdminTag=String (Default: {ADMIN}) +; PrefixTag=String (Default: {PREFIX}) +; GamePrefixTag=String (Default: {GPREFIX}) +; TeamColorTag=String (Default: {TCOLOR}) +; ShortTeamTag=String (Default: {TEAMS}) +; LongTeamTag=String (Default: {TEAML}) +; PingTag=String (Default: {PING}) +; ScoreTag=String (Default: {SCORE}) +; ScorePerMinuteTag=String (Default: {SPM}) +; CreditsTag=String (Default: {CREDITS}) +; KillsTag=String (Default: {KILLS}) +; DeathsTag=String (Default: {DEATHS}) +; KDRTag=String (Default: {KDR}) +; SuicidesTag=String (Default: {SUICIDES}) +; HeadshotsTag=String (Default: {HEADSHOTS}) +; HeadshotKillRatioTag=String (Default: {HSKR}) +; VehicleKillsTag=String (Default: {VEHICLEKILLS}) +; BuildingKillsTag=String (Default: {BUILDINGKILLS}) +; DefenceKillsTag=String (Default: {DEFENCEKILLS}) +; GameTimeTag=String (Default: {GAMETIME}) +; GamesTag=String (Default: {GAMES}) +; GDIGamesTag=String (Default: {GDIGAMES}) +; NodGamesTag=String (Default: {NODGAMES}) +; WinsTag=String (Default: {WINS}) +; GDIWinsTag=String (Default: {GDIWINS}) +; NodWinsTag=String (Default: {NODWINS}) +; TiesTag=String (Default: {TIES}) +; LossesTag=String (Default: {LOSSES}) +; GDILossesTag=String (Default: {GDILOSSES}) +; NodLossesTag=String (Default: {NODLOSSES}) +; WinLossRatioTag=String (Default: {WLR}) +; GDIWinLossRatioTag=String (Default: {GDIWLR}) +; NodWinLossRatioTag=String (Default: {NODWLR}) +; BeaconPlacementsTag=String (Default: {BEACONPLACEMENTS}) +; BeaconDisarmsTag=String (Default: {BEACONDISARMS}) +; ProxyPlacementsTag=String (Default: {PROXYPLACEMENTS}) +; ProxyDisarmsTag=String (Default: {PROXYDISARMS}) +; CapturesTag=String (Default: {CAPTURES}) +; StealsTag=String (Default: {STEALS}) +; StolenTag=String (Default: {STOLEN}) +; AccessTag=String (Default: {ACCESS}) +; +; ***** Victim Tags ***** +; VictimNameTag=String (Default: {VNAME}) +; VictimIPTag=String (Default: {VRNAME}) +; VictimHWIDTag=String (Default: {VHWID}) +; VictimRDNSTag=String (Default: {VRDNS}) +; VictimSteamTag=String (Default: {VSTEAM}) +; VictimUUIDTag=String (Default: {VUUID}) +; VictimIDTag=String (Default: {VID}) +; VictimCharacterTag=String (Default: {VCHAR}) +; VictimVehicleTag=String (Default: {VVEH}) +; VictimAdminTag=String (Default: {VADMIN}) +; VictimPrefixTag=String (Default: {VPREFIX}) +; VictimGamePrefixTag=String (Default: {VGPREFIX}) +; VictimTeamColorTag=String (Default: {VTCOLOR}) +; VictimShortTeamTag=String (Default: {VTEAMS}) +; VictimLongTeamTag=String (Default: {VTEAML}) +; VictimPingTag=String (Default: {VPING}) +; VictimScoreTag=String (Default: {VSCORE}) +; VictimCreditsTag=String (Default: {VCREDITS}) +; VictimScorePerMinuteTag=String (Default: {VSPM}) +; VictimKillsTag=String (Default: {VKILLS}) +; VictimDeathsTag=String (Default: {VDEATHS}) +; VictimKDRTag=String (Default: {VKDR}) +; VictimSuicidesTag=String (Default: {VSUICIDES}) +; VictimHeadshotsTag=String (Default: {VHEADSHOTS}) +; VictimHeadshotKillRatioTag=String (Default: {VHSKR}) +; VictimVehicleKillsTag=String (Default: {VVEHICLEKILLS}) +; VictimBuildingKillsTag=String (Default: {VBUILDINGKILLS}) +; VictimDefenceKillsTag=String (Default: {VDEFENCEKILLS}) +; VictimGameTimeTag=String (Default: {VGAMETIME}) +; VictimGamesTag=String (Default: {VGAMES}) +; VictimGDIGamesTag=String (Default: {VGDIGAMES}) +; VictimNodGamesTag=String (Default: {VNODGAMES}) +; VictimWinsTag=String (Default: {VWINS}) +; VictimGDIWinsTag=String (Default: {VGDIWINS}) +; VictimNodWinsTag=String (Default: {VNODWINS}) +; VictimTiesTag=String (Default: {VTIES}) +; VictimLosesTag=String (Default: {VLOSES}) +; VictimGDILossesTag=String (Default: {VGDILOSSES}) +; VictimNodLossesTag=String (Default: {VNODLOSSES}) +; VictimWinLossRatioTag=String (Default: {VWLR}) +; VictimGDIWinLossRatioTag=String (Default: {VGDIWLR}) +; VictimNodWinLossRatioTag=String (Default: {VNODWLR}) +; VictimBeaconPlacementsTag=String (Default: {VBEACONPLACEMENTS}) +; VictimBeaconDisarmsTag=String (Default: {VBEACONDISARMS}) +; VictimProxyPlacementsTag=String (Default: PVPROXYPLACEMENTS}) +; VictimProxyDisarmsTag=String (Default: {VPROXYDISARMS}) +; VictimCapturesTag=String (Default: {VCAPTURES}) +; VictimStealsTag=String (Default: {VSTEALS}) +; VictimStolenTag=String (Default: {VSTOLEN}) +; VictimAccessTag=String (Default: {VACCESS}) +; +; ***** Building Tags ***** +; BuildingNameTag=String (Default: {BNAME}) +; BuildingRawNameTag=String (Default: {BRNAME}) +; BuildingHealthTag=String (Default: {BHEALTH}) +; BuildingMaxHealthTag=String (Default: {BMHEALTH}) +; BuildingHealthPercentageTag=String (Default: {BHP}) +; BuildingArmorTag=String (Default: {BARMOR}) +; BuildingMaxArmorTag=String (Default: {BMARMOR}) +; BuildingArmorPercentageTag=String (Default: {BAP}) +; BuildingDurabilityTag=String (Default: {BDURABILITY}) +; BuildingMaxDurabilityTag=String (Default: {BMDURABILITY}) +; BuildingDurabilityPercentageTag=String (Default: {BDP}) +; BuildingTeamColorTag=String (Default: {BCOLOR}) +; BuildingShortTeamTag=String (Default: {BTEAMS}) +; BuildingLongTeamTag=String (Default: {BTEAML}) +; +; ***** Ladder Tags ***** +; RankTag=String (Default: {RANK}) +; LastGameTag=String (Default: {LASTGAME}) +; GDIScoreTag=String (Default: {GDISCORE}) +; GDISPMTag=String (Default: {GDISPM}) +; GDIGameTimeTag=String (Default: {GDIGAMETIME}) +; GDITiesTag=String (Default: {GDITIES}) +; GDIBeaconPlacementsTag=String (Default: {GDOBEACONPLACEMENTS}) +; GDIBeaconDisarmsTag=String (Default: {GDIBEACONDISARMS}) +; GDIProxyPlacementsTag=String (Default: {GDIPROXYPLACEMENTS}) +; GDIProxyDisarmsTag=String (Default: GDIPROXYDISARMS}) +; GDIKillsTag=String (Default: {GDIKILLS}) +; GDIDeathsTag=String (Default: {GDIDEATHS}) +; GDIVehicleKillsTag=String (Default: {GDIVEHICLEKILLS}) +; GDIDefenceKillsTag=String (Default: {GDIDEFENCEKILLS}) +; GDIBuildingKillsTag=String (Default: {GDIBUILDINGKILLS}) +; GDIKDRTag=String (Default: {GDIKDR}) +; GDIHeadshotsTag=String (Default: {GDIHEADSHOTS}) +; GDIHeadshotKillRatioTag=String (Default: {HDIHSKR}) +; NodScoreTag=String (Default: {NODSCORE}) +; NodSPMTag=String (Default: {NODSPM}) +; NodGameTimeTag=String (Default: {NODGAMETIME}) +; NodTiesTag=String (Default: {NODTIES}) +; NodBeaconPlacementsTag=String (Default: {NODBEACONPLACEMENTS}) +; NodBeaconDisarmsTag=String (Default: {NODBEACONDISARMS}) +; NodProxyPlacementsTag=String (Default: {NODPROXYPLACEMENTS}) +; NodProxyDisarmsTag=String (Default: {NODPROXYDISARMS}) +; NodKillsTag=String (Default: {NODKILLS}) +; NodDeathsTag=String (Default: {NODDEATHS}) +; NodVehicleKillsTag=String (Default: {NODVEHICLEKILLS}) +; NodDefenceKillsTag=String (Default: {NODDEFENCEKILLS}) +; NodBuildingKillsTag=String (Default: {NODBUILDINGKILLS}) +; NodKDRTag=String (Default: {NODKDR}) +; NodHeadshotsTag=String (Default: {NODHEADSHOTS}) +; NodHeadshotKillRatioTag=String (Default: {NODHSKR}) +; +; ***** Other Tags ***** +; WeaponTag=String (Default: {WEAPON}) +; ObjectTag=String (Default: {OBJECT}) +; MessageTag=String (Default: {MESSAGE}) +; NewNameTag=String (Default: {NNAME}; used exclusively for NameChangeFormat) +; WinScoreTag=String (Default: {WINSCORE}; used exclusively for GameOver formats) +; LoseScoreTag=String (Default: {LOSESCORE}; used exclusively for GameOver formats) +; + +[RenX.Tags] + +;EOF \ No newline at end of file diff --git a/Configs/RenX.ExcessiveHeadshots.ini b/Configs/RenX.ExcessiveHeadshots.ini new file mode 100644 index 0000000..dff87ab --- /dev/null +++ b/Configs/RenX.ExcessiveHeadshots.ini @@ -0,0 +1,30 @@ +; File: RenX.ExcessiveHeadshots.ini +; +; This is a completely optional statistic-based anti-cheat. +; The average aimbotter with rate-of-fire hacks will generally manage +; a headshot-kill ratio of about .66. +; +; These settings are all entirely optional; if they're not specified, +; then they will still default to the values listed below. +; +; HOW IT WORKS: +; Each setting is used for matching conditions in a flag-testing process. +; When the proper number of flags have been thrown, the player will +; be immediately banned from the server. To set the number of flags, +; set the "Flags" setting. +; +; Settings: +; HeadshotKillRatio=Float (Default: 0.5) +; Kills=Int (Default: 10) +; KillDeathRatio=Float (Default: 5.0) +; KillsPerSecond=Float (Default: 0.5) +; Flags=Int (Default: 4) +; + +HeadshotKillRatio=0.5 +Kills=10 +KillDeathRatio=5.0 +KillsPerSecond=0.5 +Flags=4 + +;EOF \ No newline at end of file diff --git a/Configs/RenX.ExtraLogging.ini b/Configs/RenX.ExtraLogging.ini new file mode 100644 index 0000000..e3839a7 --- /dev/null +++ b/Configs/RenX.ExtraLogging.ini @@ -0,0 +1,11 @@ +; File: RenX.ExtraLogging +; +; Settings: +; FilePrefix=String (Default: [{TIME}] {SERVERPREFIX}) +; ConsolePrefix=String (Default: FilePrefix) +; NewDayFormat=String (Default: Time: {TIME} {DATE} +; PrintToConsole=Bool (Default: true) +; LogFile=String (Default: ) +; + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Greetings.ini b/Configs/RenX.Greetings.ini new file mode 100644 index 0000000..47c847a --- /dev/null +++ b/Configs/RenX.Greetings.ini @@ -0,0 +1,15 @@ +; File: RenX.Greetings.ini +; +; Put each greeting message on its own line in your GreetingsFile. +; +; Settings: +; SendPrivate=Bool (Default: true; Send as a private message) +; SendMode=Integer (Default: 0; 0 = Random Order, 1 = Sequential Order, 2 = Send All) +; GreetingsFile=String (Default: RenX.Greetings.txt) +; + +SendPrivate=true +SendMode=0 +GreetingsFile=RenX.Greetings.txt + +;EOF \ No newline at end of file diff --git a/Configs/RenX.IRCJoin.ini b/Configs/RenX.IRCJoin.ini new file mode 100644 index 0000000..07f5969 --- /dev/null +++ b/Configs/RenX.IRCJoin.ini @@ -0,0 +1,23 @@ +; File: RenX.IRCJoin.ini +; +; Settings: +; PublicOnly=Bool (Default: true) +; Join.MsgAlways=Bool (Default: false; Message when server is empty) +; Part.MsgAlways=Bool (Default: false; Message when server is empty) +; Part.MinAccess=Integer (Default: 0; Minimum access level to relay) +; Part.MaxAccess=Integer (Default: -1; Max access level to relay (-1 to disable)) +; NameTag=String (Default: {NAME}) +; ChannelTag=String (Default: {CHAN}) +; PartReasonTag=String (Default: {REASON}) +; Join.Format=String (Default: {NAME} has joined {CHAN}!) +; Part.Format=String (Default: {NAME} has left {CHAN} ({REASON})!) +; Part.FormatNoReason=String (Default: {NAME} has left {CHAN}!) +; + +PublicOnly=true +Join.MsgAlways=false +Part.MsgAlways=false +Part.MinAccess=0 +Part.MaxAccess=-1 + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Ladder.All-Time.ini b/Configs/RenX.Ladder.All-Time.ini new file mode 100644 index 0000000..0da16cb --- /dev/null +++ b/Configs/RenX.Ladder.All-Time.ini @@ -0,0 +1,16 @@ +; File: RenX.Ladder.All-Time +; + +; File to store leaderboard info in +LadderDatabase=Ladder.db + +; Name of the database +DatabaseName=All-Time + +; Output the times for sorting/writing the database +OutputTimes=true + +; Forces this database to be the default one +ForceDefault=true + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Ladder.Daily.ini b/Configs/RenX.Ladder.Daily.ini new file mode 100644 index 0000000..ff45658 --- /dev/null +++ b/Configs/RenX.Ladder.Daily.ini @@ -0,0 +1,16 @@ +; File: RenX.Ladder.Daily +; + +; File to store leaderboard info in +LadderDatabase=Ladder.Daily.db + +; Name of the database +DatabaseName=Daily + +; Output the times for sorting/writing the database +OutputTimes=false + +; Forces this database to be the default one +ForceDefault=false + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Ladder.Monthly.ini b/Configs/RenX.Ladder.Monthly.ini new file mode 100644 index 0000000..ac46b12 --- /dev/null +++ b/Configs/RenX.Ladder.Monthly.ini @@ -0,0 +1,16 @@ +; File: RenX.Ladder.Monthly +; + +; File to store leaderboard info in +LadderDatabase=Ladder.Monthly.db + +; Name of the database +DatabaseName=Monthly + +; Output the times for sorting/writing the database +OutputTimes=false + +; Forces this database to be the default one +ForceDefault=false + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Ladder.Web.ini b/Configs/RenX.Ladder.Web.ini new file mode 100644 index 0000000..7fec75a --- /dev/null +++ b/Configs/RenX.Ladder.Web.ini @@ -0,0 +1,46 @@ +; File: RenX.Ladder.Web +; + +; Name of the leaderboard table page (Default: ) +LadderPageName= + +; Name of the search table page (Default: search) +SearchPageName=search + +; Name of the profile page (Default: profile) +ProfilePageName=profile + +; Path for the pages to be reached at (Default: /) +Path=/ + +; Name of the file that is prepended before every page +HeaderFilename=RenX.Ladder.Web.Header.html + +; Name of the file that is appended to every page +FooterFilename=RenX.Ladder.Web.Footer.html + +; Name of the file that defines the profile page layout +ProfileFilename=RenX.Ladder.Web.Profile.html + +; Name of the file that is prepended to leaderboard tables +LadderTableHeaderFilename=RenX.Ladder.Web.Ladder.Table.Header.html + +; Name of the file that is appended to leaderboard tables +LadderTableFooterFilename=RenX.Ladder.Table.Footer.html + +; Number of entries to display per table page +EntriesPerPage=50 + +; Minimum number of input characters on the search page +MinSearchNameLength=3 + +; Defines the layout of the leaderboard table rows +EntryTableRow={RANK}{NAME}{SCORE}{SPM}{GAMES}{WINS}{LOSSES}{WLR}{KILLS}{DEATHS}{KDR} + +; Defines the layout of the 'previous' button on profiles +EntryProfilePrevious=
+ +; Defines the layout of the 'next' button on profiles +EntryProfileNext=
+ +;EOF \ No newline at end of file diff --git a/Configs/RenX.Ladder.Weekly.ini b/Configs/RenX.Ladder.Weekly.ini new file mode 100644 index 0000000..d024930 --- /dev/null +++ b/Configs/RenX.Ladder.Weekly.ini @@ -0,0 +1,19 @@ +; File: RenX.Ladder.Weekly +; + +; File to store leaderboard info in +LadderDatabase=Ladder.Weekly.db + +; Name of the database +DatabaseName=Weekly + +; Output the times for sorting/writing the database +OutputTimes=false + +; Forces this database to be the default one +ForceDefault=false + +; Index of the day of the week to reset on (i.e: 0 = Sunday) +ResetDay=0 + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Ladder.Yearly.ini b/Configs/RenX.Ladder.Yearly.ini new file mode 100644 index 0000000..8ba98f6 --- /dev/null +++ b/Configs/RenX.Ladder.Yearly.ini @@ -0,0 +1,16 @@ +; File: RenX.Ladder.Monthly +; + +; File to store leaderboard info in +LadderDatabase=Ladder.Yearly.db + +; Name of the database +DatabaseName=Yearly + +; Output the times for sorting/writing the database +OutputTimes=false + +; Forces this database to be the default one +ForceDefault=false + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Ladder.ini b/Configs/RenX.Ladder.ini new file mode 100644 index 0000000..183ad96 --- /dev/null +++ b/Configs/RenX.Ladder.ini @@ -0,0 +1,11 @@ +; File: RenX.Ladder +; +; Settings: +; OnlyPure=Bool (Default: false; when true, only "pure" games should count) +; MaxLadderCommandPartNameOutpuit=Integer (Default: 5; how many partial matches to show in "ladder" command) +; + +OnlyPure=false +MaxLadderCommandPartNameOutput=5 + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Listen.ini b/Configs/RenX.Listen.ini new file mode 100644 index 0000000..ce558a6 --- /dev/null +++ b/Configs/RenX.Listen.ini @@ -0,0 +1,16 @@ +; File: RenX.Listen.ini +; +; This file is primarily used by the DevBot for listening to inbound +; RCON connections, rather than making outbound connections +; +; Settings: +; Port=Integer (Default: 21337) +; Address=String (Default: 0.0.0.0) +; ServerSection=String (Default: RenX.Listen) +; + +Port=21337 +Address=0.0.0.0 +ServerSection=RenX-ListenServer + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Logging.ini b/Configs/RenX.Logging.ini new file mode 100644 index 0000000..2d1fc92 --- /dev/null +++ b/Configs/RenX.Logging.ini @@ -0,0 +1,207 @@ +; File: RenX.Logging.ini +; +; This plugin logs game events to IRC public and administrative channels. +; To prevent an event from logging to public channels, set the below +; corresponding setting to "false". Some events are set to "false" by default. +; +; To disable an event completely, set its logging format to an empty string. +; For an example, refer to the default CommandFormat value. +; + +; True to suppress the logs for commands this bot executes +MuteOwnExecute=true + +; +; Public logging enablers +; If you don't want a log message public, set it to false here +; + +;PlayerRDNSPublic=false +;JoinPublic=true +;PartPublic=true +;KickPublic=true +;NameChangePublic=true +;TeamChangePublic=true +;SpeedHackPublic=false +;PlayerPublic=false +;ChatPublic=true +;TeamChatPublic=false +;RadioChatPublic=false +;HostChatPublic=true +;HostPagePublic=false +;OtherChatPublic=false +;DeployPublic=true +;MineDeployPublic=false +;OverMinePublic=false +;DisarmPublic=true +;MineDisarmPublic=false +;ExplodePublic=false +;SuicidePublic=true +;KillPublic=true +;DiePublic=true +;DestroyPublic=true +;CapturePublic=true +;NeutralizePublic=true +;CharacterPurchasePublic=false +;ItemPurchasePublic=false +;WeaponPurchasePublic=false +;RefillPurchasePublic=false +;VehiclePurchasePublic=false +;VehicleSpawnPublic=true +;SpawnPublic=true +;BotJoinPublic=true +;VehicleCratePublic=false +;TSVehicleCratePublic=false +;RAVehicleCratePublic=false +;DeathCratePublic=true +;MoneyCratePublic=false +;CharacterCratePublic=false +;SpyCratePublic=false +;RefillCratePublic=false +;TimeBombCratePublic=false +;SpeedCratePublic=false +;NukeCratePublic=true +;AbductionCratePublic=true +;UnspecifiedCratePublic=false +;OtherCratePublic=false +;StealPublic=true +;DonatePublic=true +;GamePublic=true +;GameOverPublic=true +;ExecutePublic=false +;SubscribePublic=false +;RCONPublic=false +;AdminLoginPublic=true +;AdminGrantPublic=true +;AdminLogoutPublic=true +;AdminPublic=false +;VoteCallPublic=true +;VoteOverPublic=true +;VoteCancelPublic=true +;VotePublic=false +;MapChangePublic=true +;MapLoadPublic=true +;MapStartPublic=true +;MapPublic=false +;DemoRecordPublic=true +;DemoRecordStopPublic=true +;DemoPublic=false +;LogPublic=false +;CommandPublic=false +;ErrorPublic=false +;VersionPublic=true +;AuthorizedPublic=true +;OtherPublic=false + +; +; Logging formats +; Define log formats here +; + +;PlayerRDNSFormat=05[RDNS] {NAME}'s hostname is {RDNS} +;JoinPublicFormat=12[Join] {NAME} joined the game fighting for the {TEAML}! +;JoinAdminFormat=12[Join] {NAME} joined the game fighting for the {TEAML} from {IP} using Steam ID {STEAM}. HWID: "{HWID}" +;JoinNoSteamAdminFormat=12[Join] {NAME} joined the game fighting for the {TEAML} from {IP}, but is not using Steam. HWID: "{HWID}" +;PartFormat=12[Part] {NAME} left the {TEAML}. +;KickFormat=04[Kick] {NAME} was 04kicked (04{MESSAGE}) +;PlayerExecuteFormat={NAME}07 executed: {MESSAGE} +;PlayerFormat=12[Player] {MESSAGE} +;NameChangeFormat={NAME} changed their name to {NNAME}. +;TeamChangeFormat={NAME} switched teams! +;SpeedHackFormat=04[SpeedHack] {NAME} has thrown a Speed Hack warning! +;ChatFormat={NAME}: {MESSAGE} +;TeamChatFormat={NAME}: {MESSAGE} +;RadioChatFormat={NAME}: {MESSAGE} +;HostChatFormat=12Host0: {MESSAGE} +;HostPageFormat=12(Host -> {RNAME}): {MESSAGE} +;OtherChatFormat=06[Other Chat] {MESSAGE} +;DeployFormat={NAME} deployed a 12{OBJECT} +;MineDeployFormat={NAME} deployed a 12{OBJECT} +;OverMineFormat={NAME} is 04over-mining: 12{OBJECT} +;DisarmFormat={NAME} disarmed {VNAME}'s 12{OBJECT} +;MineDisarmFormat={NAME} disarmed {VNAME}'s 12{OBJECT} +;DisarmNoOwnerFormat={NAME} disarmed a {OBJECT} +;MineDisarmNoOwnerFormat={NAME} disarmed a {OBJECT} +;ExplodeFormat={NAME} detonated a 07{WEAPON}. +;ExplodeNoOwnerFormat=A 07{WEAPON} detonated. +;SuicideFormat={NAME} suicided (12{WEAPON}). +;KillFormat={NAME} killed {VNAME} ({TCOLOR}{CHAR}/{WEAPON} vs {VTCOLOR}{VCHAR}). +;KillFormat2={TCOLOR}{NAME} killed {VNAME} (12{WEAPON}). +;DieFormat={NAME} died (12{WEAPON}). +;DieFormat2={TCOLOR}{NAME} died (12{WEAPON}). +;DestroyBuildingFormat={NAME} destroyed the {VTCOLOR}{OBJECT} (12{WEAPON}). +;DestroyBuildingFormat2={TCOLOR}{NAME} destroyed the {VTCOLOR}{OBJECT} (12{WEAPON}). +;DestroyDefenceFormat={NAME} destroyed a {VTCOLOR}{OBJECT} (12{WEAPON}). +;DestroyDefenceFormat2={TCOLOR}{NAME} destroyed a {VTCOLOR}{OBJECT} (12{WEAPON}). +;DestroyVehicleFormat={NAME} destroyed a {VTCOLOR}{OBJECT} (12{WEAPON}). +;DestroyVehicleFormat2={TCOLOR}{NAME} destroyed a {VTCOLOR}{OBJECT} (12{WEAPON}). +;CaptureFormat={NAME} captured the {VTCOLOR}{OBJECT}. +;NeutralizeFormat={NAME} neutralized the {VTCOLOR}{OBJECT}. +;CharacterPurchaseFormat={NAME} purchased a {TCOLOR}{VCHAR}. +;ItemPurchaseFormat={NAME} purchased a {TCOLOR}{OBJECT}. +;WeaponPurchaseFormat={NAME} purchased a {TCOLOR}{WEAPON}. +;RefillPurchaseFormat={NAME} purchased a {TCOLOR}refill. +;VehiclePurchaseFormat={NAME} purchased a {TCOLOR}{VVEH}. +;VehicleSpawnFormat=A {TCOLOR}{VEH} has spawned. +;SpawnFormat={NAME} spawned as a {TCOLOR}{VCHAR}. +;BotJoinFormat={NAME} online. +;VehicleCrateFormat={NAME} picked up a 12{OBJECT} vehicle crate. +;TSVehicleCrateFormat={NAME} picked up a 12{OBJECT} vehicle crate. +;RAVehicleCrateFormat={NAME} picked up a 12{OBJECT} vehicle crate. +;DeathCrateFormat={NAME} picked up a 12death crate. +;MoneyCrateFormat={NAME} picked up 09{OBJECT} credits from a 12money crate. +;CharacterCrateFormat={NAME} picked up a {TCOLOR}{VCHAR} 12character crate. +;SpyCrateFormat={NAME} picked up a {VTCOLOR}{VCHAR} 12spy crate. +;RefillCrateFormat={NAME} picked up a {TCOLOR}refill crate. +;TimeBombCrateFormat={NAME} picked up a 11time-bomb crate. +;SpeedCrateFormat={NAME} picked up a 11speed crate. +;NukeCrateFormat={NAME} picked up a 04nuke crate. +;AbductionCrateFormat={NAME} has been 06abducted by the 06Scrin! +;UnspecifiedCrateFormat={NAME} picked up an 13unspecified crate. +;OtherCrateFormat={NAME} picked up a 13{OBJECT} crate. +;StealFormat={NAME} stole {VNAME}'s {OBJECT}! +;StealNoOwnerFormat={NAME} stole a 12{OBJECT}! +;DonateFormat={NAME} donated 09{OBJECT} credits to {VNAME}. +;GameOverFormat=03[Game]{TCOLOR} The {TEAML} won by {MESSAGE} +;GameOverTieNoWinFormat=03[Game]10 The battle ended in a {MESSAGE} - Victory handed to {TCOLOR}{TEAML} +;GameOverTieFormat=03[Game]10 The battle ended in a {MESSAGE} +;GameOverScoreFormat=03[Game]{TCOLOR} {TEAML}: {WINSCORE} | {VTCOLOR}{VTEAML}: {LOSESCORE} +;GameFormat=03[Game] {MESSAGE} +; ExecuteFormat=07{NAME} executed: {MESSAGE} +ExecuteFormat= +;DevBotExecuteFormat= +;SubscribeFormat=03{NAME} subscribed to the RCON data stream. +;RCONFormat=05[RCON] {MESSAGE} +;AdminLoginFormat=07[Admin] {NAME} logged in with 07{ADMIN} privledges. +;AdminGrantFormat=07[Admin] {NAME} was granted 07{ADMIN} privledges. +;AdminLogoutFormat=07[Admin] {NAME} logged out of their 07{ADMIN} privledges. +;AdminFormat=07[Admin] {MESSAGE} +;VoteAddBotsFormat=[Vote] {NAME} has called for adding 12{OBJECT} bots to {VTEAMS}, with skill level 07{WEAPON}. +;VoteChangeMapFormat=[Vote] {NAME} has called for a Map Change. +;VoteKickFormat=[Vote] {NAME} has called for a kick against {VNAME}. +;VoteMineBanFormat={VTCOLOR}[Vote] {NAME} has called for a Mine Ban against {NAME}. +;VoteRemoveBotsFormat=[Vote] {NAME} has called a vote to remove 12{OBJECT} bots from {VTCOLOR}{VTEAMS}. +;VoteRestartMapFormat=[Vote] {NAME} has called for a Map Restart. +;VoteSurrenderFormat={VTCOLOR}[Vote] {NAME} has called for a Surrender. +;VoteSurveyFormat={VTCOLOR}[Vote] {NAME}{VTCOLOR} has started a Survey: 12{MESSAGE} +;VoteOtherFormat={VTCOLOR}[Vote] {NAME}{VTCOLOR} has called a "{OBJECT}" vote. +;VoteOverSuccessFormat={VTCOLOR}[Vote] A vote for "{OBJECT}" 09passed{VTCOLOR} (Votes Yes: {WINSCORE} | Votes No: {LOSESCORE}). +;VoteOverFailFormat={VTCOLOR}[Vote] A vote for "{OBJECT}" 04failed{VTCOLOR} (Votes Yes: {WINSCORE} | Votes No: {LOSESCORE}). +;VoteCancelFormat={VTCOLOR}[Vote] A vote for "{OBJECT}" was 07cancelled. +;VoteFormat=06[Vote] {MESSAGE} +;MapChangeFormat=03Loading {MESSAGE}... +;MapLoadFormat=03{MESSAGE} loaded. +;MapStartFormat=03{MESSAGE} started. +;MapFormat=06[Map] {MESSAGE} +;DemoRecordFormat={NAME} has started a demo recording. +;RCONDemoRecordFormat=07A demo recording has started. +;DemoRecordStopFormat=07The demo recording has stopped. +;DemoFormat=06[Demo] {MESSAGE} +;LogFormat=07[Log] {MESSAGE} +;CommandFormat= +;ErrorFormat=04[Error] {MESSAGE} +;VersionFormat=03Renegade X RCON connection established; using RCON verison {RVER} for game version {GVER} +;AuthorizedFormat=03RCON authorization completed. +;OtherFormat=06[Other] {MESSAGE} + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Medals.ini b/Configs/RenX.Medals.ini new file mode 100644 index 0000000..5399d4c --- /dev/null +++ b/Configs/RenX.Medals.ini @@ -0,0 +1,130 @@ +; File: RenX.Medals.ini +; +; Settings: +; KillCongratDelay=Integer (Default: 60) +; VehicleKillCongratDelay=Integer (Default: 60) +; KDRCongratDelay=Integer (Default: 60) +; MedalsFile=String (Default: Medals.ini) +; JoinMessageFile=String (Default: Medals.Join.ini) +; FirstSection=String (Default: ) +; RecsTag=String (Default: {RECS}) +; NoobsTag=String (Default: {NOOBS}) +; WorthTag=String (Default: {WORTH} +; + +; To enable the following join messages, uncomment the following line: +; FirstSection=NewPlayer + +[NewPlayer] +MaxRecs=0 +NextSection=n00ber + +[n00ber] +MaxRecs=5 +NextSection=n00b +1={RNAME} gets the n00bjet ready... ({WORTH} recommendations) +2={RNAME} is still a n00b at heart. ({WORTH} recommendations) +3=Hey {RNAME} nice you joined, it would be nicer if you left. ({WORTH} recommendations) +4=Please leave {RNAME} come back when you figured out how an terminal works. ({WORTH} recommendations) +5=Ow my god you're just terribble, {RNAME}. scOpe|K4T can beat you with two hands tied behind his back. ({WORTH} recommendations) +6=Well well {RNAME} I admire you courage to enter this server. ({WORTH} recommendations) +7=Sheesz does anyone actually recommend you {RNAME}? ({WORTH} recommendations) +8=Well nice job {RNAME} your parents will be proud. ({WORTH} recommendations) +9=Your name is {RNAME}. How do I spell that, N-O-O-B right? ({WORTH} recommendations) +10=Wow playing with {RNAME} is almost better then having sex, almost! ({WORTH} recommendations) +11=oO Ohh no that n00b again Oo Hi {RNAME} glad you joined. ({WORTH} recommendations) +12=Euuwwwwwwwwwww It's {RNAME} get back to the circus you FREAK! ({WORTH} recommendations) +13=Hi Mr. {RNAME} or can I say n00b! ({WORTH} recommendations) +14=What are you doing here {RNAME}? Even pacman is too difficult for you. ({WORTH} recommendations) +15=Hi {RNAME}, I hope you have chosen the wrong room cause we have enough n00bs already. ({WORTH} recommendations) +16={RNAME}, I wouldn't team up with you if you were the last gamer on earth ({WORTH} recommendations) +17={RNAME} joined the game, thank god friendly fire is off ({WORTH} recommendations) +18={RNAME} joined the game, wow what an bummer for his teammates ({WORTH} recommendations) +19=Hey mister {RNAME} guess what, your still a nobody ({WORTH} recommendations) +20=Hey {RNAME} have fun but try not to blow yourself up ({WORTH} recommendations) +21=Well {RNAME} I passed that level when you where still wearing diapers ({WORTH} recommendations) +22=Hey {RNAME} have you ever thought of an new hobby? Fishing maybe? ({WORTH} recommendations) +23=Hmmm {RNAME} guess we have to call you an teamplayer... NOT! ({WORTH} recommendations) +24=Other players agree, {RNAME} is beginning to froth at the mouth. ({WORTH} recommendations) + +[n00b] +MaxRecs=10 +NextSection=n00bless +1=I sure feel sorry for you all, n00b {RNAME} just joined their ranks! ({WORTH} recommendations) +2=Guess what {RNAME} you won the award of lousiest player ever, congratulations! ({WORTH} recommendations) +3=Wow cool name {RNAME} too bad you are such an loser. ({WORTH} recommendations) +4={RNAME} joined. Great just what we needed, another LOSER! ({WORTH} recommendations) +5=Thinking of respawning? n00b {RNAME} will probably try to c4 you! ({WORTH} recommendations) +6={RNAME} attempts to snipe people, but can't seem to get those orca missles far enough yet. Keep trying! ({WORTH} recommendations) +7=If you're looking for n00b {RNAME}, you can find them running away from their own harvester. ({WORTH} recommendations) +8={RNAME} probably thinks all snipers are cheaters with bighead. ({WORTH} recommendations) +9=Hey {RNAME} welcome! Enjoy this server while you still can! Cause I'm working on an anti n00b bot. ({WORTH} recommendations) +10={RNAME} was last found falling out of the transport chopper. ({WORTH} recommendations) +11={RNAME} wants to know how to fire lasers out of the apc. ({WORTH} recommendations) +12={RNAME} probably still wonders why apaches can't shoot missles that far. ({WORTH} recommendations) +13={RNAME} should look for the n00b hack, it may do the team some good. ({WORTH} recommendations) +14=Well, it looks like you'll be holding {RNAME}'s hand today. ({WORTH} recommendations) +15=Forgot to read the instructions? AFK? No, that player is just {RNAME}... they're new here. ({WORTH} recommendations) +16=Hey {RNAME}, your teammates aren't used for target practice... oh wait, you don't know what team you're on! ({WORTH} recommendations) +17={RNAME} agrees, mammoth tanks are the best in reconaissance missions. ({WORTH} recommendations) +18=Those pesky snipers are but flies in comparison to the mammoth tank n00b {RNAME} drives! ({WORTH} recommendations) +19=If you're looking for {RNAME}, you may find them running in circles in your local barracks -- follow the trail of bullets. ({WORTH} recommendations) +20=Normally I would say lag driving is the cause of falling off ledges, but in {RNAME}'s case... ({WORTH} recommendations) +21=That abandoned stealth tank is fodder for {RNAME}'s medium tank guns! ({WORTH} recommendations) + +[n00bless] +MaxRecs=20 +NextSection=good +1={RNAME} will be busy driving circles around other n00bs in that nearby APC. ({WORTH} recommendations) +2={RNAME} begins the long quest to become n00b killer #1. ({WORTH} recommendations) +3=The dust settles, leaving {RNAME} alone in a tunnel full of dead n00bs! ({WORTH} recommendations) +4=Well well {RNAME} a teamplayer, thank god I was thinking the n00bs had taken over this server. ({WORTH} recommendations) +5=Hurray! {RNAME} made it to the rank of teamplayer... Now the rest of you n00bs have to ({WORTH} recommendations) +6=Ok ok {RNAME} guess u earned some respect but don't think I want you near me now, okay? ({WORTH} recommendations) +7=Okay {RNAME} you're on the right track but Mac and Blazer still own you ({WORTH} recommendations) + +[good] +MaxRecs=50 +NextSection=better +1=What?!? ({WORTH} recommendations) *gulp* hehe... hmmm... {RNAME} sry about the things I said earlier ok...? +2=Boehoe :( plz stop recommending {RNAME} you think it's fun making up these comments??? ({WORTH} recommendations) +3=You can run but you can't hide {RNAME} is on the loose! ({WORTH} recommendations) +4={RNAME}? Hmmm glad someone still knows what teamplay is. ({WORTH} recommendations) +5=Is it an plane? Is it an bird? NO it?s {RNAME} and he?s ready to kick some butt! ({WORTH} recommendations) +6={RNAME} knows the formula TankClash + Orca/Apache = trouble. ({WORTH} recommendations) +7={RNAME} is a ref hoppin', harvy walkin', n00b killer!!! ({WORTH} recommendations) +8=Obelisks, Harvesters, Guard towers, and uhh, n00bs beware; {RNAME} is here! ({WORTH} recommendations) + +[better] +MaxRecs=100 +NextSection=renegud +1=If you could change team, it may be a good idea to team up with {RNAME}; oh wait, you can't! ({WORTH} recommendations) +2=Yeah! It's {RNAME} let's do some serious damage!!! ({WORTH} recommendations) +3=Hey it's {RNAME} well enemy team you want to be buried or cremated? ({WORTH} recommendations) +4=What? {RNAME} is ingame? Ok enemy team just give up will ya! ({WORTH} recommendations) +5={RNAME} should learn to put the Renegade away some times! j/k, welcome back commander! ({WORTH} recommendations) +6={RNAME} will be schooling the other team today. Got your notes ready? ({WORTH} recommendations) + +[renegud] +MaxRecs=200 +NextSection=renerager +1=You are on your way to destruction {RNAME}, make your time!!! ({WORTH} recommendations) +2=Oh my god that's {RNAME}!!! AAAAAAAAAAH *Screams like an girl and throws his underwear* ({WORTH} recommendations) +3=*trumpets* All raise for his/her teamplayness, {RNAME}! ({WORTH} recommendations) +4=Don't worry enemy team, {RNAME} will say YATTA! ({WORTH} recommendations) +5=Enemy team beware, {RNAME} will be doing the hamster dance all over your dead n00bs! ({WORTH} recommendations) +6=Zen master {RNAME} can snipe n00bs anywhere without wall hacks at this point. ({WORTH} recommendations) + +[renerager] +MaxRecs=400 +NextSection=renegod +1=Shotgun, flamethrower, sniper rifle, {RNAME} is a master of them all, less the sleep -- it gets in the way of renegade! ({WORTH} recommendations) +2={RNAME} is actual competition for the kbps laggers and bigheaders! ({WORTH} recommendations) +3=To {RNAME}, you're all cheaters! ({WORTH} recommendations) + +[renegod] +1=WOW! I have just one word for {RNAME}... GODLIKE!!! ({WORTH} recommendations) +2={RNAME} knows, in the end there is only Renegade. ({WORTH} recommendations) +3=In the beginning there were n00bs, in the end there was {RNAME}. ({WORTH} recommendations) + +;EOF \ No newline at end of file diff --git a/Configs/RenX.MinPlayers.ini b/Configs/RenX.MinPlayers.ini new file mode 100644 index 0000000..614737f --- /dev/null +++ b/Configs/RenX.MinPlayers.ini @@ -0,0 +1,8 @@ +; File: RenX.MinPlayers.ini +; + +; How many players (bots AND humans) the bot should try to +; maintain at a minimum. +PlayerThreshold=20 + +;EOF \ No newline at end of file diff --git a/Mods.ini b/Configs/RenX.ModSystem.ini similarity index 91% rename from Mods.ini rename to Configs/RenX.ModSystem.ini index c363d31..d5db634 100644 --- a/Mods.ini +++ b/Configs/RenX.ModSystem.ini @@ -1,14 +1,17 @@ -; Mods.ini -; The name of this file can be specified in the primary configuration file -; as "ModsFile" under "RenX.ModSystem". +; File: RenX.ModSystem +; -; LockSteam=Bool (Default: false) +; LockSteam=Bool (Default: true) ; Binds a player's moderator block to their Steam ID if true. -LockSteam=false +LockSteam=true -; LockIP=Bool (Default: true) +; LockIP=Bool (Default: false) ; Binds a player's moderator block to their last IP address if true. -LockIP=true +LockIP=false + +; LockName=Bool (Default: false) +; Binds a player's moderator block to their name if true +LockName=false ; KickLockMismatch=Bool (Default: true) ; Kicks players who fail to pass the above lock checks when true. @@ -89,4 +92,4 @@ Owner.GamePrefix=~ ; LastIP=String (Default: ) ; -; EOF \ No newline at end of file +;EOF \ No newline at end of file diff --git a/Configs/RenX.ServerList.ini b/Configs/RenX.ServerList.ini new file mode 100644 index 0000000..af3d7cf --- /dev/null +++ b/Configs/RenX.ServerList.ini @@ -0,0 +1,22 @@ +; File: RenX.ServerList.ini +; +; This plugin generates JSON data based on the servers that the +; bot is connected to. +; + +; Hostname of the server list (Default: ) +Hostname= + +; Path for the pages to be reached at (Default: /) +Path=/ + +; Name of the Servers page (Default: servers.jsp) +ServersPageName=servers.jsp + +; Name of the human-readable Servers page (Default: servers_long.jsp) +HumanServersPageName=servers_long.jsp + +; Name of the Server page (lists mutators and levels for a server) +ServerPageName=server.jsp + +;EOF \ No newline at end of file diff --git a/Configs/RenX.SetJoin.ini b/Configs/RenX.SetJoin.ini new file mode 100644 index 0000000..c0df54d --- /dev/null +++ b/Configs/RenX.SetJoin.ini @@ -0,0 +1,9 @@ +; File: RenX.SetJoin.ini +; +; This file lists the in-game setjoins for players. +; +; Format: +; Player UUID=Message +; + +;EOF \ No newline at end of file diff --git a/Configs/RenX.Warn.ini b/Configs/RenX.Warn.ini new file mode 100644 index 0000000..00d2de2 --- /dev/null +++ b/Configs/RenX.Warn.ini @@ -0,0 +1,11 @@ +; File: RenX.Warn.ini +; +; Settings: +; MaxWarns=Integer (Default: 3) +; MaxAction=Integer (Default: -1; -1 = Kick; 0 = Perm Ban; Other Number (Seconds) = Timed Ban) +; + +MaxWarns=3 +MaxAction=-1 + +;EOF \ No newline at end of file diff --git a/Configs/SetJoin.ini b/Configs/SetJoin.ini new file mode 100644 index 0000000..9fae186 --- /dev/null +++ b/Configs/SetJoin.ini @@ -0,0 +1,8 @@ +; File: SetJoin.ini +; +; SetJoins are stored here in the following format: +; [Server] +; User=Message +; + +;EOF \ No newline at end of file diff --git a/CoreCommands/CoreCommands.cpp b/CoreCommands/CoreCommands.cpp index b5af7c5..bc5ee5a 100644 --- a/CoreCommands/CoreCommands.cpp +++ b/CoreCommands/CoreCommands.cpp @@ -190,15 +190,12 @@ RehashGenericCommand::RehashGenericCommand() GenericCommand::ResponseLine *RehashGenericCommand::trigger(const Jupiter::ReadableString ¶meters) { - if (Jupiter::IRC::Client::Config == nullptr) - return new GenericCommand::ResponseLine(STRING_LITERAL_AS_REFERENCE("Unable to find Config data."), GenericCommand::DisplayType::PublicError); - else - { - unsigned int r = Jupiter::rehash(); - if (r == 0) - return new GenericCommand::ResponseLine(Jupiter::StringS::Format("All %u objects were successfully rehashed.", Jupiter::getRehashableCount()), GenericCommand::DisplayType::PublicSuccess); - return new GenericCommand::ResponseLine(Jupiter::StringS::Format("%u of %u objects failed to successfully rehash.", r, Jupiter::getRehashableCount()), GenericCommand::DisplayType::PublicError); - } + unsigned int r = Jupiter::rehash(); + + if (r == 0) + return new GenericCommand::ResponseLine(Jupiter::StringS::Format("All %u objects were successfully rehashed.", Jupiter::getRehashableCount()), GenericCommand::DisplayType::PublicSuccess); + + return new GenericCommand::ResponseLine(Jupiter::StringS::Format("%u of %u objects failed to successfully rehash.", r, Jupiter::getRehashableCount()), GenericCommand::DisplayType::PublicError); } const Jupiter::ReadableString &RehashGenericCommand::getHelp(const Jupiter::ReadableString &) diff --git a/CoreCommands/CoreCommands.h b/CoreCommands/CoreCommands.h index e81aa3b..451f07d 100644 --- a/CoreCommands/CoreCommands.h +++ b/CoreCommands/CoreCommands.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -25,11 +25,6 @@ class CoreCommandsPlugin : public Jupiter::Plugin { -public: - const Jupiter::ReadableString &getName() override { return name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "CoreCommands"); }; GENERIC_CONSOLE_COMMAND(HelpConsoleCommand) diff --git a/ExtraCommands/ExtraCommands.h b/ExtraCommands/ExtraCommands.h index dd1fae6..5bf0d7b 100644 --- a/ExtraCommands/ExtraCommands.h +++ b/ExtraCommands/ExtraCommands.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -25,11 +25,6 @@ class FunCommandsPlugin : public Jupiter::Plugin { -public: - const Jupiter::ReadableString &getName() override { return name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "ExtraCommands"); }; GENERIC_GENERIC_COMMAND(SelectGenericCommand) diff --git a/FunCommands/FunCommands.h b/FunCommands/FunCommands.h index a9acf53..cf6906d 100644 --- a/FunCommands/FunCommands.h +++ b/FunCommands/FunCommands.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -24,11 +24,6 @@ class ExtraCommandsPlugin : public Jupiter::Plugin { -public: - const Jupiter::ReadableString &getName() override { return name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "FunCommands"); }; GENERIC_IRC_COMMAND(EightBallIRCCommand) diff --git a/HTTPServer/HTTPServer.cpp b/HTTPServer/HTTPServer.cpp index 96c0b56..2350737 100644 --- a/HTTPServer/HTTPServer.cpp +++ b/HTTPServer/HTTPServer.cpp @@ -17,14 +17,13 @@ */ #include "Jupiter/INIFile.h" -#include "Jupiter/IRC_Client.h" #include "HTTPServer.h" using namespace Jupiter::literals; HTTPServerPlugin::HTTPServerPlugin() { - HTTPServerPlugin::server.bind(Jupiter::IRC::Client::Config->get(HTTPServerPlugin::name, "BindAddress"_jrs, "0.0.0.0"_jrs), Jupiter::IRC::Client::Config->getInt(HTTPServerPlugin::name, "BindPort"_jrs, 80)); + HTTPServerPlugin::server.bind(this->config.get(Jupiter::ReferenceString::empty, "BindAddress"_jrs, "0.0.0.0"_jrs), this->config.getInt(Jupiter::ReferenceString::empty, "BindPort"_jrs, 80)); } int HTTPServerPlugin::think() diff --git a/HTTPServer/HTTPServer.h b/HTTPServer/HTTPServer.h index 0dabdee..5614ac0 100644 --- a/HTTPServer/HTTPServer.h +++ b/HTTPServer/HTTPServer.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -57,11 +57,7 @@ public: Jupiter::HTTP::Server server; public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } int think() override; - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "HTTPServer"); }; HTTPSERVER_API HTTPServerPlugin &getHTTPServerPlugin(); diff --git a/Jupiter b/Jupiter index 87f1b47..b990d5d 160000 --- a/Jupiter +++ b/Jupiter @@ -1 +1 @@ -Subproject commit 87f1b47149f7974ab5faa81b8b9d3c4b26b68838 +Subproject commit b990d5d27facfd283ad4d36c70105d682a283cdc diff --git a/MakeRelease.bat b/MakeRelease.bat index f45b4ea..029157a 100644 --- a/MakeRelease.bat +++ b/MakeRelease.bat @@ -45,6 +45,7 @@ GOTO EOF :BinaryCopy: ROBOCOPY "Release\\" "..\Jupiter Bot Binaries\\" *.dll *.exe /S +ROBOCOPY "Configs\\" "..\Jupiter Bot Binaries\Configs\\" *.ini ROBOCOPY ".\\" "..\Jupiter Bot Binaries\\" *.ini *.txt "C:\Program Files\WinRAR\WinRAR.exe" a -r "..\Jupiter Bot Binaries.zip" "..\Jupiter Bot Binaries" GOTO EOF @@ -52,6 +53,7 @@ GOTO EOF :SourceCopy: ROBOCOPY ".\\" "..\Jupiter Bot Source\\" *.* /S /XD Release ROBOCOPY "Release\\" "..\Jupiter Bot Source\Release\\" *.dll *.exe /S +ROBOCOPY "Configs\\" "..\Jupiter Bot Source\Configs\\" *.ini ROBOCOPY ".\\" "..\Jupiter Bot Source\\" *.ini *.txt "C:\Program Files\WinRAR\WinRAR.exe" a -r "..\Jupiter Bot.zip" "..\Jupiter Bot Source" GOTO EOF diff --git a/Plugin.Example/Example.h b/Plugin.Example/Example.h index 9dfc979..66acdf3 100644 --- a/Plugin.Example/Example.h +++ b/Plugin.Example/Example.h @@ -16,10 +16,6 @@ class ExamplePlugin : public Jupiter::Plugin { public: void OnConnect(Jupiter::IRC::Client *server); - const Jupiter::ReadableString &getName() override { return this->name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "ExamplePlugin"); }; // Example IRC Command Declaration diff --git a/Plugin.Template/Example.h b/Plugin.Template/Example.h index e361ecc..4cdc879 100644 --- a/Plugin.Template/Example.h +++ b/Plugin.Template/Example.h @@ -14,11 +14,6 @@ class TPlugin : public Jupiter::Plugin { -public: - const Jupiter::ReadableString &getName() override { return name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "TemplatePlugin"); }; #endif // _EXAMPLE_H_HEADER \ No newline at end of file diff --git a/PluginManager/PluginManager.cpp b/PluginManager/PluginManager.cpp index a9a34f6..5631f30 100644 --- a/PluginManager/PluginManager.cpp +++ b/PluginManager/PluginManager.cpp @@ -47,7 +47,7 @@ GenericCommand::ResponseLine *PluginGenericCommand::trigger(const Jupiter::Reada if (parameters.matchi("load *")) { - if (Jupiter::loadPlugin(Jupiter::ReferenceString::gotoWord(parameters, 1, WHITESPACE)) == nullptr) + if (Jupiter::Plugin::load(Jupiter::ReferenceString::gotoWord(parameters, 1, WHITESPACE)) == nullptr) return ret->set("Error: Failed to load plugin."_jrs, GenericCommand::DisplayType::PublicError); else return ret->set("Plugin successfully loaded."_jrs, GenericCommand::DisplayType::PublicSuccess); @@ -55,9 +55,9 @@ GenericCommand::ResponseLine *PluginGenericCommand::trigger(const Jupiter::Reada if (parameters.matchi("unload *")) { Jupiter::ReferenceString pluginName = Jupiter::ReferenceString::gotoWord(parameters, 1, WHITESPACE); - if (Jupiter::getPlugin(pluginName) == nullptr) + if (Jupiter::Plugin::get(pluginName) == nullptr) return ret->set("Error: Plugin does not exist."_jrs, GenericCommand::DisplayType::PublicError); - if (Jupiter::freePlugin(pluginName) == false) + if (Jupiter::Plugin::free(pluginName) == false) return ret->set("Error: Failed to unload plugin."_jrs, GenericCommand::DisplayType::PublicError); return ret->set("Plugin successfully unloaded."_jrs, GenericCommand::DisplayType::PublicSuccess); } diff --git a/PluginManager/PluginManager.h b/PluginManager/PluginManager.h index f4a8269..d9a248c 100644 --- a/PluginManager/PluginManager.h +++ b/PluginManager/PluginManager.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -26,11 +26,6 @@ class PluginManager : public Jupiter::Plugin { -public: - const Jupiter::ReadableString &getName() override { return name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "PluginManager"); }; GENERIC_GENERIC_COMMAND(PluginGenericCommand) diff --git a/Release/Bot.lib b/Release/Bot.lib index 056c160..3ed59eb 100644 Binary files a/Release/Bot.lib and b/Release/Bot.lib differ diff --git a/Release/Plugins/RenX.Core.lib b/Release/Plugins/RenX.Core.lib index ff890a2..0e6d477 100644 Binary files a/Release/Plugins/RenX.Core.lib and b/Release/Plugins/RenX.Core.lib differ diff --git a/RenX.AlwaysRecord/RenX_AlwaysRecord.h b/RenX.AlwaysRecord/RenX_AlwaysRecord.h index c57c218..379fa24 100644 --- a/RenX.AlwaysRecord/RenX_AlwaysRecord.h +++ b/RenX.AlwaysRecord/RenX_AlwaysRecord.h @@ -27,12 +27,6 @@ class RenX_AlwaysRecord : public RenX::Plugin { public: // RenX::Plugin void RenX_OnMapStart(RenX::Server *server, const Jupiter::ReadableString &) override; - -public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.AlwaysRecord"); }; #endif // _RENX_ALWAYSRECORD_H_HEADER \ No newline at end of file diff --git a/RenX.Announcements/RenX_Announcements.cpp b/RenX.Announcements/RenX_Announcements.cpp index 995c237..921ac48 100644 --- a/RenX.Announcements/RenX_Announcements.cpp +++ b/RenX.Announcements/RenX_Announcements.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -66,24 +66,24 @@ int RenX_AnnouncementsPlugin::OnRehash() { RenX_AnnouncementsPlugin::timer->kill(); RenX_AnnouncementsPlugin::announcementsFile.unload(); - return RenX_AnnouncementsPlugin::init(); + return this->initialize() ? 0 : -1; } -int RenX_AnnouncementsPlugin::init() +bool RenX_AnnouncementsPlugin::initialize() { - RenX_AnnouncementsPlugin::random = Jupiter::IRC::Client::Config->getBool(STRING_LITERAL_AS_REFERENCE("RenX.Announcements"), STRING_LITERAL_AS_REFERENCE("Random")); + RenX_AnnouncementsPlugin::random = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Random")); - RenX_AnnouncementsPlugin::announcementsFile.load(Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("RenX.Announcements"), STRING_LITERAL_AS_REFERENCE("File"), STRING_LITERAL_AS_REFERENCE("Announcements.txt"))); + RenX_AnnouncementsPlugin::announcementsFile.load(this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("File"), STRING_LITERAL_AS_REFERENCE("Announcements.txt"))); if (RenX_AnnouncementsPlugin::announcementsFile.getLineCount() == 0) { fputs("[RenX.Announcements] ERROR: No announcements loaded." ENDL, stderr); - return -1; + return false; } - time_t delay = Jupiter::IRC::Client::Config->getInt(STRING_LITERAL_AS_REFERENCE("RenX.Announcements"), STRING_LITERAL_AS_REFERENCE("Delay"), 60); + time_t delay = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Delay"), 60); RenX_AnnouncementsPlugin::timer = new Jupiter::Timer(0, delay, announce_); if (RenX_AnnouncementsPlugin::random == false) RenX_AnnouncementsPlugin::lastLine = RenX_AnnouncementsPlugin::announcementsFile.getLineCount() - 1; - return 0; + return true; } RenX_AnnouncementsPlugin::~RenX_AnnouncementsPlugin() @@ -92,11 +92,6 @@ RenX_AnnouncementsPlugin::~RenX_AnnouncementsPlugin() RenX_AnnouncementsPlugin::announcementsFile.unload(); } -extern "C" __declspec(dllexport) bool load() -{ - return pluginInstance.init() == 0; -} - extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin() { return &pluginInstance; diff --git a/RenX.Announcements/RenX_Announcements.h b/RenX.Announcements/RenX_Announcements.h index 590be69..dbc23aa 100644 --- a/RenX.Announcements/RenX_Announcements.h +++ b/RenX.Announcements/RenX_Announcements.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -31,16 +31,13 @@ class RenX_AnnouncementsPlugin : public RenX::Plugin { public: void announce(unsigned int); - int init(); public: // Jupiter::Plugin + virtual bool initialize() override; int OnRehash(); - //int think(); - const Jupiter::ReadableString &getName() override { return name; } ~RenX_AnnouncementsPlugin(); private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Announcements"); bool random; unsigned int lastLine; Jupiter::Timer *timer; diff --git a/RenX.Commands/RenX_Commands.cpp b/RenX.Commands/RenX_Commands.cpp index 79cdc64..85c8a8c 100644 --- a/RenX.Commands/RenX_Commands.cpp +++ b/RenX.Commands/RenX_Commands.cpp @@ -64,18 +64,23 @@ void RenX_CommandsPlugin::RenX_OnDie(RenX::Server *server, const RenX::PlayerInf onDie(server, player); } -int RenX_CommandsPlugin::OnRehash() +bool RenX_CommandsPlugin::initialize() { - RenX_CommandsPlugin::_defaultTempBanTime = std::chrono::seconds(Jupiter::IRC::Client::Config->getLongLong(RenX_CommandsPlugin::getName(), STRING_LITERAL_AS_REFERENCE("TBanTime"), 86400)); - RenX_CommandsPlugin::playerInfoFormat = Jupiter::IRC::Client::Config->get(RenX_CommandsPlugin::getName(), STRING_LITERAL_AS_REFERENCE("PlayerInfoFormat"), STRING_LITERAL_AS_REFERENCE(IRCCOLOR "03[Player Info]" IRCCOLOR "{TCOLOR} Name: " IRCBOLD "{RNAME}" IRCBOLD " - ID: {ID} - Team: " IRCBOLD "{TEAML}" IRCBOLD " - Vehicle Kills: {VEHICLEKILLS} - Building Kills {BUILDINGKILLS} - Kills {KILLS} - Deaths: {DEATHS} - KDR: {KDR} - Access: {ACCESS}")); - RenX_CommandsPlugin::adminPlayerInfoFormat = Jupiter::IRC::Client::Config->get(RenX_CommandsPlugin::getName(), STRING_LITERAL_AS_REFERENCE("AdminPlayerInfoFormat"), Jupiter::StringS::Format("%.*s - IP: " IRCBOLD "{IP}" IRCBOLD " - HWID: " IRCBOLD "{HWID}" IRCBOLD " - RDNS: " IRCBOLD "{RDNS}" IRCBOLD " - Steam ID: " IRCBOLD "{STEAM}", RenX_CommandsPlugin::playerInfoFormat.size(), RenX_CommandsPlugin::playerInfoFormat.ptr())); - RenX_CommandsPlugin::buildingInfoFormat = Jupiter::IRC::Client::Config->get(RenX_CommandsPlugin::getName(), STRING_LITERAL_AS_REFERENCE("BuildingInfoFormat"), STRING_LITERAL_AS_REFERENCE(IRCCOLOR) + RenX::tags->buildingTeamColorTag + RenX::tags->buildingNameTag + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " - " IRCCOLOR "07") + RenX::tags->buildingHealthPercentageTag + STRING_LITERAL_AS_REFERENCE("%")); - RenX_CommandsPlugin::staffTitle = Jupiter::IRC::Client::Config->get(RenX_CommandsPlugin::getName(), STRING_LITERAL_AS_REFERENCE("StaffTitle"), STRING_LITERAL_AS_REFERENCE("Moderator")); + RenX_CommandsPlugin::_defaultTempBanTime = std::chrono::seconds(this->config.getLongLong(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("TBanTime"), 86400)); + RenX_CommandsPlugin::playerInfoFormat = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("PlayerInfoFormat"), STRING_LITERAL_AS_REFERENCE(IRCCOLOR "03[Player Info]" IRCCOLOR "{TCOLOR} Name: " IRCBOLD "{RNAME}" IRCBOLD " - ID: {ID} - Team: " IRCBOLD "{TEAML}" IRCBOLD " - Vehicle Kills: {VEHICLEKILLS} - Building Kills {BUILDINGKILLS} - Kills {KILLS} - Deaths: {DEATHS} - KDR: {KDR} - Access: {ACCESS}")); + RenX_CommandsPlugin::adminPlayerInfoFormat = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("AdminPlayerInfoFormat"), Jupiter::StringS::Format("%.*s - IP: " IRCBOLD "{IP}" IRCBOLD " - HWID: " IRCBOLD "{HWID}" IRCBOLD " - RDNS: " IRCBOLD "{RDNS}" IRCBOLD " - Steam ID: " IRCBOLD "{STEAM}", RenX_CommandsPlugin::playerInfoFormat.size(), RenX_CommandsPlugin::playerInfoFormat.ptr())); + RenX_CommandsPlugin::buildingInfoFormat = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("BuildingInfoFormat"), STRING_LITERAL_AS_REFERENCE(IRCCOLOR) + RenX::tags->buildingTeamColorTag + RenX::tags->buildingNameTag + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " - " IRCCOLOR "07") + RenX::tags->buildingHealthPercentageTag + STRING_LITERAL_AS_REFERENCE("%")); + RenX_CommandsPlugin::staffTitle = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("StaffTitle"), STRING_LITERAL_AS_REFERENCE("Moderator")); RenX::sanitizeTags(RenX_CommandsPlugin::playerInfoFormat); RenX::sanitizeTags(RenX_CommandsPlugin::adminPlayerInfoFormat); RenX::sanitizeTags(RenX_CommandsPlugin::buildingInfoFormat); - return 0; + return true; +} + +int RenX_CommandsPlugin::OnRehash() +{ + return this->initialize() ? 0 : -1; } std::chrono::seconds RenX_CommandsPlugin::getTBanTime() const @@ -103,11 +108,6 @@ const Jupiter::ReadableString &RenX_CommandsPlugin::getStaffTitle() const return RenX_CommandsPlugin::staffTitle; } -RenX_CommandsPlugin::RenX_CommandsPlugin() -{ - this->OnRehash(); -} - // Plugin instantiation and entry point. RenX_CommandsPlugin pluginInstance; @@ -1234,46 +1234,6 @@ const Jupiter::ReadableString &RulesIRCCommand::getHelp(const Jupiter::ReadableS IRC_COMMAND_INIT(RulesIRCCommand) -// SetRules IRC Command - -void SetRulesIRCCommand::create() -{ - this->addTrigger(STRING_LITERAL_AS_REFERENCE("setrules")); - this->setAccessLevel(4); -} - -void SetRulesIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString ¶meters) -{ - if (parameters.isNotEmpty()) - { - unsigned int r = 0; - Jupiter::IRC::Client::Channel *chan = source->getChannel(channel); - if (chan != nullptr) - { - int type = chan->getType(); - for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++) - { - RenX::Server *server = RenX::getCore()->getServer(i); - if (server->isLogChanType(type)) - { - server->setRules(parameters); - r++; - } - } - if (r == 0) - source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers.")); - } - } -} - -const Jupiter::ReadableString &SetRulesIRCCommand::getHelp(const Jupiter::ReadableString &) -{ - static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Sets the in-game rules. Syntax: setrules [show]"); - return defaultHelp; -} - -IRC_COMMAND_INIT(SetRulesIRCCommand) - // Reconnect IRC Command void ReconnectIRCCommand::create() diff --git a/RenX.Commands/RenX_Commands.h b/RenX.Commands/RenX_Commands.h index 1201e06..be45819 100644 --- a/RenX.Commands/RenX_Commands.h +++ b/RenX.Commands/RenX_Commands.h @@ -33,7 +33,7 @@ public: // RenX::Plugin void RenX_OnDie(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &damageType) override; public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } + virtual bool initialize() override; int OnRehash() override; public: @@ -42,10 +42,8 @@ public: const Jupiter::ReadableString &getAdminPlayerInfoFormat() const; const Jupiter::ReadableString &getBuildingInfoFormat() const; const Jupiter::ReadableString &getStaffTitle() const; - RenX_CommandsPlugin(); private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Commands"); std::chrono::seconds _defaultTempBanTime; Jupiter::StringS playerInfoFormat; Jupiter::StringS adminPlayerInfoFormat; @@ -74,7 +72,6 @@ GENERIC_IRC_COMMAND(ShowModsIRCCommand) GENERIC_IRC_COMMAND(ModsIRCCommand) GENERIC_IRC_COMMAND(ShowRulesIRCCommand) GENERIC_IRC_COMMAND(RulesIRCCommand) -GENERIC_IRC_COMMAND(SetRulesIRCCommand) GENERIC_IRC_COMMAND(ReconnectIRCCommand) GENERIC_IRC_COMMAND(GameOverIRCCommand) GENERIC_IRC_COMMAND(SetMapIRCCommand) diff --git a/RenX.Core/RenX_BanDatabase.cpp b/RenX.Core/RenX_BanDatabase.cpp index b95553a..07283cd 100644 --- a/RenX.Core/RenX_BanDatabase.cpp +++ b/RenX.Core/RenX_BanDatabase.cpp @@ -250,10 +250,10 @@ const Jupiter::ArrayList &RenX::BanDatabase::getEntrie return RenX::BanDatabase::entries; } -RenX::BanDatabase::BanDatabase() +bool RenX::BanDatabase::initialize() { - RenX::BanDatabase::filename = Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("RenX"), STRING_LITERAL_AS_REFERENCE("BanDB"), STRING_LITERAL_AS_REFERENCE("Bans.db")); - this->process_file(filename); + RenX::BanDatabase::filename = RenX::getCore()->getConfig().get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("BanDB"), STRING_LITERAL_AS_REFERENCE("Bans.db")); + return this->process_file(filename); } RenX::BanDatabase::~BanDatabase() diff --git a/RenX.Core/RenX_BanDatabase.h b/RenX.Core/RenX_BanDatabase.h index 2f2ef6a..6760e0e 100644 --- a/RenX.Core/RenX_BanDatabase.h +++ b/RenX.Core/RenX_BanDatabase.h @@ -207,7 +207,7 @@ namespace RenX */ const Jupiter::ArrayList &getEntries() const; - BanDatabase(); + virtual bool initialize(); ~BanDatabase(); private: diff --git a/RenX.Core/RenX_Core.cpp b/RenX.Core/RenX_Core.cpp index 6ab3069..c2a8f7c 100644 --- a/RenX.Core/RenX_Core.cpp +++ b/RenX.Core/RenX_Core.cpp @@ -26,6 +26,9 @@ #include "RenX_Functions.h" #include "RenX_GameCommand.h" #include "RenX_Plugin.h" +#include "RenX_BanDatabase.h" +#include "RenX_ExemptionDatabase.h" +#include "RenX_Tags.h" RenX::Core pluginInstance; RenX::Core *RenXInstance = &pluginInstance; @@ -35,12 +38,16 @@ RenX::Core *RenX::getCore() return &pluginInstance; } -void RenX::Core::init() +bool RenX::Core::initialize() { - const Jupiter::ReadableString &serverList = Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("RenX"), STRING_LITERAL_AS_REFERENCE("Servers")); - RenX::Core::translationsFile.readFile(Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("RenX"), STRING_LITERAL_AS_REFERENCE("TranslationsFile"), STRING_LITERAL_AS_REFERENCE("Translations.ini"))); + RenX::banDatabase->initialize(); + RenX::exemptionDatabase->initialize(); + RenX::tags->initialize(); + + const Jupiter::ReadableString &serverList = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Servers")); + RenX::Core::translationsFile.readFile(this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("TranslationsFile"), STRING_LITERAL_AS_REFERENCE("Translations.ini"))); RenX::initTranslations(RenX::Core::translationsFile); - RenX::Core::commandsFile.readFile(Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("RenX"), STRING_LITERAL_AS_REFERENCE("CommandsFile"), STRING_LITERAL_AS_REFERENCE("RenXGameCommands.ini"))); + RenX::Core::commandsFile.readFile(this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("CommandsFile"), STRING_LITERAL_AS_REFERENCE("RenXGameCommands.ini"))); unsigned int wc = serverList.wordCount(WHITESPACE); @@ -56,6 +63,8 @@ void RenX::Core::init() } else RenX::Core::addServer(server); } + + return true; } RenX::Core::~Core() @@ -184,17 +193,10 @@ extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin() return &pluginInstance; } -// Load - -extern "C" __declspec(dllexport) bool load(void) -{ - pluginInstance.init(); - return true; -} - // Unload extern "C" __declspec(dllexport) void unload(void) { - while (pluginInstance.getPlugins()->size() > 0) freePlugin(pluginInstance.getPlugins()->remove(0)); + while (pluginInstance.getPlugins()->size() > 0) + Jupiter::Plugin::free(pluginInstance.getPlugins()->remove(0)); } diff --git a/RenX.Core/RenX_Core.h b/RenX.Core/RenX_Core.h index 90199c7..d9fd189 100644 --- a/RenX.Core/RenX_Core.h +++ b/RenX.Core/RenX_Core.h @@ -60,12 +60,11 @@ namespace RenX virtual int think(); /** - * @brief Returns the name of the plugin. - * @see Jupiter::Plugin::getName(). + * @brief Initializes RenX.Core * - * @return Name of the plugin in a string. + * @return True. */ - const Jupiter::ReadableString &getName() override { return name; } + virtual bool initialize() override; /** * @brief Sends a command to all servers of a specific type. @@ -190,7 +189,6 @@ namespace RenX private: /** Inaccessible private members */ - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Core"); Jupiter::ArrayList servers; Jupiter::ArrayList plugins; Jupiter::INIFile translationsFile; diff --git a/RenX.Core/RenX_ExemptionDatabase.cpp b/RenX.Core/RenX_ExemptionDatabase.cpp index d55cca2..1362573 100644 --- a/RenX.Core/RenX_ExemptionDatabase.cpp +++ b/RenX.Core/RenX_ExemptionDatabase.cpp @@ -185,10 +185,10 @@ const Jupiter::ArrayList &RenX::ExemptionDatabas return RenX::ExemptionDatabase::entries; } -RenX::ExemptionDatabase::ExemptionDatabase() +bool RenX::ExemptionDatabase::initialize() { - RenX::ExemptionDatabase::filename = Jupiter::IRC::Client::Config->get(STRING_LITERAL_AS_REFERENCE("RenX"), STRING_LITERAL_AS_REFERENCE("ExemptionDB"), STRING_LITERAL_AS_REFERENCE("Exemptions.db")); - this->process_file(filename); + RenX::ExemptionDatabase::filename = RenX::getCore()->getConfig().get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ExemptionDB"), STRING_LITERAL_AS_REFERENCE("Exemptions.db")); + return this->process_file(filename); } RenX::ExemptionDatabase::~ExemptionDatabase() diff --git a/RenX.Core/RenX_ExemptionDatabase.h b/RenX.Core/RenX_ExemptionDatabase.h index ca6566f..655c5ed 100644 --- a/RenX.Core/RenX_ExemptionDatabase.h +++ b/RenX.Core/RenX_ExemptionDatabase.h @@ -182,7 +182,7 @@ namespace RenX */ const Jupiter::ArrayList &getEntries() const; - ExemptionDatabase(); + virtual bool initialize(); ~ExemptionDatabase(); private: diff --git a/RenX.Core/RenX_Server.cpp b/RenX.Core/RenX_Server.cpp index 5424611..53aecc8 100644 --- a/RenX.Core/RenX_Server.cpp +++ b/RenX.Core/RenX_Server.cpp @@ -164,7 +164,7 @@ int RenX::Server::OnRehash() unsigned short oldPort = RenX::Server::port; int oldSteamFormat = RenX::Server::steamFormat; RenX::Server::commands.emptyAndDelete(); - RenX::Server::init(); + RenX::Server::init(*RenX::getCore()->getConfig().getSection(RenX::Server::configSection)); if (RenX::Server::port == 0 || RenX::Server::hostname.isNotEmpty()) { RenX::Server::hostname = oldHostname; @@ -917,13 +917,6 @@ const Jupiter::ReadableString &RenX::Server::getRules() const return RenX::Server::rules; } -void RenX::Server::setRules(const Jupiter::ReadableString &rules) -{ - RenX::Server::rules = rules; - Jupiter::IRC::Client::Config->set(RenX::Server::configSection, "Rules"_jrs, rules); - RenX::Server::sendMessage(Jupiter::StringS::Format("NOTICE: The rules have been modified! Rules: %.*s", rules.size(), rules.ptr())); -} - const Jupiter::ReadableString &RenX::Server::getHostname() const { return RenX::Server::hostname; @@ -3338,43 +3331,43 @@ RenX::Server::Server(const Jupiter::ReadableString &configurationSection) { RenX::Server::configSection = configurationSection; RenX::Server::calc_uuid = RenX::default_uuid_func; - init(); + init(*RenX::getCore()->getConfig().getSection(RenX::Server::configSection)); Jupiter::ArrayList &xPlugins = *RenX::getCore()->getPlugins(); for (size_t i = 0; i < xPlugins.size(); i++) xPlugins.get(i)->RenX_OnServerCreate(this); } -void RenX::Server::init() +void RenX::Server::init(const Jupiter::INIFile::Section &config) { - RenX::Server::hostname = Jupiter::IRC::Client::Config->get(RenX::Server::configSection, "Hostname"_jrs, "localhost"_jrs); - RenX::Server::port = static_cast(Jupiter::IRC::Client::Config->getInt(RenX::Server::configSection, "Port"_jrs, 7777)); - RenX::Server::clientHostname = Jupiter::IRC::Client::Config->get(RenX::Server::configSection, "ClientAddress"_jrs); - RenX::Server::pass = Jupiter::IRC::Client::Config->get(RenX::Server::configSection, "Password"_jrs, "renx"_jrs); + RenX::Server::hostname = config.get("Hostname"_jrs, "localhost"_jrs); + RenX::Server::port = static_cast(config.getInt("Port"_jrs, 7777)); + RenX::Server::clientHostname = config.get("ClientAddress"_jrs); + RenX::Server::pass = config.get("Password"_jrs, "renx"_jrs); - RenX::Server::logChanType = Jupiter::IRC::Client::Config->getShort(RenX::Server::configSection, "ChanType"_jrs); - RenX::Server::adminLogChanType = Jupiter::IRC::Client::Config->getShort(RenX::Server::configSection, "AdminChanType"_jrs); + RenX::Server::logChanType = config.getShort("ChanType"_jrs); + RenX::Server::adminLogChanType = config.getShort("AdminChanType"_jrs); - RenX::Server::setCommandPrefix(Jupiter::IRC::Client::Config->get(RenX::Server::configSection, "CommandPrefix"_jrs)); - RenX::Server::setPrefix(Jupiter::IRC::Client::Config->get(RenX::Server::configSection, "IRCPrefix"_jrs)); + RenX::Server::setCommandPrefix(config.get("CommandPrefix"_jrs)); + RenX::Server::setPrefix(config.get("IRCPrefix"_jrs)); - RenX::Server::ban_from_str = Jupiter::IRC::Client::Config->get(RenX::Server::configSection, "BanFromStr"_jrs, "the server"_jrs); - RenX::Server::rules = Jupiter::IRC::Client::Config->get(RenX::Server::configSection, "Rules"_jrs, "Anarchy!"_jrs); - RenX::Server::delay = std::chrono::milliseconds(Jupiter::IRC::Client::Config->getInt(RenX::Server::configSection, "ReconnectDelay"_jrs, 10000)); - RenX::Server::maxAttempts = Jupiter::IRC::Client::Config->getInt(RenX::Server::configSection, "MaxReconnectAttempts"_jrs, -1); - RenX::Server::rconBan = Jupiter::IRC::Client::Config->getBool(RenX::Server::configSection, "RCONBan"_jrs, false); - RenX::Server::localSteamBan = Jupiter::IRC::Client::Config->getBool(RenX::Server::configSection, "LocalSteamBan"_jrs, true); - RenX::Server::localIPBan = Jupiter::IRC::Client::Config->getBool(RenX::Server::configSection, "LocalIPBan"_jrs, true); - RenX::Server::localHWIDBan = Jupiter::IRC::Client::Config->getBool(RenX::Server::configSection, "LocalHWIDBan"_jrs, true); - RenX::Server::localRDNSBan = Jupiter::IRC::Client::Config->getBool(RenX::Server::configSection, "LocalRDNSBan"_jrs, false); - RenX::Server::localNameBan = Jupiter::IRC::Client::Config->getBool(RenX::Server::configSection, "LocalNameBan"_jrs, false); + RenX::Server::ban_from_str = config.get("BanFromStr"_jrs, "the server"_jrs); + RenX::Server::rules = config.get("Rules"_jrs, "Anarchy!"_jrs); + RenX::Server::delay = std::chrono::milliseconds(config.getInt("ReconnectDelay"_jrs, 10000)); + RenX::Server::maxAttempts = config.getInt("MaxReconnectAttempts"_jrs, -1); + RenX::Server::rconBan = config.getBool("RCONBan"_jrs, false); + RenX::Server::localSteamBan = config.getBool("LocalSteamBan"_jrs, true); + RenX::Server::localIPBan = config.getBool("LocalIPBan"_jrs, true); + RenX::Server::localHWIDBan = config.getBool("LocalHWIDBan"_jrs, true); + RenX::Server::localRDNSBan = config.getBool("LocalRDNSBan"_jrs, false); + RenX::Server::localNameBan = config.getBool("LocalNameBan"_jrs, false); RenX::Server::localBan = RenX::Server::localIPBan || RenX::Server::localRDNSBan || RenX::Server::localSteamBan || RenX::Server::localNameBan; - RenX::Server::steamFormat = Jupiter::IRC::Client::Config->getInt(RenX::Server::configSection, "SteamFormat"_jrs, 16); - RenX::Server::neverSay = Jupiter::IRC::Client::Config->getBool(RenX::Server::configSection, "NeverSay"_jrs, false); - RenX::Server::resolve_player_rdns = Jupiter::IRC::Client::Config->getBool(RenX::Server::configSection, "ResolvePlayerRDNS"_jrs, true); - RenX::Server::clientUpdateRate = std::chrono::milliseconds(Jupiter::IRC::Client::Config->getInt(RenX::Server::configSection, "ClientUpdateRate"_jrs, 2500)); - RenX::Server::buildingUpdateRate = std::chrono::milliseconds(Jupiter::IRC::Client::Config->getInt(RenX::Server::configSection, "BuildingUpdateRate"_jrs, 7500)); - RenX::Server::pingRate = std::chrono::milliseconds(Jupiter::IRC::Client::Config->getInt(RenX::Server::configSection, "PingUpdateRate"_jrs, 60000)); - RenX::Server::pingTimeoutThreshold = std::chrono::milliseconds(Jupiter::IRC::Client::Config->getInt(RenX::Server::configSection, "PingTimeoutThreshold"_jrs, 10000)); + RenX::Server::steamFormat = config.getInt("SteamFormat"_jrs, 16); + RenX::Server::neverSay = config.getBool("NeverSay"_jrs, false); + RenX::Server::resolve_player_rdns = config.getBool("ResolvePlayerRDNS"_jrs, true); + RenX::Server::clientUpdateRate = std::chrono::milliseconds(config.getInt("ClientUpdateRate"_jrs, 2500)); + RenX::Server::buildingUpdateRate = std::chrono::milliseconds(config.getInt("BuildingUpdateRate"_jrs, 7500)); + RenX::Server::pingRate = std::chrono::milliseconds(config.getInt("PingUpdateRate"_jrs, 60000)); + RenX::Server::pingTimeoutThreshold = std::chrono::milliseconds(config.getInt("PingTimeoutThreshold"_jrs, 10000)); Jupiter::INIFile &commandsFile = RenX::getCore()->getCommandsFile(); RenX::Server::commandAccessLevels = commandsFile.getSection(RenX::Server::configSection); @@ -3412,8 +3405,6 @@ void RenX::Server::init() load_basic_commands(RenX::Server::configSection); load_basic_commands("Default"_jrs); - - // ADD CHECKS FOR DEFAULT BASIC COMMANDS HERE } RenX::Server::~Server() diff --git a/RenX.Core/RenX_Server.h b/RenX.Core/RenX_Server.h index 2c0d841..32c1cff 100644 --- a/RenX.Core/RenX_Server.h +++ b/RenX.Core/RenX_Server.h @@ -664,13 +664,6 @@ namespace RenX */ const Jupiter::ReadableString &getRules() const; - /** - * @brief Sets the rules of a server. - * - * @param rules Rules for the server to be used. - */ - void setRules(const Jupiter::ReadableString &rules); - /** * @brief Fetches the hostname of a server. * @@ -993,7 +986,7 @@ namespace RenX /** Private members */ private: - void init(); + void init(const Jupiter::INIFile::Section &config); /** Tracking variables */ bool gameover_when_empty = false; diff --git a/RenX.Core/RenX_Tags.cpp b/RenX.Core/RenX_Tags.cpp index 558d1c8..e93eb02 100644 --- a/RenX.Core/RenX_Tags.cpp +++ b/RenX.Core/RenX_Tags.cpp @@ -31,7 +31,7 @@ using namespace Jupiter::literals; struct TagsImp : RenX::Tags { - TagsImp(); + bool initialize(); void processTags(Jupiter::StringType &msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building); void processTags(Jupiter::StringType &msg, const RenX::LadderDatabase::Entry &entry); void sanitizeTags(Jupiter::StringType &fmt); @@ -53,17 +53,24 @@ private: } _tags; RenX::Tags *RenX::tags = &_tags; -TagsImp::TagsImp() +bool RenX::Tags::initialize() +{ + return true; +} + +bool TagsImp::initialize() { this->tagItr = 0; this->uniqueTag = "\0\0\0\0\0\0"_jrs; - const Jupiter::ReadableString &configSection = Jupiter::IRC::Client::Config->get("RenX"_jrs, "TagDefinitions"_jrs, "RenX.Tags"_jrs); - TagsImp::bar_width = Jupiter::IRC::Client::Config->getInt(configSection, "BarWidth"_jrs, 19); + const Jupiter::INIFile &config = RenX::getCore()->getConfig(); + const Jupiter::ReadableString &configSection = config.get(Jupiter::ReferenceString::empty, "TagDefinitions"_jrs, "RenX.Tags"_jrs); + + TagsImp::bar_width = config.getInt(configSection, "BarWidth"_jrs, 19); /** Global formats */ - this->dateFmt = Jupiter::IRC::Client::Config->get(configSection, "DateFormat"_jrs, "%A, %B %d, %Y"_jrs); - this->timeFmt = Jupiter::IRC::Client::Config->get(configSection, "TimeFormat"_jrs, "%H:%M:%S"_jrs);; + this->dateFmt = config.get(configSection, "DateFormat"_jrs, "%A, %B %d, %Y"_jrs); + this->timeFmt = config.get(configSection, "TimeFormat"_jrs, "%H:%M:%S"_jrs);; /** Internal message tags */ @@ -254,188 +261,190 @@ TagsImp::TagsImp() /** External (config) tags */ /** Global tags */ - this->dateTag = Jupiter::IRC::Client::Config->get(configSection, "DateTag"_jrs, "{DATE}"_jrs); - this->timeTag = Jupiter::IRC::Client::Config->get(configSection, "TimeTag"_jrs, "{TIME}"_jrs); + this->dateTag = config.get(configSection, "DateTag"_jrs, "{DATE}"_jrs); + this->timeTag = config.get(configSection, "TimeTag"_jrs, "{TIME}"_jrs); /** Server tags */ - this->rconVersionTag = Jupiter::IRC::Client::Config->get(configSection, "RCONVersionTag"_jrs, "{RVER}"_jrs); - this->gameVersionTag = Jupiter::IRC::Client::Config->get(configSection, "GameVersionTag"_jrs, "{GVER}"_jrs); - this->rulesTag = Jupiter::IRC::Client::Config->get(configSection, "RulesTag"_jrs, "{RULES}"_jrs); - this->userTag = Jupiter::IRC::Client::Config->get(configSection, "UserTag"_jrs, "{USER}"_jrs); - this->serverNameTag = Jupiter::IRC::Client::Config->get(configSection, "ServerNameTag"_jrs, "{SERVERNAME}"_jrs); - this->mapTag = Jupiter::IRC::Client::Config->get(configSection, "MapTag"_jrs, "{MAP}"_jrs); - this->mapGUIDTag = Jupiter::IRC::Client::Config->get(configSection, "MapGUIDTag"_jrs, "{MGUID}"_jrs); - this->serverHostnameTag = Jupiter::IRC::Client::Config->get(configSection, "ServerHostnameTag"_jrs, "{SERVERHOST}"_jrs); - this->serverPortTag = Jupiter::IRC::Client::Config->get(configSection, "ServerPortTag"_jrs, "{SERVERPORT}"_jrs); - this->socketHostnameTag = Jupiter::IRC::Client::Config->get(configSection, "SocketHostnameTag"_jrs, "{SOCKHOST}"_jrs); - this->socketPortTag = Jupiter::IRC::Client::Config->get(configSection, "SocketPortTag"_jrs, "{SOCKPORT}"_jrs); - this->serverPrefixTag = Jupiter::IRC::Client::Config->get(configSection, "ServerPrefixTag"_jrs, "{SERVERPREFIX}"_jrs); + this->rconVersionTag = config.get(configSection, "RCONVersionTag"_jrs, "{RVER}"_jrs); + this->gameVersionTag = config.get(configSection, "GameVersionTag"_jrs, "{GVER}"_jrs); + this->rulesTag = config.get(configSection, "RulesTag"_jrs, "{RULES}"_jrs); + this->userTag = config.get(configSection, "UserTag"_jrs, "{USER}"_jrs); + this->serverNameTag = config.get(configSection, "ServerNameTag"_jrs, "{SERVERNAME}"_jrs); + this->mapTag = config.get(configSection, "MapTag"_jrs, "{MAP}"_jrs); + this->mapGUIDTag = config.get(configSection, "MapGUIDTag"_jrs, "{MGUID}"_jrs); + this->serverHostnameTag = config.get(configSection, "ServerHostnameTag"_jrs, "{SERVERHOST}"_jrs); + this->serverPortTag = config.get(configSection, "ServerPortTag"_jrs, "{SERVERPORT}"_jrs); + this->socketHostnameTag = config.get(configSection, "SocketHostnameTag"_jrs, "{SOCKHOST}"_jrs); + this->socketPortTag = config.get(configSection, "SocketPortTag"_jrs, "{SOCKPORT}"_jrs); + this->serverPrefixTag = config.get(configSection, "ServerPrefixTag"_jrs, "{SERVERPREFIX}"_jrs); /** Player tags */ - this->nameTag = Jupiter::IRC::Client::Config->get(configSection, "NameTag"_jrs, "{NAME}"_jrs); - this->rawNameTag = Jupiter::IRC::Client::Config->get(configSection, "RawNameTag"_jrs, "{RNAME}"_jrs); - this->ipTag = Jupiter::IRC::Client::Config->get(configSection, "IPTag"_jrs, "{IP}"_jrs); - this->hwidTag = Jupiter::IRC::Client::Config->get(configSection, "HWIDTag"_jrs, "{HWID}"_jrs); - this->rdnsTag = Jupiter::IRC::Client::Config->get(configSection, "RDNSTag"_jrs, "{RDNS}"_jrs); - this->steamTag = Jupiter::IRC::Client::Config->get(configSection, "SteamTag"_jrs, "{STEAM}"_jrs); - this->uuidTag = Jupiter::IRC::Client::Config->get(configSection, "UUIDTag"_jrs, "{UUID}"_jrs); - this->idTag = Jupiter::IRC::Client::Config->get(configSection, "IDTag"_jrs, "{ID}"_jrs); - this->characterTag = Jupiter::IRC::Client::Config->get(configSection, "CharacterTag"_jrs, "{CHAR}"_jrs); - this->vehicleTag = Jupiter::IRC::Client::Config->get(configSection, "VehicleTag"_jrs, "{VEH}"_jrs); - this->adminTag = Jupiter::IRC::Client::Config->get(configSection, "AdminTag"_jrs, "{ADMIN}"_jrs); - this->prefixTag = Jupiter::IRC::Client::Config->get(configSection, "PrefixTag"_jrs, "{PREFIX}"_jrs); - this->gamePrefixTag = Jupiter::IRC::Client::Config->get(configSection, "GamePrefixTag"_jrs, "{GPREFIX}"_jrs); - this->teamColorTag = Jupiter::IRC::Client::Config->get(configSection, "TeamColorTag"_jrs, "{TCOLOR}"_jrs); - this->teamShortTag = Jupiter::IRC::Client::Config->get(configSection, "ShortTeamTag"_jrs, "{TEAMS}"_jrs); - this->teamLongTag = Jupiter::IRC::Client::Config->get(configSection, "LongTeamTag"_jrs, "{TEAML}"_jrs); - this->pingTag = Jupiter::IRC::Client::Config->get(configSection, "PingTag"_jrs, "{PING}"_jrs); - this->scoreTag = Jupiter::IRC::Client::Config->get(configSection, "ScoreTag"_jrs, "{SCORE}"_jrs); - this->scorePerMinuteTag = Jupiter::IRC::Client::Config->get(configSection, "ScorePerMinuteTag"_jrs, "{SPM}"_jrs); - this->creditsTag = Jupiter::IRC::Client::Config->get(configSection, "CreditsTag"_jrs, "{CREDITS}"_jrs); - this->killsTag = Jupiter::IRC::Client::Config->get(configSection, "KillsTag"_jrs, "{KILLS}"_jrs); - this->deathsTag = Jupiter::IRC::Client::Config->get(configSection, "DeathsTag"_jrs, "{DEATHS}"_jrs); - this->kdrTag = Jupiter::IRC::Client::Config->get(configSection, "KDRTag"_jrs, "{KDR}"_jrs); - this->suicidesTag = Jupiter::IRC::Client::Config->get(configSection, "SuicidesTag"_jrs, "{SUICIDES}"_jrs); - this->headshotsTag = Jupiter::IRC::Client::Config->get(configSection, "HeadshotsTag"_jrs, "{HEADSHOTS}"_jrs); - this->headshotKillRatioTag = Jupiter::IRC::Client::Config->get(configSection, "HeadshotKillRatioTag"_jrs, "{HSKR}"_jrs); - this->vehicleKillsTag = Jupiter::IRC::Client::Config->get(configSection, "VehicleKillsTag"_jrs, "{VEHICLEKILLS}"_jrs); - this->buildingKillsTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingKillsTag"_jrs, "{BUILDINGKILLS}"_jrs); - this->defenceKillsTag = Jupiter::IRC::Client::Config->get(configSection, "DefenceKillsTag"_jrs, "{DEFENCEKILLS}"_jrs); - this->gameTimeTag = Jupiter::IRC::Client::Config->get(configSection, "GameTimeTag"_jrs, "{GAMETIME}"_jrs); - this->gamesTag = Jupiter::IRC::Client::Config->get(configSection, "GamesTag"_jrs, "{GAMES}"_jrs); - this->GDIGamesTag = Jupiter::IRC::Client::Config->get(configSection, "GDIGamesTag"_jrs, "{GDIGAMES}"_jrs); - this->NodGamesTag = Jupiter::IRC::Client::Config->get(configSection, "NodGamesTag"_jrs, "{NODGAMES}"_jrs); - this->winsTag = Jupiter::IRC::Client::Config->get(configSection, "WinsTag"_jrs, "{WINS}"_jrs); - this->GDIWinsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIWinsTag"_jrs, "{GDIWINS}"_jrs); - this->NodWinsTag = Jupiter::IRC::Client::Config->get(configSection, "NodWinsTag"_jrs, "{NODWINS}"_jrs); - this->tiesTag = Jupiter::IRC::Client::Config->get(configSection, "TiesTag"_jrs, "{TIES}"_jrs); - this->lossesTag = Jupiter::IRC::Client::Config->get(configSection, "LossesTag"_jrs, "{LOSSES}"_jrs); - this->GDILossesTag = Jupiter::IRC::Client::Config->get(configSection, "GDILossesTag"_jrs, "{GDILOSSES}"_jrs); - this->NodLossesTag = Jupiter::IRC::Client::Config->get(configSection, "NodLossesTag"_jrs, "{NODLOSSES}"_jrs); - this->winLossRatioTag = Jupiter::IRC::Client::Config->get(configSection, "WinLossRatioTag"_jrs, "{WLR}"_jrs); - this->GDIWinLossRatioTag = Jupiter::IRC::Client::Config->get(configSection, "GDIWinLossRatioTag"_jrs, "{GDIWLR}"_jrs); - this->NodWinLossRatioTag = Jupiter::IRC::Client::Config->get(configSection, "NodWinLossRatioTag"_jrs, "{NODWLR}"_jrs); - this->beaconPlacementsTag = Jupiter::IRC::Client::Config->get(configSection, "BeaconPlacementsTag"_jrs, "{BEACONPLACEMENTS}"_jrs); - this->beaconDisarmsTag = Jupiter::IRC::Client::Config->get(configSection, "BeaconDisarmsTag"_jrs, "{BEACONDISARMS}"_jrs); - this->proxyPlacementsTag = Jupiter::IRC::Client::Config->get(configSection, "ProxyPlacementsTag"_jrs, "{PROXYPLACEMENTS}"_jrs); - this->proxyDisarmsTag = Jupiter::IRC::Client::Config->get(configSection, "ProxyDisarmsTag"_jrs, "{PROXYDISARMS}"_jrs); - this->capturesTag = Jupiter::IRC::Client::Config->get(configSection, "CapturesTag"_jrs, "{CAPTURES}"_jrs); - this->stealsTag = Jupiter::IRC::Client::Config->get(configSection, "StealsTag"_jrs, "{STEALS}"_jrs); - this->stolenTag = Jupiter::IRC::Client::Config->get(configSection, "StolenTag"_jrs, "{STOLEN}"_jrs); - this->accessTag = Jupiter::IRC::Client::Config->get(configSection, "AccessTag"_jrs, "{ACCESS}"_jrs); + this->nameTag = config.get(configSection, "NameTag"_jrs, "{NAME}"_jrs); + this->rawNameTag = config.get(configSection, "RawNameTag"_jrs, "{RNAME}"_jrs); + this->ipTag = config.get(configSection, "IPTag"_jrs, "{IP}"_jrs); + this->hwidTag = config.get(configSection, "HWIDTag"_jrs, "{HWID}"_jrs); + this->rdnsTag = config.get(configSection, "RDNSTag"_jrs, "{RDNS}"_jrs); + this->steamTag = config.get(configSection, "SteamTag"_jrs, "{STEAM}"_jrs); + this->uuidTag = config.get(configSection, "UUIDTag"_jrs, "{UUID}"_jrs); + this->idTag = config.get(configSection, "IDTag"_jrs, "{ID}"_jrs); + this->characterTag = config.get(configSection, "CharacterTag"_jrs, "{CHAR}"_jrs); + this->vehicleTag = config.get(configSection, "VehicleTag"_jrs, "{VEH}"_jrs); + this->adminTag = config.get(configSection, "AdminTag"_jrs, "{ADMIN}"_jrs); + this->prefixTag = config.get(configSection, "PrefixTag"_jrs, "{PREFIX}"_jrs); + this->gamePrefixTag = config.get(configSection, "GamePrefixTag"_jrs, "{GPREFIX}"_jrs); + this->teamColorTag = config.get(configSection, "TeamColorTag"_jrs, "{TCOLOR}"_jrs); + this->teamShortTag = config.get(configSection, "ShortTeamTag"_jrs, "{TEAMS}"_jrs); + this->teamLongTag = config.get(configSection, "LongTeamTag"_jrs, "{TEAML}"_jrs); + this->pingTag = config.get(configSection, "PingTag"_jrs, "{PING}"_jrs); + this->scoreTag = config.get(configSection, "ScoreTag"_jrs, "{SCORE}"_jrs); + this->scorePerMinuteTag = config.get(configSection, "ScorePerMinuteTag"_jrs, "{SPM}"_jrs); + this->creditsTag = config.get(configSection, "CreditsTag"_jrs, "{CREDITS}"_jrs); + this->killsTag = config.get(configSection, "KillsTag"_jrs, "{KILLS}"_jrs); + this->deathsTag = config.get(configSection, "DeathsTag"_jrs, "{DEATHS}"_jrs); + this->kdrTag = config.get(configSection, "KDRTag"_jrs, "{KDR}"_jrs); + this->suicidesTag = config.get(configSection, "SuicidesTag"_jrs, "{SUICIDES}"_jrs); + this->headshotsTag = config.get(configSection, "HeadshotsTag"_jrs, "{HEADSHOTS}"_jrs); + this->headshotKillRatioTag = config.get(configSection, "HeadshotKillRatioTag"_jrs, "{HSKR}"_jrs); + this->vehicleKillsTag = config.get(configSection, "VehicleKillsTag"_jrs, "{VEHICLEKILLS}"_jrs); + this->buildingKillsTag = config.get(configSection, "BuildingKillsTag"_jrs, "{BUILDINGKILLS}"_jrs); + this->defenceKillsTag = config.get(configSection, "DefenceKillsTag"_jrs, "{DEFENCEKILLS}"_jrs); + this->gameTimeTag = config.get(configSection, "GameTimeTag"_jrs, "{GAMETIME}"_jrs); + this->gamesTag = config.get(configSection, "GamesTag"_jrs, "{GAMES}"_jrs); + this->GDIGamesTag = config.get(configSection, "GDIGamesTag"_jrs, "{GDIGAMES}"_jrs); + this->NodGamesTag = config.get(configSection, "NodGamesTag"_jrs, "{NODGAMES}"_jrs); + this->winsTag = config.get(configSection, "WinsTag"_jrs, "{WINS}"_jrs); + this->GDIWinsTag = config.get(configSection, "GDIWinsTag"_jrs, "{GDIWINS}"_jrs); + this->NodWinsTag = config.get(configSection, "NodWinsTag"_jrs, "{NODWINS}"_jrs); + this->tiesTag = config.get(configSection, "TiesTag"_jrs, "{TIES}"_jrs); + this->lossesTag = config.get(configSection, "LossesTag"_jrs, "{LOSSES}"_jrs); + this->GDILossesTag = config.get(configSection, "GDILossesTag"_jrs, "{GDILOSSES}"_jrs); + this->NodLossesTag = config.get(configSection, "NodLossesTag"_jrs, "{NODLOSSES}"_jrs); + this->winLossRatioTag = config.get(configSection, "WinLossRatioTag"_jrs, "{WLR}"_jrs); + this->GDIWinLossRatioTag = config.get(configSection, "GDIWinLossRatioTag"_jrs, "{GDIWLR}"_jrs); + this->NodWinLossRatioTag = config.get(configSection, "NodWinLossRatioTag"_jrs, "{NODWLR}"_jrs); + this->beaconPlacementsTag = config.get(configSection, "BeaconPlacementsTag"_jrs, "{BEACONPLACEMENTS}"_jrs); + this->beaconDisarmsTag = config.get(configSection, "BeaconDisarmsTag"_jrs, "{BEACONDISARMS}"_jrs); + this->proxyPlacementsTag = config.get(configSection, "ProxyPlacementsTag"_jrs, "{PROXYPLACEMENTS}"_jrs); + this->proxyDisarmsTag = config.get(configSection, "ProxyDisarmsTag"_jrs, "{PROXYDISARMS}"_jrs); + this->capturesTag = config.get(configSection, "CapturesTag"_jrs, "{CAPTURES}"_jrs); + this->stealsTag = config.get(configSection, "StealsTag"_jrs, "{STEALS}"_jrs); + this->stolenTag = config.get(configSection, "StolenTag"_jrs, "{STOLEN}"_jrs); + this->accessTag = config.get(configSection, "AccessTag"_jrs, "{ACCESS}"_jrs); /** Victim player tags */ - this->victimNameTag = Jupiter::IRC::Client::Config->get(configSection, "VictimNameTag"_jrs, "{VNAME}"_jrs); - this->victimRawNameTag = Jupiter::IRC::Client::Config->get(configSection, "VictimRawNameTag"_jrs, "{VRNAME}"_jrs); - this->victimIPTag = Jupiter::IRC::Client::Config->get(configSection, "VictimIPTag"_jrs, "{VIP}"_jrs); - this->victimHWIDTag = Jupiter::IRC::Client::Config->get(configSection, "VictimHWIDTag"_jrs, "{VHWID}"_jrs); - this->victimRDNSTag = Jupiter::IRC::Client::Config->get(configSection, "VictimRDNSTag"_jrs, "{VRDNS}"_jrs); - this->victimSteamTag = Jupiter::IRC::Client::Config->get(configSection, "VictimSteamTag"_jrs, "{VSTEAM}"_jrs); - this->victimUUIDTag = Jupiter::IRC::Client::Config->get(configSection, "VictimUUIDTag"_jrs, "{VUUID}"_jrs); - this->victimIDTag = Jupiter::IRC::Client::Config->get(configSection, "VictimIDTag"_jrs, "{VID}"_jrs); - this->victimCharacterTag = Jupiter::IRC::Client::Config->get(configSection, "VictimCharacterTag"_jrs, "{VCHAR}"_jrs); - this->victimVehicleTag = Jupiter::IRC::Client::Config->get(configSection, "VictimVehicleTag"_jrs, "{VVEH}"_jrs); - this->victimAdminTag = Jupiter::IRC::Client::Config->get(configSection, "VictimAdminTag"_jrs, "{VADMIN}"_jrs); - this->victimPrefixTag = Jupiter::IRC::Client::Config->get(configSection, "VictimPrefixTag"_jrs, "{VPREFIX}"_jrs); - this->victimGamePrefixTag = Jupiter::IRC::Client::Config->get(configSection, "VictimGamePrefixTag"_jrs, "{VGPREFIX}"_jrs); - this->victimTeamColorTag = Jupiter::IRC::Client::Config->get(configSection, "VictimTeamColorTag"_jrs, "{VTCOLOR}"_jrs); - this->victimTeamShortTag = Jupiter::IRC::Client::Config->get(configSection, "VictimShortTeamTag"_jrs, "{VTEAMS}"_jrs); - this->victimTeamLongTag = Jupiter::IRC::Client::Config->get(configSection, "VictimLongTeamTag"_jrs, "{VTEAML}"_jrs); - this->victimPingTag = Jupiter::IRC::Client::Config->get(configSection, "VictimPingTag"_jrs, "{VPING}"_jrs); - this->victimScoreTag = Jupiter::IRC::Client::Config->get(configSection, "VictimScoreTag"_jrs, "{VSCORE}"_jrs); - this->victimScorePerMinuteTag = Jupiter::IRC::Client::Config->get(configSection, "VictimScorePerMinuteTag"_jrs, "{VSPM}"_jrs); - this->victimCreditsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimCreditsTag"_jrs, "{VCREDITS}"_jrs); - this->victimKillsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimKillsTag"_jrs, "{VKILLS}"_jrs); - this->victimDeathsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimDeathsTag"_jrs, "{VDEATHS}"_jrs); - this->victimKDRTag = Jupiter::IRC::Client::Config->get(configSection, "VictimKDRTag"_jrs, "{VKDR}"_jrs); - this->victimSuicidesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimSuicidesTag"_jrs, "{VSUICIDES}"_jrs); - this->victimHeadshotsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimHeadshotsTag"_jrs, "{VHEADSHOTS}"_jrs); - this->victimHeadshotKillRatioTag = Jupiter::IRC::Client::Config->get(configSection, "VictimHeadshotKillRatioTag"_jrs, "{VHSKR}"_jrs); - this->victimVehicleKillsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimVehicleKillsTag"_jrs, "{VVEHICLEKILLS}"_jrs); - this->victimBuildingKillsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimBuildingKillsTag"_jrs, "{VBUILDINGKILLS}"_jrs); - this->victimDefenceKillsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimDefenceKillsTag"_jrs, "{VDEFENCEKILLS}"_jrs); - this->victimGameTimeTag = Jupiter::IRC::Client::Config->get(configSection, "VictimGameTimeTag"_jrs, "{VGAMETIME}"_jrs); - this->victimGamesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimGamesTag"_jrs, "{VGAMES}"_jrs); - this->victimGDIGamesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimGDIGamesTag"_jrs, "{VGDIGAMES}"_jrs); - this->victimNodGamesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimNodGamesTag"_jrs, "{VNODGAMES}"_jrs); - this->victimWinsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimWinsTag"_jrs, "{VWINS}"_jrs); - this->victimGDIWinsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimGDIWinsTag"_jrs, "{VGDIWINS}"_jrs); - this->victimNodWinsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimNodWinsTag"_jrs, "{VNODWINS}"_jrs); - this->victimTiesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimTiesTag"_jrs, "{VTIES}"_jrs); - this->victimLossesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimLossesTag"_jrs, "{VLOSSES}"_jrs); - this->victimGDILossesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimGDILossesTag"_jrs, "{VGDILOSSES}"_jrs); - this->victimNodLossesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimNodLossesTag"_jrs, "{VNODLOSSES}"_jrs); - this->victimWinLossRatioTag = Jupiter::IRC::Client::Config->get(configSection, "WinLossRatioTag"_jrs, "{WLR}"_jrs); - this->victimGDIWinLossRatioTag = Jupiter::IRC::Client::Config->get(configSection, "GDIWinLossRatioTag"_jrs, "{VGDIWLR}"_jrs); - this->victimNodWinLossRatioTag = Jupiter::IRC::Client::Config->get(configSection, "NodWinLossRatioTag"_jrs, "{VNODWLR}"_jrs); - this->victimBeaconPlacementsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimBeaconPlacementsTag"_jrs, "{VBEACONPLACEMENTS}"_jrs); - this->victimBeaconDisarmsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimBeaconDisarmsTag"_jrs, "{VBEACONDISARMS}"_jrs); - this->victimProxyPlacementsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimProxyPlacementsTag"_jrs, "{VPROXYPLACEMENTS}"_jrs); - this->victimProxyDisarmsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimProxyDisarmsTag"_jrs, "{VPROXYDISARMS}"_jrs); - this->victimCapturesTag = Jupiter::IRC::Client::Config->get(configSection, "VictimCapturesTag"_jrs, "{VCAPTURES}"_jrs); - this->victimStealsTag = Jupiter::IRC::Client::Config->get(configSection, "VictimStealsTag"_jrs, "{VSTEALS}"_jrs); - this->victimStolenTag = Jupiter::IRC::Client::Config->get(configSection, "VictimStolenTag"_jrs, "{VSTOLEN}"_jrs); - this->victimAccessTag = Jupiter::IRC::Client::Config->get(configSection, "VictimAccessTag"_jrs, "{VACCESS}"_jrs); + this->victimNameTag = config.get(configSection, "VictimNameTag"_jrs, "{VNAME}"_jrs); + this->victimRawNameTag = config.get(configSection, "VictimRawNameTag"_jrs, "{VRNAME}"_jrs); + this->victimIPTag = config.get(configSection, "VictimIPTag"_jrs, "{VIP}"_jrs); + this->victimHWIDTag = config.get(configSection, "VictimHWIDTag"_jrs, "{VHWID}"_jrs); + this->victimRDNSTag = config.get(configSection, "VictimRDNSTag"_jrs, "{VRDNS}"_jrs); + this->victimSteamTag = config.get(configSection, "VictimSteamTag"_jrs, "{VSTEAM}"_jrs); + this->victimUUIDTag = config.get(configSection, "VictimUUIDTag"_jrs, "{VUUID}"_jrs); + this->victimIDTag = config.get(configSection, "VictimIDTag"_jrs, "{VID}"_jrs); + this->victimCharacterTag = config.get(configSection, "VictimCharacterTag"_jrs, "{VCHAR}"_jrs); + this->victimVehicleTag = config.get(configSection, "VictimVehicleTag"_jrs, "{VVEH}"_jrs); + this->victimAdminTag = config.get(configSection, "VictimAdminTag"_jrs, "{VADMIN}"_jrs); + this->victimPrefixTag = config.get(configSection, "VictimPrefixTag"_jrs, "{VPREFIX}"_jrs); + this->victimGamePrefixTag = config.get(configSection, "VictimGamePrefixTag"_jrs, "{VGPREFIX}"_jrs); + this->victimTeamColorTag = config.get(configSection, "VictimTeamColorTag"_jrs, "{VTCOLOR}"_jrs); + this->victimTeamShortTag = config.get(configSection, "VictimShortTeamTag"_jrs, "{VTEAMS}"_jrs); + this->victimTeamLongTag = config.get(configSection, "VictimLongTeamTag"_jrs, "{VTEAML}"_jrs); + this->victimPingTag = config.get(configSection, "VictimPingTag"_jrs, "{VPING}"_jrs); + this->victimScoreTag = config.get(configSection, "VictimScoreTag"_jrs, "{VSCORE}"_jrs); + this->victimScorePerMinuteTag = config.get(configSection, "VictimScorePerMinuteTag"_jrs, "{VSPM}"_jrs); + this->victimCreditsTag = config.get(configSection, "VictimCreditsTag"_jrs, "{VCREDITS}"_jrs); + this->victimKillsTag = config.get(configSection, "VictimKillsTag"_jrs, "{VKILLS}"_jrs); + this->victimDeathsTag = config.get(configSection, "VictimDeathsTag"_jrs, "{VDEATHS}"_jrs); + this->victimKDRTag = config.get(configSection, "VictimKDRTag"_jrs, "{VKDR}"_jrs); + this->victimSuicidesTag = config.get(configSection, "VictimSuicidesTag"_jrs, "{VSUICIDES}"_jrs); + this->victimHeadshotsTag = config.get(configSection, "VictimHeadshotsTag"_jrs, "{VHEADSHOTS}"_jrs); + this->victimHeadshotKillRatioTag = config.get(configSection, "VictimHeadshotKillRatioTag"_jrs, "{VHSKR}"_jrs); + this->victimVehicleKillsTag = config.get(configSection, "VictimVehicleKillsTag"_jrs, "{VVEHICLEKILLS}"_jrs); + this->victimBuildingKillsTag = config.get(configSection, "VictimBuildingKillsTag"_jrs, "{VBUILDINGKILLS}"_jrs); + this->victimDefenceKillsTag = config.get(configSection, "VictimDefenceKillsTag"_jrs, "{VDEFENCEKILLS}"_jrs); + this->victimGameTimeTag = config.get(configSection, "VictimGameTimeTag"_jrs, "{VGAMETIME}"_jrs); + this->victimGamesTag = config.get(configSection, "VictimGamesTag"_jrs, "{VGAMES}"_jrs); + this->victimGDIGamesTag = config.get(configSection, "VictimGDIGamesTag"_jrs, "{VGDIGAMES}"_jrs); + this->victimNodGamesTag = config.get(configSection, "VictimNodGamesTag"_jrs, "{VNODGAMES}"_jrs); + this->victimWinsTag = config.get(configSection, "VictimWinsTag"_jrs, "{VWINS}"_jrs); + this->victimGDIWinsTag = config.get(configSection, "VictimGDIWinsTag"_jrs, "{VGDIWINS}"_jrs); + this->victimNodWinsTag = config.get(configSection, "VictimNodWinsTag"_jrs, "{VNODWINS}"_jrs); + this->victimTiesTag = config.get(configSection, "VictimTiesTag"_jrs, "{VTIES}"_jrs); + this->victimLossesTag = config.get(configSection, "VictimLossesTag"_jrs, "{VLOSSES}"_jrs); + this->victimGDILossesTag = config.get(configSection, "VictimGDILossesTag"_jrs, "{VGDILOSSES}"_jrs); + this->victimNodLossesTag = config.get(configSection, "VictimNodLossesTag"_jrs, "{VNODLOSSES}"_jrs); + this->victimWinLossRatioTag = config.get(configSection, "VictimWinLossRatioTag"_jrs, "{VWLR}"_jrs); + this->victimGDIWinLossRatioTag = config.get(configSection, "VictimGDIWinLossRatioTag"_jrs, "{VGDIWLR}"_jrs); + this->victimNodWinLossRatioTag = config.get(configSection, "VictimNodWinLossRatioTag"_jrs, "{VNODWLR}"_jrs); + this->victimBeaconPlacementsTag = config.get(configSection, "VictimBeaconPlacementsTag"_jrs, "{VBEACONPLACEMENTS}"_jrs); + this->victimBeaconDisarmsTag = config.get(configSection, "VictimBeaconDisarmsTag"_jrs, "{VBEACONDISARMS}"_jrs); + this->victimProxyPlacementsTag = config.get(configSection, "VictimProxyPlacementsTag"_jrs, "{VPROXYPLACEMENTS}"_jrs); + this->victimProxyDisarmsTag = config.get(configSection, "VictimProxyDisarmsTag"_jrs, "{VPROXYDISARMS}"_jrs); + this->victimCapturesTag = config.get(configSection, "VictimCapturesTag"_jrs, "{VCAPTURES}"_jrs); + this->victimStealsTag = config.get(configSection, "VictimStealsTag"_jrs, "{VSTEALS}"_jrs); + this->victimStolenTag = config.get(configSection, "VictimStolenTag"_jrs, "{VSTOLEN}"_jrs); + this->victimAccessTag = config.get(configSection, "VictimAccessTag"_jrs, "{VACCESS}"_jrs); /** Building tags */ - this->buildingNameTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingNameTag"_jrs, "{BNAME}"_jrs); - this->buildingRawNameTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingRawNameTag"_jrs, "{BRNAME}"_jrs); - this->buildingHealthTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingHealthTag"_jrs, "{BHEALTH}"_jrs); - this->buildingMaxHealthTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingMaxHealthTag"_jrs, "{BMHEALTH}"_jrs); - this->buildingHealthPercentageTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingHealthPercentageTag"_jrs, "{BHP}"_jrs); - this->buildingArmorTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingArmorTag"_jrs, "{BARMOR}"_jrs); - this->buildingMaxArmorTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingMaxArmorTag"_jrs, "{BMARMOR}"_jrs); - this->buildingArmorPercentageTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingArmorPercentageTag"_jrs, "{BAP}"_jrs); - this->buildingDurabilityTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingDurabilityTag"_jrs, "{BDURABILITY}"_jrs); - this->buildingMaxDurabilityTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingMaxDurabilityTag"_jrs, "{BMDURABILITY}"_jrs); - this->buildingDurabilityPercentageTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingDurabilityPercentageTag"_jrs, "{BDP}"_jrs); - this->buildingTeamColorTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingTeamColorTag"_jrs, "{BCOLOR}"_jrs); - this->buildingTeamShortTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingShortTeamTag"_jrs, "{BTEAMS}"_jrs); - this->buildingTeamLongTag = Jupiter::IRC::Client::Config->get(configSection, "BuildingLongTeamTag"_jrs, "{BTEAML}"_jrs); + this->buildingNameTag = config.get(configSection, "BuildingNameTag"_jrs, "{BNAME}"_jrs); + this->buildingRawNameTag = config.get(configSection, "BuildingRawNameTag"_jrs, "{BRNAME}"_jrs); + this->buildingHealthTag = config.get(configSection, "BuildingHealthTag"_jrs, "{BHEALTH}"_jrs); + this->buildingMaxHealthTag = config.get(configSection, "BuildingMaxHealthTag"_jrs, "{BMHEALTH}"_jrs); + this->buildingHealthPercentageTag = config.get(configSection, "BuildingHealthPercentageTag"_jrs, "{BHP}"_jrs); + this->buildingArmorTag = config.get(configSection, "BuildingArmorTag"_jrs, "{BARMOR}"_jrs); + this->buildingMaxArmorTag = config.get(configSection, "BuildingMaxArmorTag"_jrs, "{BMARMOR}"_jrs); + this->buildingArmorPercentageTag = config.get(configSection, "BuildingArmorPercentageTag"_jrs, "{BAP}"_jrs); + this->buildingDurabilityTag = config.get(configSection, "BuildingDurabilityTag"_jrs, "{BDURABILITY}"_jrs); + this->buildingMaxDurabilityTag = config.get(configSection, "BuildingMaxDurabilityTag"_jrs, "{BMDURABILITY}"_jrs); + this->buildingDurabilityPercentageTag = config.get(configSection, "BuildingDurabilityPercentageTag"_jrs, "{BDP}"_jrs); + this->buildingTeamColorTag = config.get(configSection, "BuildingTeamColorTag"_jrs, "{BCOLOR}"_jrs); + this->buildingTeamShortTag = config.get(configSection, "BuildingShortTeamTag"_jrs, "{BTEAMS}"_jrs); + this->buildingTeamLongTag = config.get(configSection, "BuildingLongTeamTag"_jrs, "{BTEAML}"_jrs); /** Ladder tags */ - this->rankTag = Jupiter::IRC::Client::Config->get(configSection, "RankTag"_jrs, "{RANK}"_jrs); - this->lastGameTag = Jupiter::IRC::Client::Config->get(configSection, "LastGameTag"_jrs, "{LASTGAME}"_jrs); - this->GDIScoreTag = Jupiter::IRC::Client::Config->get(configSection, "GDIScoreTag"_jrs, "{GDISCORE}"_jrs); - this->GDISPMTag = Jupiter::IRC::Client::Config->get(configSection, "GDISPMTag"_jrs, "{GDISPM}"_jrs); - this->GDIGameTimeTag = Jupiter::IRC::Client::Config->get(configSection, "GDIGameTimeTag"_jrs, "{GDIGAMETIME}"_jrs); - this->GDITiesTag = Jupiter::IRC::Client::Config->get(configSection, "GDITiesTag"_jrs, "{GDITIES}"_jrs); - this->GDIBeaconPlacementsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIBeaconPlacementsTag"_jrs, "{GDIBEACONPLACEMENTS}"_jrs); - this->GDIBeaconDisarmsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIBeaconDisarmsTag"_jrs, "{GDIBEACONDISARMS}"_jrs); - this->GDIProxyPlacementsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIProxyPlacementsTag"_jrs, "{GDIPROXYPLACEMENTS}"_jrs); - this->GDIProxyDisarmsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIProxyDisarmsTag"_jrs, "{GDIPROXYDISARMS}"_jrs); - this->GDIKillsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIKillsTag"_jrs, "{GDIKILLS}"_jrs); - this->GDIDeathsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIDeathsTag"_jrs, "{GDIDEATHS}"_jrs); - this->GDIVehicleKillsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIVehicleKillsTag"_jrs, "{GDIVEHICLEKILLS}"_jrs); - this->GDIDefenceKillsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIDefenceKillsTag"_jrs, "{GDIDEFENCEKILLS}"_jrs); - this->GDIBuildingKillsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIBuildingKillsTag"_jrs, "{GDIBUILDINGKILLS}"_jrs); - this->GDIKDRTag = Jupiter::IRC::Client::Config->get(configSection, "GDIKDRTag"_jrs, "{GDIKDR}"_jrs); - this->GDIHeadshotsTag = Jupiter::IRC::Client::Config->get(configSection, "GDIHeadshotsTag"_jrs, "{GDIHEADSHOTS}"_jrs); - this->GDIHeadshotKillRatioTag = Jupiter::IRC::Client::Config->get(configSection, "GDIHeadshotKillRatioTag"_jrs, "{GDIHSKR}"_jrs); - this->NodScoreTag = Jupiter::IRC::Client::Config->get(configSection, "NodScoreTag"_jrs, "{NODSCORE}"_jrs); - this->NodSPMTag = Jupiter::IRC::Client::Config->get(configSection, "NodSPMTag"_jrs, "{NODSPM}"_jrs); - this->NodGameTimeTag = Jupiter::IRC::Client::Config->get(configSection, "NodGameTimeTag"_jrs, "{NODGAMETIME}"_jrs); - this->NodTiesTag = Jupiter::IRC::Client::Config->get(configSection, "NodTiesTag"_jrs, "{NODTIES}"_jrs); - this->NodBeaconPlacementsTag = Jupiter::IRC::Client::Config->get(configSection, "NodBeaconPlacementsTag"_jrs, "{NODBEACONPLACEMENTS}"_jrs); - this->NodBeaconDisarmsTag = Jupiter::IRC::Client::Config->get(configSection, "NodBeaconDisarmsTag"_jrs, "{NODBEACONDISARMS}"_jrs); - this->NodProxyPlacementsTag = Jupiter::IRC::Client::Config->get(configSection, "NodProxyPlacementsTag"_jrs, "{NODPROXYPLACEMENTS}"_jrs); - this->NodProxyDisarmsTag = Jupiter::IRC::Client::Config->get(configSection, "NodProxyDisarmsTag"_jrs, "{NODPROXYDISARMS}"_jrs); - this->NodKillsTag = Jupiter::IRC::Client::Config->get(configSection, "NodKillsTag"_jrs, "{NODKILLS}"_jrs); - this->NodDeathsTag = Jupiter::IRC::Client::Config->get(configSection, "NodDeathsTag"_jrs, "{NODDEATHS}"_jrs); - this->NodVehicleKillsTag = Jupiter::IRC::Client::Config->get(configSection, "NodVehicleKillsTag"_jrs, "{NODVEHICLEKILLS}"_jrs); - this->NodDefenceKillsTag = Jupiter::IRC::Client::Config->get(configSection, "NodDefenceKillsTag"_jrs, "{NODDEFENCEKILLS}"_jrs); - this->NodBuildingKillsTag = Jupiter::IRC::Client::Config->get(configSection, "NodBuildingKillsTag"_jrs, "{NODBUILDINGKILLS}"_jrs); - this->NodKDRTag = Jupiter::IRC::Client::Config->get(configSection, "NodKDRTag"_jrs, "{NODKDR}"_jrs); - this->NodHeadshotsTag = Jupiter::IRC::Client::Config->get(configSection, "NodHeadshotsTag"_jrs, "{NODHEADSHOTS}"_jrs); - this->NodHeadshotKillRatioTag = Jupiter::IRC::Client::Config->get(configSection, "NodHeadshotKillRatioTag"_jrs, "{NODHSKR}"_jrs); + this->rankTag = config.get(configSection, "RankTag"_jrs, "{RANK}"_jrs); + this->lastGameTag = config.get(configSection, "LastGameTag"_jrs, "{LASTGAME}"_jrs); + this->GDIScoreTag = config.get(configSection, "GDIScoreTag"_jrs, "{GDISCORE}"_jrs); + this->GDISPMTag = config.get(configSection, "GDISPMTag"_jrs, "{GDISPM}"_jrs); + this->GDIGameTimeTag = config.get(configSection, "GDIGameTimeTag"_jrs, "{GDIGAMETIME}"_jrs); + this->GDITiesTag = config.get(configSection, "GDITiesTag"_jrs, "{GDITIES}"_jrs); + this->GDIBeaconPlacementsTag = config.get(configSection, "GDIBeaconPlacementsTag"_jrs, "{GDIBEACONPLACEMENTS}"_jrs); + this->GDIBeaconDisarmsTag = config.get(configSection, "GDIBeaconDisarmsTag"_jrs, "{GDIBEACONDISARMS}"_jrs); + this->GDIProxyPlacementsTag = config.get(configSection, "GDIProxyPlacementsTag"_jrs, "{GDIPROXYPLACEMENTS}"_jrs); + this->GDIProxyDisarmsTag = config.get(configSection, "GDIProxyDisarmsTag"_jrs, "{GDIPROXYDISARMS}"_jrs); + this->GDIKillsTag = config.get(configSection, "GDIKillsTag"_jrs, "{GDIKILLS}"_jrs); + this->GDIDeathsTag = config.get(configSection, "GDIDeathsTag"_jrs, "{GDIDEATHS}"_jrs); + this->GDIVehicleKillsTag = config.get(configSection, "GDIVehicleKillsTag"_jrs, "{GDIVEHICLEKILLS}"_jrs); + this->GDIDefenceKillsTag = config.get(configSection, "GDIDefenceKillsTag"_jrs, "{GDIDEFENCEKILLS}"_jrs); + this->GDIBuildingKillsTag = config.get(configSection, "GDIBuildingKillsTag"_jrs, "{GDIBUILDINGKILLS}"_jrs); + this->GDIKDRTag = config.get(configSection, "GDIKDRTag"_jrs, "{GDIKDR}"_jrs); + this->GDIHeadshotsTag = config.get(configSection, "GDIHeadshotsTag"_jrs, "{GDIHEADSHOTS}"_jrs); + this->GDIHeadshotKillRatioTag = config.get(configSection, "GDIHeadshotKillRatioTag"_jrs, "{GDIHSKR}"_jrs); + this->NodScoreTag = config.get(configSection, "NodScoreTag"_jrs, "{NODSCORE}"_jrs); + this->NodSPMTag = config.get(configSection, "NodSPMTag"_jrs, "{NODSPM}"_jrs); + this->NodGameTimeTag = config.get(configSection, "NodGameTimeTag"_jrs, "{NODGAMETIME}"_jrs); + this->NodTiesTag = config.get(configSection, "NodTiesTag"_jrs, "{NODTIES}"_jrs); + this->NodBeaconPlacementsTag = config.get(configSection, "NodBeaconPlacementsTag"_jrs, "{NODBEACONPLACEMENTS}"_jrs); + this->NodBeaconDisarmsTag = config.get(configSection, "NodBeaconDisarmsTag"_jrs, "{NODBEACONDISARMS}"_jrs); + this->NodProxyPlacementsTag = config.get(configSection, "NodProxyPlacementsTag"_jrs, "{NODPROXYPLACEMENTS}"_jrs); + this->NodProxyDisarmsTag = config.get(configSection, "NodProxyDisarmsTag"_jrs, "{NODPROXYDISARMS}"_jrs); + this->NodKillsTag = config.get(configSection, "NodKillsTag"_jrs, "{NODKILLS}"_jrs); + this->NodDeathsTag = config.get(configSection, "NodDeathsTag"_jrs, "{NODDEATHS}"_jrs); + this->NodVehicleKillsTag = config.get(configSection, "NodVehicleKillsTag"_jrs, "{NODVEHICLEKILLS}"_jrs); + this->NodDefenceKillsTag = config.get(configSection, "NodDefenceKillsTag"_jrs, "{NODDEFENCEKILLS}"_jrs); + this->NodBuildingKillsTag = config.get(configSection, "NodBuildingKillsTag"_jrs, "{NODBUILDINGKILLS}"_jrs); + this->NodKDRTag = config.get(configSection, "NodKDRTag"_jrs, "{NODKDR}"_jrs); + this->NodHeadshotsTag = config.get(configSection, "NodHeadshotsTag"_jrs, "{NODHEADSHOTS}"_jrs); + this->NodHeadshotKillRatioTag = config.get(configSection, "NodHeadshotKillRatioTag"_jrs, "{NODHSKR}"_jrs); /** Other tags */ - this->weaponTag = Jupiter::IRC::Client::Config->get(configSection, "WeaponTag"_jrs, "{WEAPON}"_jrs); - this->objectTag = Jupiter::IRC::Client::Config->get(configSection, "ObjectTag"_jrs, "{OBJECT}"_jrs); - this->messageTag = Jupiter::IRC::Client::Config->get(configSection, "MessageTag"_jrs, "{MESSAGE}"_jrs); - this->newNameTag = Jupiter::IRC::Client::Config->get(configSection, "NewNameTag"_jrs, "{NNAME}"_jrs); - this->winScoreTag = Jupiter::IRC::Client::Config->get(configSection, "WinScoreTag"_jrs, "{WINSCORE}"_jrs); - this->loseScoreTag = Jupiter::IRC::Client::Config->get(configSection, "LoseScoreTag"_jrs, "{LOSESCORE}"_jrs); + this->weaponTag = config.get(configSection, "WeaponTag"_jrs, "{WEAPON}"_jrs); + this->objectTag = config.get(configSection, "ObjectTag"_jrs, "{OBJECT}"_jrs); + this->messageTag = config.get(configSection, "MessageTag"_jrs, "{MESSAGE}"_jrs); + this->newNameTag = config.get(configSection, "NewNameTag"_jrs, "{NNAME}"_jrs); + this->winScoreTag = config.get(configSection, "WinScoreTag"_jrs, "{WINSCORE}"_jrs); + this->loseScoreTag = config.get(configSection, "LoseScoreTag"_jrs, "{LOSESCORE}"_jrs); + + return true; } double get_ratio(double num, double denom) diff --git a/RenX.Core/RenX_Tags.h b/RenX.Core/RenX_Tags.h index 547d8c0..0d7c9ec 100644 --- a/RenX.Core/RenX_Tags.h +++ b/RenX.Core/RenX_Tags.h @@ -49,6 +49,8 @@ namespace RenX struct RENX_API Tags { + virtual bool initialize(); + /** Global formats */ Jupiter::CStringS dateFmt; Jupiter::CStringS timeFmt; diff --git a/RenX.ExcessiveHeadshots/ExcessiveHeadshots.cpp b/RenX.ExcessiveHeadshots/ExcessiveHeadshots.cpp index adfb300..b09001a 100644 --- a/RenX.ExcessiveHeadshots/ExcessiveHeadshots.cpp +++ b/RenX.ExcessiveHeadshots/ExcessiveHeadshots.cpp @@ -26,19 +26,19 @@ using namespace Jupiter::literals; -RenX_ExcessiveHeadshotsPlugin::RenX_ExcessiveHeadshotsPlugin() +bool RenX_ExcessiveHeadshotsPlugin::initialize() { - RenX_ExcessiveHeadshotsPlugin::OnRehash(); + RenX_ExcessiveHeadshotsPlugin::ratio = this->config.getDouble(Jupiter::ReferenceString::empty, "HeadshotKillRatio"_jrs, 0.5); + RenX_ExcessiveHeadshotsPlugin::minKills = this->config.getInt(Jupiter::ReferenceString::empty, "Kills"_jrs, 10); + RenX_ExcessiveHeadshotsPlugin::minKD = this->config.getDouble(Jupiter::ReferenceString::empty, "KillDeathRatio"_jrs, 5.0); + RenX_ExcessiveHeadshotsPlugin::minKPS = this->config.getDouble(Jupiter::ReferenceString::empty, "KillsPerSecond"_jrs, 0.5); + RenX_ExcessiveHeadshotsPlugin::minFlags = this->config.getInt(Jupiter::ReferenceString::empty, "Flags"_jrs, 4); + return true; } int RenX_ExcessiveHeadshotsPlugin::OnRehash() { - RenX_ExcessiveHeadshotsPlugin::ratio = Jupiter::IRC::Client::Config->getDouble(RenX_ExcessiveHeadshotsPlugin::getName(), "HeadshotKillRatio"_jrs, 0.5); - RenX_ExcessiveHeadshotsPlugin::minKills = Jupiter::IRC::Client::Config->getInt(RenX_ExcessiveHeadshotsPlugin::getName(), "Kills"_jrs, 10); - RenX_ExcessiveHeadshotsPlugin::minKD = Jupiter::IRC::Client::Config->getDouble(RenX_ExcessiveHeadshotsPlugin::getName(), "KillDeathRatio"_jrs, 5.0); - RenX_ExcessiveHeadshotsPlugin::minKPS = Jupiter::IRC::Client::Config->getDouble(RenX_ExcessiveHeadshotsPlugin::getName(), "KillsPerSecond"_jrs, 0.5); - RenX_ExcessiveHeadshotsPlugin::minFlags = Jupiter::IRC::Client::Config->getInt(RenX_ExcessiveHeadshotsPlugin::getName(), "Flags"_jrs, 4); - return 0; + return this->initialize() ? 0 : -1; } void RenX_ExcessiveHeadshotsPlugin::RenX_OnKill(RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const Jupiter::ReadableString &damageType) diff --git a/RenX.ExcessiveHeadshots/ExcessiveHeadshots.h b/RenX.ExcessiveHeadshots/ExcessiveHeadshots.h index 2a15acd..e36f75f 100644 --- a/RenX.ExcessiveHeadshots/ExcessiveHeadshots.h +++ b/RenX.ExcessiveHeadshots/ExcessiveHeadshots.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -29,12 +29,9 @@ public: // RenX::Plugin void RenX_OnKill(RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const Jupiter::ReadableString &damageType) override; public: // Jupiter::Plugin + virtual bool initialize() override; int OnRehash() override; - const Jupiter::ReadableString &getName() override { return name; } - - RenX_ExcessiveHeadshotsPlugin(); private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.ExcessiveHeadshots"); unsigned int minFlags = 4; double ratio = 0.5; double minKD = 5.0; diff --git a/RenX.ExtraLogging/RenX_ExtraLogging.cpp b/RenX.ExtraLogging/RenX_ExtraLogging.cpp index 091a142..d5a149e 100644 --- a/RenX.ExtraLogging/RenX_ExtraLogging.cpp +++ b/RenX.ExtraLogging/RenX_ExtraLogging.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -37,16 +37,16 @@ int RenX_ExtraLoggingPlugin::OnRehash() { if (RenX_ExtraLoggingPlugin::file != nullptr) fclose(RenX_ExtraLoggingPlugin::file); - return !RenX_ExtraLoggingPlugin::init(); + return this->initialize() ? 0 : -1; } -bool RenX_ExtraLoggingPlugin::init() +bool RenX_ExtraLoggingPlugin::initialize() { - RenX_ExtraLoggingPlugin::filePrefix = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("FilePrefix"), Jupiter::StringS::Format("[%.*s] %.*s", RenX::tags->timeTag.size(), RenX::tags->timeTag.ptr(), RenX::tags->serverPrefixTag.size(), RenX::tags->serverPrefixTag.ptr())); - RenX_ExtraLoggingPlugin::consolePrefix = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("ConsolePrefix"), RenX_ExtraLoggingPlugin::filePrefix); - RenX_ExtraLoggingPlugin::newDayFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("NewDayFormat"), Jupiter::StringS::Format("Time: %.*s %.*s", RenX::tags->timeTag.size(), RenX::tags->timeTag.ptr(), RenX::tags->dateTag.size(), RenX::tags->dateTag.ptr())); - RenX_ExtraLoggingPlugin::printToConsole = Jupiter::IRC::Client::Config->getBool(this->getName(), STRING_LITERAL_AS_REFERENCE("PrintToConsole"), true); - const Jupiter::CStringS logFile = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("LogFile")); + RenX_ExtraLoggingPlugin::filePrefix = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("FilePrefix"), Jupiter::StringS::Format("[%.*s] %.*s", RenX::tags->timeTag.size(), RenX::tags->timeTag.ptr(), RenX::tags->serverPrefixTag.size(), RenX::tags->serverPrefixTag.ptr())); + RenX_ExtraLoggingPlugin::consolePrefix = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ConsolePrefix"), RenX_ExtraLoggingPlugin::filePrefix); + RenX_ExtraLoggingPlugin::newDayFmt = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("NewDayFormat"), Jupiter::StringS::Format("Time: %.*s %.*s", RenX::tags->timeTag.size(), RenX::tags->timeTag.ptr(), RenX::tags->dateTag.size(), RenX::tags->dateTag.ptr())); + RenX_ExtraLoggingPlugin::printToConsole = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("PrintToConsole"), true); + const Jupiter::CStringS logFile = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LogFile")); RenX::sanitizeTags(RenX_ExtraLoggingPlugin::filePrefix); RenX::sanitizeTags(RenX_ExtraLoggingPlugin::consolePrefix); @@ -115,11 +115,6 @@ void RenX_ExtraLoggingPlugin::RenX_OnRaw(RenX::Server *server, const Jupiter::Re // Plugin instantiation and entry point. RenX_ExtraLoggingPlugin pluginInstance; -extern "C" __declspec(dllexport) bool load() -{ - return pluginInstance.init(); -} - extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin() { return &pluginInstance; diff --git a/RenX.ExtraLogging/RenX_ExtraLogging.h b/RenX.ExtraLogging/RenX_ExtraLogging.h index 62d60b5..16e15c0 100644 --- a/RenX.ExtraLogging/RenX_ExtraLogging.h +++ b/RenX.ExtraLogging/RenX_ExtraLogging.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -29,19 +29,15 @@ public: // RenX::Plugin virtual void RenX_OnRaw(RenX::Server *server, const Jupiter::ReadableString &raw) override; public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } + virtual bool initialize() override; int OnRehash() override; int think() override; public: // RenX_ExtraLoggingPlugin - - bool init(); - RenX_ExtraLoggingPlugin(); ~RenX_ExtraLoggingPlugin(); private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.ExtraLogging"); Jupiter::StringS filePrefix; Jupiter::StringS consolePrefix; Jupiter::StringS newDayFmt; diff --git a/RenX.Greetings/RenX_Greetings.cpp b/RenX.Greetings/RenX_Greetings.cpp index b9ea206..7521344 100644 --- a/RenX.Greetings/RenX_Greetings.cpp +++ b/RenX.Greetings/RenX_Greetings.cpp @@ -63,23 +63,19 @@ void RenX_GreetingsPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerI int RenX_GreetingsPlugin::OnRehash() { RenX_GreetingsPlugin::greetingsFile.unload(); - RenX_GreetingsPlugin::init(); - return 0; + return RenX_GreetingsPlugin::initialize() ? 0 : -1; } -RenX_GreetingsPlugin::RenX_GreetingsPlugin() +bool RenX_GreetingsPlugin::initialize() { - RenX_GreetingsPlugin::init(); -} - -void RenX_GreetingsPlugin::init() -{ - RenX_GreetingsPlugin::sendPrivate = Jupiter::IRC::Client::Config->getBool(RenX_GreetingsPlugin::name, STRING_LITERAL_AS_REFERENCE("SendPrivate"), true); - RenX_GreetingsPlugin::sendMode = Jupiter::IRC::Client::Config->getInt(RenX_GreetingsPlugin::name, STRING_LITERAL_AS_REFERENCE("SendMode"), 0); - RenX_GreetingsPlugin::greetingsFile.load(Jupiter::IRC::Client::Config->get(RenX_GreetingsPlugin::name, STRING_LITERAL_AS_REFERENCE("GreetingsFile"), STRING_LITERAL_AS_REFERENCE("RenX.Greetings.txt"))); + RenX_GreetingsPlugin::sendPrivate = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("SendPrivate"), true); + RenX_GreetingsPlugin::sendMode = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("SendMode"), 0); + RenX_GreetingsPlugin::greetingsFile.load(this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("GreetingsFile"), STRING_LITERAL_AS_REFERENCE("RenX.Greetings.txt"))); if (RenX_GreetingsPlugin::greetingsFile.getLineCount() == 0) RenX_GreetingsPlugin::greetingsFile.addData(STRING_LITERAL_AS_REFERENCE("Please notify the server administrator to properly configure or disable server greetings.\r\n")); RenX_GreetingsPlugin::lastLine = RenX_GreetingsPlugin::greetingsFile.getLineCount() - 1; + + return true; } // Plugin instantiation and entry point. diff --git a/RenX.Greetings/RenX_Greetings.h b/RenX.Greetings/RenX_Greetings.h index 682aedd..46d5b66 100644 --- a/RenX.Greetings/RenX_Greetings.h +++ b/RenX.Greetings/RenX_Greetings.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -31,17 +31,14 @@ public: // RenX::Plugin void RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) override; public: // Jupiter::Plugin + virtual bool initialize() override; int OnRehash() override; - const Jupiter::ReadableString &getName() override { return name; } - RenX_GreetingsPlugin(); private: - void init(); bool sendPrivate; unsigned int lastLine; unsigned int sendMode = 0; /** 0 = Send greetings randomly, 1 = Send greetings sequentially, 2 = Send all greetings */ Jupiter::File greetingsFile; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Greetings"); }; #endif // _RENX_GREETING_H_HEADER \ No newline at end of file diff --git a/RenX.HybridUUID/RenX_HybridUUID.h b/RenX.HybridUUID/RenX_HybridUUID.h index 9fe0970..2ff99fd 100644 --- a/RenX.HybridUUID/RenX_HybridUUID.h +++ b/RenX.HybridUUID/RenX_HybridUUID.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -29,13 +29,8 @@ public: // RenX::Plugin void RenX_OnServerCreate(RenX::Server *server) override; public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } - RenX_HybridUUIDPlugin(); ~RenX_HybridUUIDPlugin(); - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.HybridUUID"); }; #endif // _RENX_HYBRIDUUID_H_HEADER \ No newline at end of file diff --git a/RenX.IRCJoin/RenX_IRCJoin.cpp b/RenX.IRCJoin/RenX_IRCJoin.cpp index 19e9e8b..63f47e9 100644 --- a/RenX.IRCJoin/RenX_IRCJoin.cpp +++ b/RenX.IRCJoin/RenX_IRCJoin.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,19 +23,21 @@ #include "RenX_Server.h" #include "RenX_IRCJoin.h" -void RenX_IRCJoinPlugin::init() +bool RenX_IRCJoinPlugin::initialize() { - RenX_IRCJoinPlugin::publicOnly = Jupiter::IRC::Client::Config->getBool(this->getName(), STRING_LITERAL_AS_REFERENCE("PublicOnly"), true); - RenX_IRCJoinPlugin::joinMsgAlways = Jupiter::IRC::Client::Config->getBool(this->getName(), STRING_LITERAL_AS_REFERENCE("Join.MsgAlways"), false); - RenX_IRCJoinPlugin::partMsgAlways = Jupiter::IRC::Client::Config->getBool(this->getName(), STRING_LITERAL_AS_REFERENCE("Part.MsgAlways"), false); - RenX_IRCJoinPlugin::minAccessPartMessage = Jupiter::IRC::Client::Config->getInt(this->getName(), STRING_LITERAL_AS_REFERENCE("Part.MinAccess"), 0); - RenX_IRCJoinPlugin::maxAccessPartMessage = Jupiter::IRC::Client::Config->getInt(this->getName(), STRING_LITERAL_AS_REFERENCE("Part.MaxAccess"), -1); - RenX_IRCJoinPlugin::nameTag = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("NameTag"), STRING_LITERAL_AS_REFERENCE("{NAME}")); - RenX_IRCJoinPlugin::chanTag = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("ChannelTag"), STRING_LITERAL_AS_REFERENCE("{CHAN}")); - RenX_IRCJoinPlugin::partReasonTag = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("PartReasonTag"), STRING_LITERAL_AS_REFERENCE("{REASON}")); - RenX_IRCJoinPlugin::joinFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("Join.Format"), STRING_LITERAL_AS_REFERENCE("{NAME} has joined {CHAN}!")); - RenX_IRCJoinPlugin::partFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("Part.Format"), STRING_LITERAL_AS_REFERENCE("{NAME} has left {CHAN} ({REASON})!")); - RenX_IRCJoinPlugin::partFmtNoReason = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("Part.FormatNoReason"), STRING_LITERAL_AS_REFERENCE("{NAME} has left {CHAN}!")); + RenX_IRCJoinPlugin::publicOnly = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("PublicOnly"), true); + RenX_IRCJoinPlugin::joinMsgAlways = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Join.MsgAlways"), false); + RenX_IRCJoinPlugin::partMsgAlways = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.MsgAlways"), false); + RenX_IRCJoinPlugin::minAccessPartMessage = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.MinAccess"), 0); + RenX_IRCJoinPlugin::maxAccessPartMessage = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.MaxAccess"), -1); + RenX_IRCJoinPlugin::nameTag = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("NameTag"), STRING_LITERAL_AS_REFERENCE("{NAME}")); + RenX_IRCJoinPlugin::chanTag = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ChannelTag"), STRING_LITERAL_AS_REFERENCE("{CHAN}")); + RenX_IRCJoinPlugin::partReasonTag = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("PartReasonTag"), STRING_LITERAL_AS_REFERENCE("{REASON}")); + RenX_IRCJoinPlugin::joinFmt = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Join.Format"), STRING_LITERAL_AS_REFERENCE("{NAME} has joined {CHAN}!")); + RenX_IRCJoinPlugin::partFmt = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.Format"), STRING_LITERAL_AS_REFERENCE("{NAME} has left {CHAN} ({REASON})!")); + RenX_IRCJoinPlugin::partFmtNoReason = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.FormatNoReason"), STRING_LITERAL_AS_REFERENCE("{NAME} has left {CHAN}!")); + + return true; } void RenX_IRCJoinPlugin::OnJoin(Jupiter::IRC::Client *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick) @@ -103,13 +105,7 @@ void RenX_IRCJoinPlugin::OnPart(Jupiter::IRC::Client *source, const Jupiter::Rea int RenX_IRCJoinPlugin::OnRehash() { - RenX_IRCJoinPlugin::init(); - return 0; -} - -RenX_IRCJoinPlugin::RenX_IRCJoinPlugin() -{ - RenX_IRCJoinPlugin::init(); + return RenX_IRCJoinPlugin::initialize() ? 0 : -1; } // Plugin instantiation and entry point. diff --git a/RenX.IRCJoin/RenX_IRCJoin.h b/RenX.IRCJoin/RenX_IRCJoin.h index ef11134..78fcb43 100644 --- a/RenX.IRCJoin/RenX_IRCJoin.h +++ b/RenX.IRCJoin/RenX_IRCJoin.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -28,13 +28,10 @@ class RenX_IRCJoinPlugin : public RenX::Plugin public: // Jupiter::Plugin void OnJoin(Jupiter::IRC::Client *source, const Jupiter::ReadableString &chan, const Jupiter::ReadableString &nick) override; void OnPart(Jupiter::IRC::Client *source, const Jupiter::ReadableString &chan, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &reason) override; - int OnRehash(); - RenX_IRCJoinPlugin(); - const Jupiter::ReadableString &getName() override { return name; } + virtual bool initialize() override; + int OnRehash() override; private: - void init(); - // Config Variables bool publicOnly; bool joinMsgAlways; @@ -47,9 +44,6 @@ private: Jupiter::StringS joinFmt; Jupiter::StringS partFmt; Jupiter::StringS partFmtNoReason; - - // Internal Variables - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.IRCJoin"); }; #endif // _RENX_IRCJOIN_H_HEADER \ No newline at end of file diff --git a/RenX.Ladder.All-Time/RenX_Ladder_All_Time.cpp b/RenX.Ladder.All-Time/RenX_Ladder_All_Time.cpp index fb51ee1..55d6ed9 100644 --- a/RenX.Ladder.All-Time/RenX_Ladder_All_Time.cpp +++ b/RenX.Ladder.All-Time/RenX_Ladder_All_Time.cpp @@ -22,16 +22,18 @@ using namespace Jupiter::literals; -RenX_Ladder_All_TimePlugin::RenX_Ladder_All_TimePlugin() +bool RenX_Ladder_All_TimePlugin::initialize() { // Load database - this->database.process_file(Jupiter::IRC::Client::Config->get(this->getName(), "LadderDatabase"_jrs, "Ladder.db"_jrs)); - this->database.setName(Jupiter::IRC::Client::Config->get(this->getName(), "DatabaseName"_jrs, "All-Time"_jrs)); - this->database.setOutputTimes(Jupiter::IRC::Client::Config->getBool(this->getName(), "OutputTimes"_jrs, true)); + this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.db"_jrs)); + this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "All-Time"_jrs)); + this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, true)); // Force database to default, if desired - if (Jupiter::IRC::Client::Config->getBool(this->getName(), "ForceDefault"_jrs, true)) + if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, true)) RenX::default_ladder_database = &this->database; + + return true; } // Plugin instantiation and entry point. diff --git a/RenX.Ladder.All-Time/RenX_Ladder_All_Time.h b/RenX.Ladder.All-Time/RenX_Ladder_All_Time.h index 2b47656..b00b84c 100644 --- a/RenX.Ladder.All-Time/RenX_Ladder_All_Time.h +++ b/RenX.Ladder.All-Time/RenX_Ladder_All_Time.h @@ -27,12 +27,10 @@ class RenX_Ladder_All_TimePlugin : public RenX::Plugin { public: - const Jupiter::ReadableString &getName() override { return name; } + virtual bool initialize() override; - RenX_Ladder_All_TimePlugin(); private: RenX::LadderDatabase database; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Ladder.All-Time"); }; #endif // _RENX_LADDER_ALL_TIME \ No newline at end of file diff --git a/RenX.Ladder.Daily/RenX_Ladder_Daily.cpp b/RenX.Ladder.Daily/RenX_Ladder_Daily.cpp index 99d3893..112fece 100644 --- a/RenX.Ladder.Daily/RenX_Ladder_Daily.cpp +++ b/RenX.Ladder.Daily/RenX_Ladder_Daily.cpp @@ -23,19 +23,21 @@ using namespace Jupiter::literals; -RenX_Ladder_Daily_TimePlugin::RenX_Ladder_Daily_TimePlugin() +bool RenX_Ladder_Daily_TimePlugin::initialize() { // Load database - this->database.process_file(Jupiter::IRC::Client::Config->get(this->getName(), "LadderDatabase"_jrs, "Ladder.Daily.db"_jrs)); - this->database.setName(Jupiter::IRC::Client::Config->get(this->getName(), "DatabaseName"_jrs, "Daily"_jrs)); - this->database.setOutputTimes(Jupiter::IRC::Client::Config->getBool(this->getName(), "OutputTimes"_jrs, false)); + this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.Daily.db"_jrs)); + this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "Daily"_jrs)); + this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, false)); this->last_sorted_day = gmtime(std::addressof(time(0)))->tm_wday; this->database.OnPreUpdateLadder = OnPreUpdateLadder; // Force database to default, if desired - if (Jupiter::IRC::Client::Config->getBool(this->getName(), "ForceDefault"_jrs, false)) + if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, false)) RenX::default_ladder_database = &this->database; + + return true; } // Plugin instantiation and entry point. diff --git a/RenX.Ladder.Daily/RenX_Ladder_Daily.h b/RenX.Ladder.Daily/RenX_Ladder_Daily.h index 646e015..866d2dc 100644 --- a/RenX.Ladder.Daily/RenX_Ladder_Daily.h +++ b/RenX.Ladder.Daily/RenX_Ladder_Daily.h @@ -27,14 +27,11 @@ class RenX_Ladder_Daily_TimePlugin : public RenX::Plugin { public: - const Jupiter::ReadableString &getName() override { return name; } - - RenX_Ladder_Daily_TimePlugin(); + virtual bool initialize() override; int last_sorted_day = 0; private: RenX::LadderDatabase database; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Ladder.Daily"); }; void OnPreUpdateLadder(RenX::LadderDatabase &database, RenX::Server *server, const RenX::TeamType &team); diff --git a/RenX.Ladder.Monthly/RenX_Ladder_Monthly.cpp b/RenX.Ladder.Monthly/RenX_Ladder_Monthly.cpp index c4109c1..be7bd3d 100644 --- a/RenX.Ladder.Monthly/RenX_Ladder_Monthly.cpp +++ b/RenX.Ladder.Monthly/RenX_Ladder_Monthly.cpp @@ -23,19 +23,21 @@ using namespace Jupiter::literals; -RenX_Ladder_Monthly_TimePlugin::RenX_Ladder_Monthly_TimePlugin() +bool RenX_Ladder_Monthly_TimePlugin::initialize() { // Load database - this->database.process_file(Jupiter::IRC::Client::Config->get(this->getName(), "LadderDatabase"_jrs, "Ladder.Monthly.db"_jrs)); - this->database.setName(Jupiter::IRC::Client::Config->get(this->getName(), "DatabaseName"_jrs, "Monthly"_jrs)); - this->database.setOutputTimes(Jupiter::IRC::Client::Config->getBool(this->getName(), "OutputTimes"_jrs, false)); + this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.Monthly.db"_jrs)); + this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "Monthly"_jrs)); + this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, false)); this->last_sorted_month = gmtime(std::addressof(time(0)))->tm_mon; this->database.OnPreUpdateLadder = OnPreUpdateLadder; // Force database to default, if desired - if (Jupiter::IRC::Client::Config->getBool(this->getName(), "ForceDefault"_jrs, false)) + if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, false)) RenX::default_ladder_database = &this->database; + + return true; } // Plugin instantiation and entry point. diff --git a/RenX.Ladder.Monthly/RenX_Ladder_Monthly.h b/RenX.Ladder.Monthly/RenX_Ladder_Monthly.h index 20da6fb..1e82f31 100644 --- a/RenX.Ladder.Monthly/RenX_Ladder_Monthly.h +++ b/RenX.Ladder.Monthly/RenX_Ladder_Monthly.h @@ -27,14 +27,11 @@ class RenX_Ladder_Monthly_TimePlugin : public RenX::Plugin { public: - const Jupiter::ReadableString &getName() override { return name; } - - RenX_Ladder_Monthly_TimePlugin(); + virtual bool initialize() override; int last_sorted_month = 0; private: RenX::LadderDatabase database; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Ladder.Monthly"); }; void OnPreUpdateLadder(RenX::LadderDatabase &database, RenX::Server *server, const RenX::TeamType &team); diff --git a/RenX.Ladder.Web/RenX_Ladder_Web.cpp b/RenX.Ladder.Web/RenX_Ladder_Web.cpp index 002cfe9..e4fa468 100644 --- a/RenX.Ladder.Web/RenX_Ladder_Web.cpp +++ b/RenX.Ladder.Web/RenX_Ladder_Web.cpp @@ -26,13 +26,13 @@ using namespace Jupiter::literals; -RenX_Ladder_WebPlugin::RenX_Ladder_WebPlugin() +bool RenX_Ladder_WebPlugin::initialize() { - RenX_Ladder_WebPlugin::ladder_page_name = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "LadderPageName"_jrs, ""_jrs); - RenX_Ladder_WebPlugin::search_page_name = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "SearchPageName"_jrs, "search"_jrs); - RenX_Ladder_WebPlugin::profile_page_name = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "ProfilePageName"_jrs, "profile"_jrs); - RenX_Ladder_WebPlugin::web_hostname = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "Hostname"_jrs, ""_jrs); - RenX_Ladder_WebPlugin::web_path = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "Path"_jrs, "/"_jrs); + RenX_Ladder_WebPlugin::ladder_page_name = this->config.get(Jupiter::ReferenceString::empty, "LadderPageName"_jrs, ""_jrs); + RenX_Ladder_WebPlugin::search_page_name = this->config.get(Jupiter::ReferenceString::empty, "SearchPageName"_jrs, "search"_jrs); + RenX_Ladder_WebPlugin::profile_page_name = this->config.get(Jupiter::ReferenceString::empty, "ProfilePageName"_jrs, "profile"_jrs); + RenX_Ladder_WebPlugin::web_hostname = this->config.get(Jupiter::ReferenceString::empty, "Hostname"_jrs, ""_jrs); + RenX_Ladder_WebPlugin::web_path = this->config.get(Jupiter::ReferenceString::empty, "Path"_jrs, "/"_jrs); this->OnRehash(); @@ -56,6 +56,8 @@ RenX_Ladder_WebPlugin::RenX_Ladder_WebPlugin() content->type = &Jupiter::HTTP::Content::Type::Text::HTML; content->charset = &Jupiter::HTTP::Content::Type::Text::Charset::UTF8; server.hook(RenX_Ladder_WebPlugin::web_hostname, RenX_Ladder_WebPlugin::web_path, content); + + return true; } RenX_Ladder_WebPlugin::~RenX_Ladder_WebPlugin() @@ -71,17 +73,17 @@ int RenX_Ladder_WebPlugin::OnRehash() FILE *file; int chr; - RenX_Ladder_WebPlugin::web_header_filename = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "HeaderFilename"_jrs, "RenX.Ladder.Web.Header.html"_jrs); - RenX_Ladder_WebPlugin::web_footer_filename = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "FooterFilename"_jrs, "RenX.Ladder.Web.Footer.html"_jrs); - RenX_Ladder_WebPlugin::web_profile_filename = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "ProfileFilename"_jrs, "RenX.Ladder.Web.Profile.html"_jrs); - RenX_Ladder_WebPlugin::web_ladder_table_header_filename = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "LadderTableHeaderFilename"_jrs, "RenX.Ladder.Web.Ladder.Table.Header.html"_jrs); - RenX_Ladder_WebPlugin::web_ladder_table_footer_filename = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "LadderTableFooterFilename"_jrs, "RenX.Ladder.Web.Ladder.Table.Footer.html"_jrs); - RenX_Ladder_WebPlugin::entries_per_page = Jupiter::IRC::Client::Config->getInt(RenX_Ladder_WebPlugin::name, "EntriesPerPage"_jrs, 50); - RenX_Ladder_WebPlugin::min_search_name_length = Jupiter::IRC::Client::Config->getInt(RenX_Ladder_WebPlugin::name, "MinSearchNameLength"_jrs, 3); - - RenX_Ladder_WebPlugin::entry_table_row = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "EntryTableRow"_jrs, R"html({RANK}{NAME}{SCORE}{SPM}{GAMES}{WINS}{LOSSES}{WLR}{KILLS}{DEATHS}{KDR})html"_jrs); - RenX_Ladder_WebPlugin::entry_profile_previous = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "EntryProfilePrevious"_jrs, R"html(
)html"_jrs); - RenX_Ladder_WebPlugin::entry_profile_next = Jupiter::IRC::Client::Config->get(RenX_Ladder_WebPlugin::name, "EntryProfileNext"_jrs, R"html(
)html"_jrs); + RenX_Ladder_WebPlugin::web_header_filename = this->config.get(Jupiter::ReferenceString::empty, "HeaderFilename"_jrs, "RenX.Ladder.Web.Header.html"_jrs); + RenX_Ladder_WebPlugin::web_footer_filename = this->config.get(Jupiter::ReferenceString::empty, "FooterFilename"_jrs, "RenX.Ladder.Web.Footer.html"_jrs); + RenX_Ladder_WebPlugin::web_profile_filename = this->config.get(Jupiter::ReferenceString::empty, "ProfileFilename"_jrs, "RenX.Ladder.Web.Profile.html"_jrs); + RenX_Ladder_WebPlugin::web_ladder_table_header_filename = this->config.get(Jupiter::ReferenceString::empty, "LadderTableHeaderFilename"_jrs, "RenX.Ladder.Web.Ladder.Table.Header.html"_jrs); + RenX_Ladder_WebPlugin::web_ladder_table_footer_filename = this->config.get(Jupiter::ReferenceString::empty, "LadderTableFooterFilename"_jrs, "RenX.Ladder.Web.Ladder.Table.Footer.html"_jrs); + RenX_Ladder_WebPlugin::entries_per_page = this->config.getInt(Jupiter::ReferenceString::empty, "EntriesPerPage"_jrs, 50); + RenX_Ladder_WebPlugin::min_search_name_length = this->config.getInt(Jupiter::ReferenceString::empty, "MinSearchNameLength"_jrs, 3); + + RenX_Ladder_WebPlugin::entry_table_row = this->config.get(Jupiter::ReferenceString::empty, "EntryTableRow"_jrs, R"html({RANK}{NAME}{SCORE}{SPM}{GAMES}{WINS}{LOSSES}{WLR}{KILLS}{DEATHS}{KDR})html"_jrs); + RenX_Ladder_WebPlugin::entry_profile_previous = this->config.get(Jupiter::ReferenceString::empty, "EntryProfilePrevious"_jrs, R"html(
)html"_jrs); + RenX_Ladder_WebPlugin::entry_profile_next = this->config.get(Jupiter::ReferenceString::empty, "EntryProfileNext"_jrs, R"html(
)html"_jrs); RenX::sanitizeTags(RenX_Ladder_WebPlugin::entry_table_row); RenX::sanitizeTags(RenX_Ladder_WebPlugin::entry_profile_previous); diff --git a/RenX.Ladder.Web/RenX_Ladder_Web.h b/RenX.Ladder.Web/RenX_Ladder_Web.h index ebe6a47..c2a4ebe 100644 --- a/RenX.Ladder.Web/RenX_Ladder_Web.h +++ b/RenX.Ladder.Web/RenX_Ladder_Web.h @@ -46,16 +46,13 @@ public: inline size_t getEntriesPerPage() const { return this->entries_per_page; } inline size_t getMinSearchNameLength() const { return this->min_search_name_length; }; - RenX_Ladder_WebPlugin(); + virtual bool initialize() override; ~RenX_Ladder_WebPlugin(); public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } int OnRehash() override; private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Ladder.Web"); - /** Configuration variables */ size_t entries_per_page; size_t min_search_name_length; diff --git a/RenX.Ladder.Weekly/RenX_Ladder_Weekly.cpp b/RenX.Ladder.Weekly/RenX_Ladder_Weekly.cpp index 5ed0538..53fd0a2 100644 --- a/RenX.Ladder.Weekly/RenX_Ladder_Weekly.cpp +++ b/RenX.Ladder.Weekly/RenX_Ladder_Weekly.cpp @@ -23,20 +23,22 @@ using namespace Jupiter::literals; -RenX_Ladder_Weekly_TimePlugin::RenX_Ladder_Weekly_TimePlugin() +bool RenX_Ladder_Weekly_TimePlugin::initialize() { // Load database - this->database.process_file(Jupiter::IRC::Client::Config->get(this->getName(), "LadderDatabase"_jrs, "Ladder.Weekly.db"_jrs)); - this->database.setName(Jupiter::IRC::Client::Config->get(this->getName(), "DatabaseName"_jrs, "Weekly"_jrs)); - this->database.setOutputTimes(Jupiter::IRC::Client::Config->getBool(this->getName(), "OutputTimes"_jrs, false)); + this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.Weekly.db"_jrs)); + this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "Weekly"_jrs)); + this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, false)); this->last_sorted_day = gmtime(std::addressof(time(0)))->tm_wday; - this->reset_day = Jupiter::IRC::Client::Config->getInt(this->getName(), "ResetDay"_jrs); + this->reset_day = this->config.getInt(Jupiter::ReferenceString::empty, "ResetDay"_jrs); this->database.OnPreUpdateLadder = OnPreUpdateLadder; // Force database to default, if desired - if (Jupiter::IRC::Client::Config->getBool(this->getName(), "ForceDefault"_jrs, false)) + if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, false)) RenX::default_ladder_database = &this->database; + + return true; } // Plugin instantiation and entry point. diff --git a/RenX.Ladder.Weekly/RenX_Ladder_Weekly.h b/RenX.Ladder.Weekly/RenX_Ladder_Weekly.h index 0a737ff..fc3d83f 100644 --- a/RenX.Ladder.Weekly/RenX_Ladder_Weekly.h +++ b/RenX.Ladder.Weekly/RenX_Ladder_Weekly.h @@ -27,15 +27,12 @@ class RenX_Ladder_Weekly_TimePlugin : public RenX::Plugin { public: - const Jupiter::ReadableString &getName() override { return name; } - - RenX_Ladder_Weekly_TimePlugin(); + virtual bool initialize() override; int last_sorted_day; int reset_day; private: RenX::LadderDatabase database; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Ladder.Weekly"); }; void OnPreUpdateLadder(RenX::LadderDatabase &database, RenX::Server *server, const RenX::TeamType &team); diff --git a/RenX.Ladder.Yearly/RenX_Ladder_Yearly.cpp b/RenX.Ladder.Yearly/RenX_Ladder_Yearly.cpp index 3256e1c..c21a4b1 100644 --- a/RenX.Ladder.Yearly/RenX_Ladder_Yearly.cpp +++ b/RenX.Ladder.Yearly/RenX_Ladder_Yearly.cpp @@ -23,19 +23,21 @@ using namespace Jupiter::literals; -RenX_Ladder_Yearly_TimePlugin::RenX_Ladder_Yearly_TimePlugin() +bool RenX_Ladder_Yearly_TimePlugin::initialize() { // Load database - this->database.process_file(Jupiter::IRC::Client::Config->get(this->getName(), "LadderDatabase"_jrs, "Ladder.Yearly.db"_jrs)); - this->database.setName(Jupiter::IRC::Client::Config->get(this->getName(), "DatabaseName"_jrs, "Yearly"_jrs)); - this->database.setOutputTimes(Jupiter::IRC::Client::Config->getBool(this->getName(), "OutputTimes"_jrs, false)); + this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.Yearly.db"_jrs)); + this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "Yearly"_jrs)); + this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, false)); this->last_sorted_year = gmtime(std::addressof(time(0)))->tm_year; this->database.OnPreUpdateLadder = OnPreUpdateLadder; // Force database to default, if desired - if (Jupiter::IRC::Client::Config->getBool(this->getName(), "ForceDefault"_jrs, false)) + if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, false)) RenX::default_ladder_database = &this->database; + + return true; } // Plugin instantiation and entry point. diff --git a/RenX.Ladder.Yearly/RenX_Ladder_Yearly.h b/RenX.Ladder.Yearly/RenX_Ladder_Yearly.h index d92c42c..830b8a4 100644 --- a/RenX.Ladder.Yearly/RenX_Ladder_Yearly.h +++ b/RenX.Ladder.Yearly/RenX_Ladder_Yearly.h @@ -27,14 +27,11 @@ class RenX_Ladder_Yearly_TimePlugin : public RenX::Plugin { public: - const Jupiter::ReadableString &getName() override { return name; } - - RenX_Ladder_Yearly_TimePlugin(); + virtual bool initialize() override; int last_sorted_year = 0; private: RenX::LadderDatabase database; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Ladder.Yearly"); }; void OnPreUpdateLadder(RenX::LadderDatabase &database, RenX::Server *server, const RenX::TeamType &team); diff --git a/RenX.Ladder/RenX_Ladder.cpp b/RenX.Ladder/RenX_Ladder.cpp index c4a11a2..890b590 100644 --- a/RenX.Ladder/RenX_Ladder.cpp +++ b/RenX.Ladder/RenX_Ladder.cpp @@ -26,14 +26,16 @@ using namespace Jupiter::literals; -RenX_LadderPlugin::RenX_LadderPlugin() +bool RenX_LadderPlugin::initialize() { - RenX_LadderPlugin::only_pure = Jupiter::IRC::Client::Config->getBool(this->getName(), "OnlyPure"_jrs, false); - int mlcpno = Jupiter::IRC::Client::Config->getInt(this->getName(), "MaxLadderCommandPartNameOutput"_jrs, 5); + RenX_LadderPlugin::only_pure = this->config.getBool(Jupiter::ReferenceString::empty, "OnlyPure"_jrs, false); + int mlcpno = this->config.getInt(Jupiter::ReferenceString::empty, "MaxLadderCommandPartNameOutput"_jrs, 5); if (mlcpno < 0) RenX_LadderPlugin::max_ladder_command_part_name_output = 0; else RenX_LadderPlugin::max_ladder_command_part_name_output = mlcpno; + + return true; } /** Wait until the client list has been updated to update the ladder */ diff --git a/RenX.Ladder/RenX_Ladder.h b/RenX.Ladder/RenX_Ladder.h index ab254ec..5b129da 100644 --- a/RenX.Ladder/RenX_Ladder.h +++ b/RenX.Ladder/RenX_Ladder.h @@ -35,18 +35,16 @@ class RenX_LadderPlugin : public RenX::Plugin { public: - const Jupiter::ReadableString &getName() override { return name; } + virtual bool initialize() override; void RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore) override; void RenX_OnCommand(RenX::Server *server, const Jupiter::ReadableString &) override; size_t getMaxLadderCommandPartNameOutput() const; - RenX_LadderPlugin(); private: /** Configuration variables */ - bool only_pure; - size_t max_ladder_command_part_name_output; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Ladder"); + bool only_pure = false; + size_t max_ladder_command_part_name_output = 0; }; GENERIC_GENERIC_COMMAND(LadderGenericCommand) diff --git a/RenX.Listen/RenX_Listen.cpp b/RenX.Listen/RenX_Listen.cpp index de9fdf5..6a7a916 100644 --- a/RenX.Listen/RenX_Listen.cpp +++ b/RenX.Listen/RenX_Listen.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -28,11 +28,11 @@ RenX_ListenPlugin::~RenX_ListenPlugin() RenX_ListenPlugin::socket.close(); } -bool RenX_ListenPlugin::init() +bool RenX_ListenPlugin::initialize() { - uint16_t port = Jupiter::IRC::Client::Config->getInt(this->getName(), STRING_LITERAL_AS_REFERENCE("Port"), 21337); - const Jupiter::ReadableString &address = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("Address"), STRING_LITERAL_AS_REFERENCE("0.0.0.0")); - RenX_ListenPlugin::serverSection = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("ServerSection"), this->getName()); + uint16_t port = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Port"), 21337); + const Jupiter::ReadableString &address = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Address"), STRING_LITERAL_AS_REFERENCE("0.0.0.0")); + RenX_ListenPlugin::serverSection = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ServerSection"), this->getName()); return RenX_ListenPlugin::socket.bind(Jupiter::CStringS(address).c_str(), port, true) && RenX_ListenPlugin::socket.setBlocking(false); } @@ -53,9 +53,9 @@ int RenX_ListenPlugin::think() int RenX_ListenPlugin::OnRehash() { - uint16_t port = Jupiter::IRC::Client::Config->getInt(this->getName(), STRING_LITERAL_AS_REFERENCE("Port"), 21337); - const Jupiter::ReadableString &address = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("Address"), STRING_LITERAL_AS_REFERENCE("0.0.0.0")); - RenX_ListenPlugin::serverSection = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("ServerSection"), this->getName()); + uint16_t port = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Port"), 21337); + const Jupiter::ReadableString &address = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Address"), STRING_LITERAL_AS_REFERENCE("0.0.0.0")); + RenX_ListenPlugin::serverSection = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ServerSection"), this->getName()); if (port != RenX_ListenPlugin::socket.getRemotePort() || address.equals(RenX_ListenPlugin::socket.getRemoteHostname()) == false) { puts("Notice: The Renegade-X listening socket has been changed!"); @@ -68,11 +68,6 @@ int RenX_ListenPlugin::OnRehash() // Plugin instantiation and entry point. RenX_ListenPlugin pluginInstance; -extern "C" __declspec(dllexport) bool load() -{ - return pluginInstance.init(); -} - extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin() { return &pluginInstance; diff --git a/RenX.Listen/RenX_Listen.h b/RenX.Listen/RenX_Listen.h index 4ed7168..4047997 100644 --- a/RenX.Listen/RenX_Listen.h +++ b/RenX.Listen/RenX_Listen.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -29,16 +29,14 @@ class RenX_ListenPlugin : public RenX::Plugin public: // RenX::Plugin public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } int think() override; - int OnRehash(); + virtual bool initialize() override; + int OnRehash() override; public: // RenX_ListenPlugin - bool init(); ~RenX_ListenPlugin(); private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Listen"); Jupiter::TCPSocket socket; Jupiter::StringS serverSection; }; diff --git a/RenX.Logging/RenX_Logging.cpp b/RenX.Logging/RenX_Logging.cpp index 224d254..cc13edf 100644 --- a/RenX.Logging/RenX_Logging.cpp +++ b/RenX.Logging/RenX_Logging.cpp @@ -27,396 +27,396 @@ using namespace Jupiter::literals; -void RenX_LoggingPlugin::init() -{ - RenX_LoggingPlugin::muteOwnExecute = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "MuteOwnExecute"_jrs, true); - RenX_LoggingPlugin::playerRDNSPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "PlayerRDNSPublic"_jrs, false); - RenX_LoggingPlugin::joinPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "JoinPublic"_jrs, true); - RenX_LoggingPlugin::partPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "PartPublic"_jrs, true); - RenX_LoggingPlugin::kickPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "KickPublic"_jrs, true); - RenX_LoggingPlugin::nameChangePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "NameChangePublic"_jrs, true); - RenX_LoggingPlugin::teamChangePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "TeamChangePublic"_jrs, true); - RenX_LoggingPlugin::speedHackPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "SpeedHackPublic"_jrs, false); - RenX_LoggingPlugin::playerPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "PlayerPublic"_jrs, false); - RenX_LoggingPlugin::chatPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "ChatPublic"_jrs, true); - RenX_LoggingPlugin::teamChatPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "TeamChatPublic"_jrs, false); - RenX_LoggingPlugin::radioChatPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "RadioChatPublic"_jrs, false); - RenX_LoggingPlugin::hostChatPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "HostChatPublic"_jrs, true); - RenX_LoggingPlugin::hostPagePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "HostPagePublic"_jrs, false); - RenX_LoggingPlugin::otherChatPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "OtherChatPublic"_jrs, false); - RenX_LoggingPlugin::deployPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DeployPublic"_jrs, true); - RenX_LoggingPlugin::mineDeployPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "MineDeployPublic"_jrs, false); - RenX_LoggingPlugin::overMinePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "OverMinePublic"_jrs, false); - RenX_LoggingPlugin::disarmPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DisarmPublic"_jrs, true); - RenX_LoggingPlugin::mineDisarmPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "MineDisarmPublic"_jrs, false); - RenX_LoggingPlugin::explodePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "ExplodePublic"_jrs, false); - RenX_LoggingPlugin::suicidePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "SuicidePublic"_jrs, true); - RenX_LoggingPlugin::killPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "KillPublic"_jrs, true); - RenX_LoggingPlugin::diePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DiePublic"_jrs, true); - RenX_LoggingPlugin::destroyPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DestroyPublic"_jrs, true); - RenX_LoggingPlugin::capturePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "CapturePublic"_jrs, true); - RenX_LoggingPlugin::neutralizePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "NeutralizePublic"_jrs, true); - RenX_LoggingPlugin::characterPurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "CharacterPurchasePublic"_jrs, false); - RenX_LoggingPlugin::itemPurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "ItemPurchasePublic"_jrs, false); - RenX_LoggingPlugin::weaponPurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "WeaponPurchasePublic"_jrs, false); - RenX_LoggingPlugin::refillPurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "RefillPurchasePublic"_jrs, false); - RenX_LoggingPlugin::vehiclePurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "VehiclePurchasePublic"_jrs, false); - RenX_LoggingPlugin::vehicleSpawnPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "VehicleSpawnPublic"_jrs, true); - RenX_LoggingPlugin::spawnPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "SpawnPublic"_jrs, true); - RenX_LoggingPlugin::botJoinPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "BotJoinPublic"_jrs, true); - RenX_LoggingPlugin::vehicleCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "VehicleCratePublic"_jrs, false); - RenX_LoggingPlugin::TSVehicleCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "TSVehicleCratePublic"_jrs, RenX_LoggingPlugin::vehicleCratePublic); - RenX_LoggingPlugin::RAVehicleCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "RAVehicleCratePublic"_jrs, RenX_LoggingPlugin::vehicleCratePublic); - RenX_LoggingPlugin::deathCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DeathCratePublic"_jrs, true); - RenX_LoggingPlugin::moneyCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "MoneyCratePublic"_jrs, false); - RenX_LoggingPlugin::characterCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "CharacterCratePublic"_jrs, false); - RenX_LoggingPlugin::spyCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "SpyCratePublic"_jrs, false); - RenX_LoggingPlugin::refillCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "RefillCratePublic"_jrs, false); - RenX_LoggingPlugin::timeBombCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "TimeBombCratePublic"_jrs, false); - RenX_LoggingPlugin::speedCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "SpeedCratePublic"_jrs, false); - RenX_LoggingPlugin::nukeCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "NukeCratePublic"_jrs, true); - RenX_LoggingPlugin::abductionCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "AbductionCratePublic"_jrs, true); - RenX_LoggingPlugin::unspecifiedCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "UnspecifiedCratePublic"_jrs, false); - RenX_LoggingPlugin::otherCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "OtherCratePublic"_jrs, false); - RenX_LoggingPlugin::stealPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "StealPublic"_jrs, true); - RenX_LoggingPlugin::donatePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DonatePublic"_jrs, true); - RenX_LoggingPlugin::gamePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "GamePublic"_jrs, true); - RenX_LoggingPlugin::gameOverPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "GameOverPublic"_jrs, true); - RenX_LoggingPlugin::executePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "ExecutePublic"_jrs, false); - RenX_LoggingPlugin::subscribePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "SubscribePublic"_jrs, false); - RenX_LoggingPlugin::RCONPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "RCONPublic"_jrs, false); - RenX_LoggingPlugin::adminLoginPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "AdminLoginPublic"_jrs, true); - RenX_LoggingPlugin::adminGrantPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "AdminGrantPublic"_jrs, true); - RenX_LoggingPlugin::adminLogoutPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "AdminLogoutPublic"_jrs, true); - RenX_LoggingPlugin::adminPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "AdminPublic"_jrs, false); - RenX_LoggingPlugin::voteCallPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "VoteCallPublic"_jrs, true); - RenX_LoggingPlugin::voteOverPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "VoteOverPublic"_jrs, true); - RenX_LoggingPlugin::voteCancelPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "VoteCancelPublic"_jrs, true); - RenX_LoggingPlugin::votePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "VotePublic"_jrs, false); - RenX_LoggingPlugin::mapChangePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "MapChangePublic"_jrs, true); - RenX_LoggingPlugin::mapLoadPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "MapLoadPublic"_jrs, true); - RenX_LoggingPlugin::mapStartPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "MapStartPublic"_jrs, true); - RenX_LoggingPlugin::mapPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "MapPublic"_jrs, false); - RenX_LoggingPlugin::demoRecordPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DemoRecordPublic"_jrs, true); - RenX_LoggingPlugin::demoRecordStopPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DemoRecordStopPublic"_jrs, true); - RenX_LoggingPlugin::demoPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "DemoPublic"_jrs, false); - RenX_LoggingPlugin::logPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "LogPublic"_jrs, false); - RenX_LoggingPlugin::commandPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "CommandPublic"_jrs, false); - RenX_LoggingPlugin::errorPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "ErrorPublic"_jrs, false); - RenX_LoggingPlugin::versionPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "VersionPublic"_jrs, true); - RenX_LoggingPlugin::authorizedPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "AuthorizedPublic"_jrs, true); - RenX_LoggingPlugin::otherPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), "OtherPublic"_jrs, false); +bool RenX_LoggingPlugin::initialize() +{ + RenX_LoggingPlugin::muteOwnExecute = this->config.getBool(Jupiter::ReferenceString::empty, "MuteOwnExecute"_jrs, true); + RenX_LoggingPlugin::playerRDNSPublic = this->config.getBool(Jupiter::ReferenceString::empty, "PlayerRDNSPublic"_jrs, false); + RenX_LoggingPlugin::joinPublic = this->config.getBool(Jupiter::ReferenceString::empty, "JoinPublic"_jrs, true); + RenX_LoggingPlugin::partPublic = this->config.getBool(Jupiter::ReferenceString::empty, "PartPublic"_jrs, true); + RenX_LoggingPlugin::kickPublic = this->config.getBool(Jupiter::ReferenceString::empty, "KickPublic"_jrs, true); + RenX_LoggingPlugin::nameChangePublic = this->config.getBool(Jupiter::ReferenceString::empty, "NameChangePublic"_jrs, true); + RenX_LoggingPlugin::teamChangePublic = this->config.getBool(Jupiter::ReferenceString::empty, "TeamChangePublic"_jrs, true); + RenX_LoggingPlugin::speedHackPublic = this->config.getBool(Jupiter::ReferenceString::empty, "SpeedHackPublic"_jrs, false); + RenX_LoggingPlugin::playerPublic = this->config.getBool(Jupiter::ReferenceString::empty, "PlayerPublic"_jrs, false); + RenX_LoggingPlugin::chatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "ChatPublic"_jrs, true); + RenX_LoggingPlugin::teamChatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "TeamChatPublic"_jrs, false); + RenX_LoggingPlugin::radioChatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "RadioChatPublic"_jrs, false); + RenX_LoggingPlugin::hostChatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "HostChatPublic"_jrs, true); + RenX_LoggingPlugin::hostPagePublic = this->config.getBool(Jupiter::ReferenceString::empty, "HostPagePublic"_jrs, false); + RenX_LoggingPlugin::otherChatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "OtherChatPublic"_jrs, false); + RenX_LoggingPlugin::deployPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DeployPublic"_jrs, true); + RenX_LoggingPlugin::mineDeployPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MineDeployPublic"_jrs, false); + RenX_LoggingPlugin::overMinePublic = this->config.getBool(Jupiter::ReferenceString::empty, "OverMinePublic"_jrs, false); + RenX_LoggingPlugin::disarmPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DisarmPublic"_jrs, true); + RenX_LoggingPlugin::mineDisarmPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MineDisarmPublic"_jrs, false); + RenX_LoggingPlugin::explodePublic = this->config.getBool(Jupiter::ReferenceString::empty, "ExplodePublic"_jrs, false); + RenX_LoggingPlugin::suicidePublic = this->config.getBool(Jupiter::ReferenceString::empty, "SuicidePublic"_jrs, true); + RenX_LoggingPlugin::killPublic = this->config.getBool(Jupiter::ReferenceString::empty, "KillPublic"_jrs, true); + RenX_LoggingPlugin::diePublic = this->config.getBool(Jupiter::ReferenceString::empty, "DiePublic"_jrs, true); + RenX_LoggingPlugin::destroyPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DestroyPublic"_jrs, true); + RenX_LoggingPlugin::capturePublic = this->config.getBool(Jupiter::ReferenceString::empty, "CapturePublic"_jrs, true); + RenX_LoggingPlugin::neutralizePublic = this->config.getBool(Jupiter::ReferenceString::empty, "NeutralizePublic"_jrs, true); + RenX_LoggingPlugin::characterPurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "CharacterPurchasePublic"_jrs, false); + RenX_LoggingPlugin::itemPurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "ItemPurchasePublic"_jrs, false); + RenX_LoggingPlugin::weaponPurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "WeaponPurchasePublic"_jrs, false); + RenX_LoggingPlugin::refillPurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "RefillPurchasePublic"_jrs, false); + RenX_LoggingPlugin::vehiclePurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "VehiclePurchasePublic"_jrs, false); + RenX_LoggingPlugin::vehicleSpawnPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VehicleSpawnPublic"_jrs, true); + RenX_LoggingPlugin::spawnPublic = this->config.getBool(Jupiter::ReferenceString::empty, "SpawnPublic"_jrs, true); + RenX_LoggingPlugin::botJoinPublic = this->config.getBool(Jupiter::ReferenceString::empty, "BotJoinPublic"_jrs, true); + RenX_LoggingPlugin::vehicleCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "VehicleCratePublic"_jrs, false); + RenX_LoggingPlugin::TSVehicleCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "TSVehicleCratePublic"_jrs, RenX_LoggingPlugin::vehicleCratePublic); + RenX_LoggingPlugin::RAVehicleCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "RAVehicleCratePublic"_jrs, RenX_LoggingPlugin::vehicleCratePublic); + RenX_LoggingPlugin::deathCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "DeathCratePublic"_jrs, true); + RenX_LoggingPlugin::moneyCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "MoneyCratePublic"_jrs, false); + RenX_LoggingPlugin::characterCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "CharacterCratePublic"_jrs, false); + RenX_LoggingPlugin::spyCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "SpyCratePublic"_jrs, false); + RenX_LoggingPlugin::refillCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "RefillCratePublic"_jrs, false); + RenX_LoggingPlugin::timeBombCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "TimeBombCratePublic"_jrs, false); + RenX_LoggingPlugin::speedCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "SpeedCratePublic"_jrs, false); + RenX_LoggingPlugin::nukeCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "NukeCratePublic"_jrs, true); + RenX_LoggingPlugin::abductionCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "AbductionCratePublic"_jrs, true); + RenX_LoggingPlugin::unspecifiedCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "UnspecifiedCratePublic"_jrs, false); + RenX_LoggingPlugin::otherCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "OtherCratePublic"_jrs, false); + RenX_LoggingPlugin::stealPublic = this->config.getBool(Jupiter::ReferenceString::empty, "StealPublic"_jrs, true); + RenX_LoggingPlugin::donatePublic = this->config.getBool(Jupiter::ReferenceString::empty, "DonatePublic"_jrs, true); + RenX_LoggingPlugin::gamePublic = this->config.getBool(Jupiter::ReferenceString::empty, "GamePublic"_jrs, true); + RenX_LoggingPlugin::gameOverPublic = this->config.getBool(Jupiter::ReferenceString::empty, "GameOverPublic"_jrs, true); + RenX_LoggingPlugin::executePublic = this->config.getBool(Jupiter::ReferenceString::empty, "ExecutePublic"_jrs, false); + RenX_LoggingPlugin::subscribePublic = this->config.getBool(Jupiter::ReferenceString::empty, "SubscribePublic"_jrs, false); + RenX_LoggingPlugin::RCONPublic = this->config.getBool(Jupiter::ReferenceString::empty, "RCONPublic"_jrs, false); + RenX_LoggingPlugin::adminLoginPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AdminLoginPublic"_jrs, true); + RenX_LoggingPlugin::adminGrantPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AdminGrantPublic"_jrs, true); + RenX_LoggingPlugin::adminLogoutPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AdminLogoutPublic"_jrs, true); + RenX_LoggingPlugin::adminPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AdminPublic"_jrs, false); + RenX_LoggingPlugin::voteCallPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VoteCallPublic"_jrs, true); + RenX_LoggingPlugin::voteOverPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VoteOverPublic"_jrs, true); + RenX_LoggingPlugin::voteCancelPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VoteCancelPublic"_jrs, true); + RenX_LoggingPlugin::votePublic = this->config.getBool(Jupiter::ReferenceString::empty, "VotePublic"_jrs, false); + RenX_LoggingPlugin::mapChangePublic = this->config.getBool(Jupiter::ReferenceString::empty, "MapChangePublic"_jrs, true); + RenX_LoggingPlugin::mapLoadPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MapLoadPublic"_jrs, true); + RenX_LoggingPlugin::mapStartPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MapStartPublic"_jrs, true); + RenX_LoggingPlugin::mapPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MapPublic"_jrs, false); + RenX_LoggingPlugin::demoRecordPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DemoRecordPublic"_jrs, true); + RenX_LoggingPlugin::demoRecordStopPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DemoRecordStopPublic"_jrs, true); + RenX_LoggingPlugin::demoPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DemoPublic"_jrs, false); + RenX_LoggingPlugin::logPublic = this->config.getBool(Jupiter::ReferenceString::empty, "LogPublic"_jrs, false); + RenX_LoggingPlugin::commandPublic = this->config.getBool(Jupiter::ReferenceString::empty, "CommandPublic"_jrs, false); + RenX_LoggingPlugin::errorPublic = this->config.getBool(Jupiter::ReferenceString::empty, "ErrorPublic"_jrs, false); + RenX_LoggingPlugin::versionPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VersionPublic"_jrs, true); + RenX_LoggingPlugin::authorizedPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AuthorizedPublic"_jrs, true); + RenX_LoggingPlugin::otherPublic = this->config.getBool(Jupiter::ReferenceString::empty, "OtherPublic"_jrs, false); /** Event formats */ - RenX_LoggingPlugin::playerRDNSFmt = Jupiter::IRC::Client::Config->get(this->getName(), "PlayerRDNSFormat"_jrs, + RenX_LoggingPlugin::playerRDNSFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerRDNSFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "05[RDNS] " IRCBOLD "%.*s" IRCNORMAL "'s hostname is " IRCBOLD "%.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->rdnsTag.size(), RenX::tags->rdnsTag.ptr())); - RenX_LoggingPlugin::joinPublicFmt = Jupiter::IRC::Client::Config->get(this->getName(), "JoinPublicFormat"_jrs, + RenX_LoggingPlugin::joinPublicFmt = this->config.get(Jupiter::ReferenceString::empty, "JoinPublicFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "12[Join] " IRCBOLD "%.*s" IRCBOLD " joined the game fighting for the %.*s!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr())); - RenX_LoggingPlugin::joinAdminFmt = Jupiter::IRC::Client::Config->get(this->getName(), "JoinAdminFormat"_jrs, + RenX_LoggingPlugin::joinAdminFmt = this->config.get(Jupiter::ReferenceString::empty, "JoinAdminFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "12[Join] " IRCBOLD "%.*s" IRCBOLD " joined the game fighting for the %.*s from " IRCBOLD "%.*s" IRCBOLD " using Steam ID " IRCBOLD "%.*s" IRCBOLD ". HWID: \"" IRCBOLD "%.*s" IRCBOLD "\"", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr(), RenX::tags->ipTag.size(), RenX::tags->ipTag.ptr(), RenX::tags->steamTag.size(), RenX::tags->steamTag.ptr(), RenX::tags->hwidTag.size(), RenX::tags->hwidTag.ptr())); - RenX_LoggingPlugin::joinNoSteamAdminFmt = Jupiter::IRC::Client::Config->get(this->getName(), "JoinNoSteamAdminFormat"_jrs, + RenX_LoggingPlugin::joinNoSteamAdminFmt = this->config.get(Jupiter::ReferenceString::empty, "JoinNoSteamAdminFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "12[Join] " IRCBOLD "%.*s" IRCBOLD " joined the game fighting for the %.*s from " IRCBOLD "%.*s" IRCBOLD ", but is " IRCBOLD "not" IRCBOLD " using Steam. HWID: \"" IRCBOLD "%.*s" IRCBOLD "\"", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr(), RenX::tags->ipTag.size(), RenX::tags->ipTag.ptr(), RenX::tags->hwidTag.size(), RenX::tags->hwidTag.ptr())); - RenX_LoggingPlugin::partFmt = Jupiter::IRC::Client::Config->get(this->getName(), "PartFormat"_jrs, + RenX_LoggingPlugin::partFmt = this->config.get(Jupiter::ReferenceString::empty, "PartFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "12[Part] " IRCBOLD "%.*s" IRCBOLD " left the %.*s.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr())); - RenX_LoggingPlugin::kickFmt = Jupiter::IRC::Client::Config->get(this->getName(), "KickFormat"_jrs, + RenX_LoggingPlugin::kickFmt = this->config.get(Jupiter::ReferenceString::empty, "KickFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "04[Kick] " IRCBOLD "%.*s" IRCCOLOR IRCBOLD " was " IRCBOLD IRCCOLOR "04kicked" IRCCOLOR IRCBOLD " (" IRCCOLOR "04%.*s" IRCCOLOR ")", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::playerExecuteFmt = Jupiter::IRC::Client::Config->get(this->getName(), "PlayerExecuteFormat"_jrs, + RenX_LoggingPlugin::playerExecuteFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerExecuteFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR "07 executed: %.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::playerFmt = Jupiter::IRC::Client::Config->get(this->getName(), "PlayerFormat"_jrs, + RenX_LoggingPlugin::playerFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "12[Player]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::nameChangeFmt = Jupiter::IRC::Client::Config->get(this->getName(), "NameChangeFormat"_jrs, + RenX_LoggingPlugin::nameChangeFmt = this->config.get(Jupiter::ReferenceString::empty, "NameChangeFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD " changed their name to " IRCBOLD "%.*s" IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->newNameTag.size(), RenX::tags->newNameTag.ptr())); - RenX_LoggingPlugin::teamChangeFmt = Jupiter::IRC::Client::Config->get(this->getName(), "TeamChangeFormat"_jrs, + RenX_LoggingPlugin::teamChangeFmt = this->config.get(Jupiter::ReferenceString::empty, "TeamChangeFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR " switched teams!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::speedHackFmt = Jupiter::IRC::Client::Config->get(this->getName(), "SpeedHackFormat"_jrs, + RenX_LoggingPlugin::speedHackFmt = this->config.get(Jupiter::ReferenceString::empty, "SpeedHackFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "04[SpeedHack] " IRCBOLD "%.*s" IRCBOLD " has thrown a Speed Hack warning!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::chatFmt = Jupiter::IRC::Client::Config->get(this->getName(), "ChatFormat"_jrs, + RenX_LoggingPlugin::chatFmt = this->config.get(Jupiter::ReferenceString::empty, "ChatFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD ": %.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::teamChatFmt = Jupiter::IRC::Client::Config->get(this->getName(), "TeamChatFormat"_jrs, + RenX_LoggingPlugin::teamChatFmt = this->config.get(Jupiter::ReferenceString::empty, "TeamChatFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD ": %.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::radioChatFmt = Jupiter::IRC::Client::Config->get(this->getName(), "RadioChatFormat"_jrs, + RenX_LoggingPlugin::radioChatFmt = this->config.get(Jupiter::ReferenceString::empty, "RadioChatFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD ": \x1D%.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::hostChatFmt = Jupiter::IRC::Client::Config->get(this->getName(), "HostChatFormat"_jrs, + RenX_LoggingPlugin::hostChatFmt = this->config.get(Jupiter::ReferenceString::empty, "HostChatFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "12Host" IRCCOLOR "0: %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::hostPageFmt = Jupiter::IRC::Client::Config->get(this->getName(), "HostPageFormat"_jrs, + RenX_LoggingPlugin::hostPageFmt = this->config.get(Jupiter::ReferenceString::empty, "HostPageFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "12(Host -> %.*s): %.*s", RenX::tags->rawNameTag.size(), RenX::tags->rawNameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::otherChatFmt = Jupiter::IRC::Client::Config->get(this->getName(), "OtherChatFormat"_jrs, + RenX_LoggingPlugin::otherChatFmt = this->config.get(Jupiter::ReferenceString::empty, "OtherChatFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "06[Other Chat]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::deployFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DeployFormat"_jrs, + RenX_LoggingPlugin::deployFmt = this->config.get(Jupiter::ReferenceString::empty, "DeployFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " deployed a " IRCBOLD IRCCOLOR "12%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::mineDeployFmt = Jupiter::IRC::Client::Config->get(this->getName(), "MineDeployFormat"_jrs, + RenX_LoggingPlugin::mineDeployFmt = this->config.get(Jupiter::ReferenceString::empty, "MineDeployFormat"_jrs, RenX_LoggingPlugin::deployFmt); - RenX_LoggingPlugin::overMineFmt = Jupiter::IRC::Client::Config->get(this->getName(), "OverMineFormat"_jrs, + RenX_LoggingPlugin::overMineFmt = this->config.get(Jupiter::ReferenceString::empty, "OverMineFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " is " IRCCOLOR "04over-mining" IRCCOLOR ": " IRCBOLD IRCCOLOR "12%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::disarmFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DisarmFormat"_jrs, + RenX_LoggingPlugin::disarmFmt = this->config.get(Jupiter::ReferenceString::empty, "DisarmFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " disarmed %.*s" IRCBOLD IRCCOLOR "'s " IRCCOLOR "12%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::mineDisarmFmt = Jupiter::IRC::Client::Config->get(this->getName(), "MineDisarmFormat"_jrs, + RenX_LoggingPlugin::mineDisarmFmt = this->config.get(Jupiter::ReferenceString::empty, "MineDisarmFormat"_jrs, RenX_LoggingPlugin::disarmFmt); - RenX_LoggingPlugin::disarmNoOwnerFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DisarmNoOwnerFormat"_jrs, + RenX_LoggingPlugin::disarmNoOwnerFmt = this->config.get(Jupiter::ReferenceString::empty, "DisarmNoOwnerFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD " disarmed a " IRCBOLD "%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::mineDisarmNoOwnerFmt = Jupiter::IRC::Client::Config->get(this->getName(), "MineDisarmNoOwnerFormat"_jrs, + RenX_LoggingPlugin::mineDisarmNoOwnerFmt = this->config.get(Jupiter::ReferenceString::empty, "MineDisarmNoOwnerFormat"_jrs, RenX_LoggingPlugin::disarmNoOwnerFmt); - RenX_LoggingPlugin::explodeFmt = Jupiter::IRC::Client::Config->get(this->getName(), "ExplodeFormat"_jrs, + RenX_LoggingPlugin::explodeFmt = this->config.get(Jupiter::ReferenceString::empty, "ExplodeFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR " detonated a " IRCCOLOR "07%.*s" IRCCOLOR ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::explodeNoOwnerFmt = Jupiter::IRC::Client::Config->get(this->getName(), "ExplodeNoOwnerFormat"_jrs, + RenX_LoggingPlugin::explodeNoOwnerFmt = this->config.get(Jupiter::ReferenceString::empty, "ExplodeNoOwnerFormat"_jrs, Jupiter::StringS::Format("A " IRCCOLOR "07%.*s" IRCCOLOR " detonated.", RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::suicideFmt = Jupiter::IRC::Client::Config->get(this->getName(), "SuicideFormat"_jrs, + RenX_LoggingPlugin::suicideFmt = this->config.get(Jupiter::ReferenceString::empty, "SuicideFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR " suicided (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::killFmt = Jupiter::IRC::Client::Config->get(this->getName(), "KillFormat"_jrs, + RenX_LoggingPlugin::killFmt = this->config.get(Jupiter::ReferenceString::empty, "KillFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR " killed %.*s" IRCCOLOR " (" IRCCOLOR "%.*s%.*s/%.*s" IRCCOLOR " vs " IRCCOLOR "%.*s%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->characterTag.size(), RenX::tags->characterTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr())); - RenX_LoggingPlugin::killFmt2 = Jupiter::IRC::Client::Config->get(this->getName(), "KillFormat2"_jrs, + RenX_LoggingPlugin::killFmt2 = this->config.get(Jupiter::ReferenceString::empty, "KillFormat2"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " killed %.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::dieFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DieFormat"_jrs, + RenX_LoggingPlugin::dieFmt = this->config.get(Jupiter::ReferenceString::empty, "DieFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR " died (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::dieFmt2 = Jupiter::IRC::Client::Config->get(this->getName(), "DieFormat2"_jrs, + RenX_LoggingPlugin::dieFmt2 = this->config.get(Jupiter::ReferenceString::empty, "DieFormat2"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " died (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::destroyBuildingFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DestroyBuildingFormat"_jrs, + RenX_LoggingPlugin::destroyBuildingFmt = this->config.get(Jupiter::ReferenceString::empty, "DestroyBuildingFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR " destroyed the " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::destroyBuildingFmt2 = Jupiter::IRC::Client::Config->get(this->getName(), "DestroyBuildingFormat2"_jrs, + RenX_LoggingPlugin::destroyBuildingFmt2 = this->config.get(Jupiter::ReferenceString::empty, "DestroyBuildingFormat2"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " destroyed the " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::destroyDefenceFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DestroyDefenceFormat"_jrs, + RenX_LoggingPlugin::destroyDefenceFmt = this->config.get(Jupiter::ReferenceString::empty, "DestroyDefenceFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR " destroyed a " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::destroyDefenceFmt2 = Jupiter::IRC::Client::Config->get(this->getName(), "DestroyDefenceFormat2"_jrs, + RenX_LoggingPlugin::destroyDefenceFmt2 = this->config.get(Jupiter::ReferenceString::empty, "DestroyDefenceFormat2"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " destroyed a " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::destroyVehicleFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DestroyVehicleFormat"_jrs, + RenX_LoggingPlugin::destroyVehicleFmt = this->config.get(Jupiter::ReferenceString::empty, "DestroyVehicleFormat"_jrs, Jupiter::StringS::Format("%.*s" IRCCOLOR " destroyed a " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::destroyVehicleFmt2 = Jupiter::IRC::Client::Config->get(this->getName(), "DestroyVehicleFormat2"_jrs, + RenX_LoggingPlugin::destroyVehicleFmt2 = this->config.get(Jupiter::ReferenceString::empty, "DestroyVehicleFormat2"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " destroyed a " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::captureFmt = Jupiter::IRC::Client::Config->get(this->getName(), "CaptureFormat"_jrs, + RenX_LoggingPlugin::captureFmt = this->config.get(Jupiter::ReferenceString::empty, "CaptureFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " captured the " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::neutralizeFmt = Jupiter::IRC::Client::Config->get(this->getName(), "NeutralizeFormat"_jrs, + RenX_LoggingPlugin::neutralizeFmt = this->config.get(Jupiter::ReferenceString::empty, "NeutralizeFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " neutralized the " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::characterPurchaseFmt = Jupiter::IRC::Client::Config->get(this->getName(), "CharacterPurchaseFormat"_jrs, + RenX_LoggingPlugin::characterPurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "CharacterPurchaseFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr())); - RenX_LoggingPlugin::itemPurchaseFmt = Jupiter::IRC::Client::Config->get(this->getName(), "ItemPurchaseFormat"_jrs, + RenX_LoggingPlugin::itemPurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "ItemPurchaseFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::weaponPurchaseFmt = Jupiter::IRC::Client::Config->get(this->getName(), "WeaponPurchaseFormat"_jrs, + RenX_LoggingPlugin::weaponPurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "WeaponPurchaseFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::refillPurchaseFmt = Jupiter::IRC::Client::Config->get(this->getName(), "RefillPurchaseFormat"_jrs, + RenX_LoggingPlugin::refillPurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "RefillPurchaseFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*srefill" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr())); - RenX_LoggingPlugin::vehiclePurchaseFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VehiclePurchaseFormat"_jrs, + RenX_LoggingPlugin::vehiclePurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "VehiclePurchaseFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->victimVehicleTag.size(), RenX::tags->victimVehicleTag.ptr())); - RenX_LoggingPlugin::vehicleSpawnFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VehicleSpawnFormat"_jrs, + RenX_LoggingPlugin::vehicleSpawnFmt = this->config.get(Jupiter::ReferenceString::empty, "VehicleSpawnFormat"_jrs, Jupiter::StringS::Format("A " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD " has spawned.", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->vehicleTag.size(), RenX::tags->vehicleTag.ptr())); - RenX_LoggingPlugin::spawnFmt = Jupiter::IRC::Client::Config->get(this->getName(), "SpawnFormat"_jrs, + RenX_LoggingPlugin::spawnFmt = this->config.get(Jupiter::ReferenceString::empty, "SpawnFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " spawned as a " IRCCOLOR "%.*s%.*s.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr())); - RenX_LoggingPlugin::botJoinFmt = Jupiter::IRC::Client::Config->get(this->getName(), "BotJoinFormat"_jrs, + RenX_LoggingPlugin::botJoinFmt = this->config.get(Jupiter::ReferenceString::empty, "BotJoinFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " online.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::vehicleCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VehicleCrateFormat"_jrs, + RenX_LoggingPlugin::vehicleCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "VehicleCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "12%.*s" IRCCOLOR " vehicle crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::TSVehicleCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "TSVehicleCrateFormat"_jrs, + RenX_LoggingPlugin::TSVehicleCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "TSVehicleCrateFormat"_jrs, RenX_LoggingPlugin::vehicleCrateFmt); - RenX_LoggingPlugin::RAVehicleCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "RAVehicleCrateFormat"_jrs, + RenX_LoggingPlugin::RAVehicleCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "RAVehicleCrateFormat"_jrs, RenX_LoggingPlugin::vehicleCrateFmt); - RenX_LoggingPlugin::deathCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DeathCrateFormat"_jrs, + RenX_LoggingPlugin::deathCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "DeathCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "12death" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::moneyCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "MoneyCrateFormat"_jrs, + RenX_LoggingPlugin::moneyCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "MoneyCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up " IRCCOLOR "09%.*s credits" IRCCOLOR " from a " IRCCOLOR "12money" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::characterCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "CharacterCrateFormat"_jrs, + RenX_LoggingPlugin::characterCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "CharacterCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "%.*s%.*s" IRCCOLOR " " IRCCOLOR "12character" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr())); - RenX_LoggingPlugin::spyCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "SpyCrateFormat"_jrs, + RenX_LoggingPlugin::spyCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "SpyCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "%.*s%.*s" IRCCOLOR " " IRCCOLOR "12spy" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr())); - RenX_LoggingPlugin::refillCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "RefillCrateFormat"_jrs, + RenX_LoggingPlugin::refillCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "RefillCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "%.*srefill" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr())); - RenX_LoggingPlugin::timeBombCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "TimeBombCrateFormat"_jrs, + RenX_LoggingPlugin::timeBombCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "TimeBombCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "11time-bomb" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::speedCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "SpeedCrateFormat"_jrs, + RenX_LoggingPlugin::speedCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "SpeedCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "11speed" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::nukeCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "NukeCrateFormat"_jrs, + RenX_LoggingPlugin::nukeCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "NukeCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "04nuke" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::abductionCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "AbductionCrateFormat"_jrs, + RenX_LoggingPlugin::abductionCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "AbductionCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " has been " IRCBOLD IRCCOLOR "06abducted" IRCCOLOR IRCBOLD " by the " IRCBOLD IRCCOLOR "06Scrin" IRCCOLOR IRCBOLD "!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::unspecifiedCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "UnspecifiedCrateFormat"_jrs, + RenX_LoggingPlugin::unspecifiedCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "UnspecifiedCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up an " IRCCOLOR "13unspecified" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::otherCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "OtherCrateFormat"_jrs, + RenX_LoggingPlugin::otherCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "OtherCrateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "13%.*s" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::stealFmt = Jupiter::IRC::Client::Config->get(this->getName(), "StealFormat"_jrs, + RenX_LoggingPlugin::stealFmt = this->config.get(Jupiter::ReferenceString::empty, "StealFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " stole " IRCBOLD "%.*s" IRCBOLD "'s " IRCBOLD "%.*s" IRCBOLD "!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::stealNoOwnerFmt = Jupiter::IRC::Client::Config->get(this->getName(), "StealNoOwnerFormat"_jrs, + RenX_LoggingPlugin::stealNoOwnerFmt = this->config.get(Jupiter::ReferenceString::empty, "StealNoOwnerFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " stole a " IRCBOLD IRCCOLOR "12%.*s" IRCBOLD "!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::donateFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DonateFormat"_jrs, + RenX_LoggingPlugin::donateFmt = this->config.get(Jupiter::ReferenceString::empty, "DonateFormat"_jrs, Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " donated " IRCCOLOR "09%.*s credits" IRCCOLOR " to " IRCBOLD "%.*s" IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr())); - RenX_LoggingPlugin::gameOverFmt = Jupiter::IRC::Client::Config->get(this->getName(), "GameOverFormat"_jrs, + RenX_LoggingPlugin::gameOverFmt = this->config.get(Jupiter::ReferenceString::empty, "GameOverFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR "%.*s The " IRCBOLD "%.*s" IRCBOLD " won by " IRCBOLD "%.*s" IRCBOLD, RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::gameOverTieFmt = Jupiter::IRC::Client::Config->get(this->getName(), "GameOverTieNoWinFormat"_jrs, + RenX_LoggingPlugin::gameOverTieFmt = this->config.get(Jupiter::ReferenceString::empty, "GameOverTieNoWinFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR "10 The battle ended in a " IRCBOLD "%.*s" IRCBOLD " - Victory handed to " IRCBOLD IRCCOLOR "%.*s%.*s" IRCBOLD, RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr())); - RenX_LoggingPlugin::gameOverTieNoWinFmt = Jupiter::IRC::Client::Config->get(this->getName(), "GameOverTieFormat"_jrs, + RenX_LoggingPlugin::gameOverTieNoWinFmt = this->config.get(Jupiter::ReferenceString::empty, "GameOverTieFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR "10 The battle ended in a " IRCBOLD "%.*s" IRCBOLD, RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::gameOverScoreFmt = Jupiter::IRC::Client::Config->get(this->getName(), "GameOverScoreFormat"_jrs, + RenX_LoggingPlugin::gameOverScoreFmt = this->config.get(Jupiter::ReferenceString::empty, "GameOverScoreFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR "%.*s %.*s" IRCCOLOR ": %.*s | " IRCCOLOR "%.*s%.*s" IRCCOLOR ": %.*s", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr(), RenX::tags->winScoreTag.size(), RenX::tags->winScoreTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->victimTeamLongTag.size(), RenX::tags->victimTeamLongTag.ptr(), RenX::tags->loseScoreTag.size(), RenX::tags->loseScoreTag.ptr())); - RenX_LoggingPlugin::gameFmt = Jupiter::IRC::Client::Config->get(this->getName(), "GameFormat"_jrs, + RenX_LoggingPlugin::gameFmt = this->config.get(Jupiter::ReferenceString::empty, "GameFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::executeFmt = Jupiter::IRC::Client::Config->get(this->getName(), "ExecuteFormat"_jrs, + RenX_LoggingPlugin::executeFmt = this->config.get(Jupiter::ReferenceString::empty, "ExecuteFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "07%.*s executed: %.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::devBotExecuteFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DevBotExecuteFormat"_jrs); + RenX_LoggingPlugin::devBotExecuteFmt = this->config.get(Jupiter::ReferenceString::empty, "DevBotExecuteFormat"_jrs); - RenX_LoggingPlugin::subscribeFmt = Jupiter::IRC::Client::Config->get(this->getName(), "SubscribeFormat"_jrs, + RenX_LoggingPlugin::subscribeFmt = this->config.get(Jupiter::ReferenceString::empty, "SubscribeFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03%.*s subscribed to the RCON data stream.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::rconFmt = Jupiter::IRC::Client::Config->get(this->getName(), "RCONFormat"_jrs, + RenX_LoggingPlugin::rconFmt = this->config.get(Jupiter::ReferenceString::empty, "RCONFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "05[RCON]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::adminLoginFmt = Jupiter::IRC::Client::Config->get(this->getName(), "AdminLoginFormat"_jrs, + RenX_LoggingPlugin::adminLoginFmt = this->config.get(Jupiter::ReferenceString::empty, "AdminLoginFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "07[Admin] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR " logged in with " IRCCOLOR "07" IRCBOLD "%.*s" IRCBOLD IRCNORMAL " privledges.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->adminTag.size(), RenX::tags->adminTag.ptr())); - RenX_LoggingPlugin::adminGrantFmt = Jupiter::IRC::Client::Config->get(this->getName(), "AdminGrantFormat"_jrs, + RenX_LoggingPlugin::adminGrantFmt = this->config.get(Jupiter::ReferenceString::empty, "AdminGrantFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "07[Admin] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR " was granted " IRCCOLOR "07" IRCBOLD "%.*s" IRCBOLD IRCNORMAL " privledges.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->adminTag.size(), RenX::tags->adminTag.ptr())); - RenX_LoggingPlugin::adminLogoutFmt = Jupiter::IRC::Client::Config->get(this->getName(), "AdminLogoutFormat"_jrs, + RenX_LoggingPlugin::adminLogoutFmt = this->config.get(Jupiter::ReferenceString::empty, "AdminLogoutFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "07[Admin] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR " logged out of their " IRCCOLOR "07" IRCBOLD "%.*s" IRCBOLD IRCNORMAL " privledges.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->adminTag.size(), RenX::tags->adminTag.ptr())); - RenX_LoggingPlugin::adminFmt = Jupiter::IRC::Client::Config->get(this->getName(), "AdminFormat"_jrs, + RenX_LoggingPlugin::adminFmt = this->config.get(Jupiter::ReferenceString::empty, "AdminFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "07[Admin]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::voteAddBotsFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteAddBotsFormat"_jrs, + RenX_LoggingPlugin::voteAddBotsFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteAddBotsFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called for adding " IRCCOLOR "12%.*s" IRCCOLOR " bots to %.*s, with skill level " IRCCOLOR "07%.*s" IRCCOLOR ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamShortTag.size(), RenX::tags->victimTeamShortTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); - RenX_LoggingPlugin::voteChangeMapFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteChangeMapFormat"_jrs, + RenX_LoggingPlugin::voteChangeMapFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteChangeMapFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called for a Map Change.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::voteKickFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteKickFormat"_jrs, + RenX_LoggingPlugin::voteKickFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteKickFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called for a kick against %.*s" IRCNORMAL ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr())); - RenX_LoggingPlugin::voteMineBanFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteMineBanFormat"_jrs, + RenX_LoggingPlugin::voteMineBanFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteMineBanFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] " IRCBOLD "%.*s" IRCBOLD " has called for a Mine Ban against %.*s" IRCNORMAL ".", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::voteRemoveBotsFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteRemoveBotsFormat"_jrs, + RenX_LoggingPlugin::voteRemoveBotsFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteRemoveBotsFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called a vote to remove " IRCCOLOR "12%.*s" IRCCOLOR " bots from " IRCCOLOR "%.*s%.*s" IRCNORMAL ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->victimTeamShortTag.size(), RenX::tags->victimTeamShortTag.ptr())); - RenX_LoggingPlugin::voteRestartMapFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteRestartMapFormat"_jrs, + RenX_LoggingPlugin::voteRestartMapFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteRestartMapFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called for a Map Restart.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::voteSurrenderFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteSurrenderFormat"_jrs, + RenX_LoggingPlugin::voteSurrenderFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteSurrenderFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] " IRCBOLD "%.*s" IRCBOLD " has called for a Surrender.", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::voteSurveyFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteSurveyFormat"_jrs, + RenX_LoggingPlugin::voteSurveyFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteSurveyFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR "%.*s has started a Survey: " IRCCOLOR "12%.*s", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::voteOtherFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteOtherFormat"_jrs, + RenX_LoggingPlugin::voteOtherFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteOtherFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR "%.*s has called a \"%.*s\" vote.", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::voteOverSuccessFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteOverSuccessFormat"_jrs, + RenX_LoggingPlugin::voteOverSuccessFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteOverSuccessFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] A vote for \"%.*s\" " IRCBOLD IRCCOLOR "09passed" IRCBOLD IRCCOLOR "%.*s (Votes Yes: %.*s | Votes No: %.*s).", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->winScoreTag.size(), RenX::tags->winScoreTag.ptr(), RenX::tags->loseScoreTag.size(), RenX::tags->loseScoreTag.ptr())); - RenX_LoggingPlugin::voteOverFailFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteOverFailFormat"_jrs, + RenX_LoggingPlugin::voteOverFailFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteOverFailFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] A vote for \"%.*s\" " IRCBOLD IRCCOLOR "04failed" IRCBOLD IRCCOLOR "%.*s (Votes Yes: %.*s | Votes No: %.*s).", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->winScoreTag.size(), RenX::tags->winScoreTag.ptr(), RenX::tags->loseScoreTag.size(), RenX::tags->loseScoreTag.ptr())); - RenX_LoggingPlugin::voteCancelFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteCancelFormat"_jrs, + RenX_LoggingPlugin::voteCancelFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteCancelFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] A vote for \"%.*s\" was " IRCBOLD IRCCOLOR "07cancelled" IRCCOLOR IRCBOLD ".", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); - RenX_LoggingPlugin::voteFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VoteFormat"_jrs, + RenX_LoggingPlugin::voteFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "06[Vote]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::mapChangeFmt = Jupiter::IRC::Client::Config->get(this->getName(), "MapChangeFormat"_jrs, + RenX_LoggingPlugin::mapChangeFmt = this->config.get(Jupiter::ReferenceString::empty, "MapChangeFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03Loading %.*s...", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::mapLoadFmt = Jupiter::IRC::Client::Config->get(this->getName(), "MapLoadFormat"_jrs, + RenX_LoggingPlugin::mapLoadFmt = this->config.get(Jupiter::ReferenceString::empty, "MapLoadFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03%.*s loaded.", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::mapStartFmt = Jupiter::IRC::Client::Config->get(this->getName(), "MapStartFormat"_jrs, + RenX_LoggingPlugin::mapStartFmt = this->config.get(Jupiter::ReferenceString::empty, "MapStartFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03%.*s started.", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::mapFmt = Jupiter::IRC::Client::Config->get(this->getName(), "MapFormat"_jrs, + RenX_LoggingPlugin::mapFmt = this->config.get(Jupiter::ReferenceString::empty, "MapFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "06[Map]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::demoRecordFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DemoRecordFormat"_jrs, + RenX_LoggingPlugin::demoRecordFmt = this->config.get(Jupiter::ReferenceString::empty, "DemoRecordFormat"_jrs, Jupiter::StringS::Format("%.*s has started a demo recording.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr())); - RenX_LoggingPlugin::rconDemoRecordFmt = Jupiter::IRC::Client::Config->get(this->getName(), "RCONDemoRecordFormat"_jrs, + RenX_LoggingPlugin::rconDemoRecordFmt = this->config.get(Jupiter::ReferenceString::empty, "RCONDemoRecordFormat"_jrs, IRCCOLOR "07A demo recording has started."_jrs); - RenX_LoggingPlugin::demoRecordStopFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DemoRecordStopFormat"_jrs, + RenX_LoggingPlugin::demoRecordStopFmt = this->config.get(Jupiter::ReferenceString::empty, "DemoRecordStopFormat"_jrs, IRCCOLOR "07The demo recording has stopped."_jrs); - RenX_LoggingPlugin::demoFmt = Jupiter::IRC::Client::Config->get(this->getName(), "DemoFormat"_jrs, + RenX_LoggingPlugin::demoFmt = this->config.get(Jupiter::ReferenceString::empty, "DemoFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "06[Demo]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::logFmt = Jupiter::IRC::Client::Config->get(this->getName(), "LogFormat"_jrs, + RenX_LoggingPlugin::logFmt = this->config.get(Jupiter::ReferenceString::empty, "LogFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "07[Log]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::commandFmt = Jupiter::IRC::Client::Config->get(this->getName(), "CommandFormat"_jrs, + RenX_LoggingPlugin::commandFmt = this->config.get(Jupiter::ReferenceString::empty, "CommandFormat"_jrs, Jupiter::StringS::Format("")); // Disabled by default. - RenX_LoggingPlugin::errorFmt = Jupiter::IRC::Client::Config->get(this->getName(), "ErrorFormat"_jrs, + RenX_LoggingPlugin::errorFmt = this->config.get(Jupiter::ReferenceString::empty, "ErrorFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "04[Error]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); - RenX_LoggingPlugin::versionFmt = Jupiter::IRC::Client::Config->get(this->getName(), "VersionFormat"_jrs, + RenX_LoggingPlugin::versionFmt = this->config.get(Jupiter::ReferenceString::empty, "VersionFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03Renegade X RCON connection established; using RCON verison " IRCBOLD "%.*s" IRCBOLD " for game version " IRCBOLD "%.*s" IRCBOLD, RenX::tags->rconVersionTag.size(), RenX::tags->rconVersionTag.ptr(), RenX::tags->gameVersionTag.size(), RenX::tags->gameVersionTag.ptr())); - RenX_LoggingPlugin::authorizedFmt = Jupiter::IRC::Client::Config->get(this->getName(), "AuthorizedFormat"_jrs, + RenX_LoggingPlugin::authorizedFmt = this->config.get(Jupiter::ReferenceString::empty, "AuthorizedFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "03RCON authorization completed.")); - RenX_LoggingPlugin::otherFmt = Jupiter::IRC::Client::Config->get(this->getName(), "OtherFormat"_jrs, + RenX_LoggingPlugin::otherFmt = this->config.get(Jupiter::ReferenceString::empty, "OtherFormat"_jrs, Jupiter::StringS::Format(IRCCOLOR "06[Other]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); /** Sanitize tags */ @@ -524,6 +524,8 @@ void RenX_LoggingPlugin::init() RenX::sanitizeTags(versionFmt); RenX::sanitizeTags(authorizedFmt); RenX::sanitizeTags(otherFmt); + + return true; } typedef void(RenX::Server::*logFuncType)(const Jupiter::ReadableString &msg) const; @@ -2255,13 +2257,7 @@ void RenX_LoggingPlugin::RenX_OnOther(RenX::Server *server, char token, const Ju int RenX_LoggingPlugin::OnRehash() { - RenX_LoggingPlugin::init(); - return 0; -} - -RenX_LoggingPlugin::RenX_LoggingPlugin() -{ - RenX_LoggingPlugin::init(); + return this->initialize() ? 0 : -1; } // Plugin instantiation and entry point. diff --git a/RenX.Logging/RenX_Logging.h b/RenX.Logging/RenX_Logging.h index 0e2088e..62bc01c 100644 --- a/RenX.Logging/RenX_Logging.h +++ b/RenX.Logging/RenX_Logging.h @@ -128,14 +128,9 @@ public: // RenX::Plugin public: // Jupiter::Plugin int OnRehash() override; - const Jupiter::ReadableString &getName() override { return name; } - - RenX_LoggingPlugin(); + virtual bool initialize() override; private: - void init(); - - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Logging"); unsigned int muteOwnExecute : 1; unsigned int playerRDNSPublic : 1; unsigned int joinPublic : 1; diff --git a/RenX.Medals/RenX_Medals.cpp b/RenX.Medals/RenX_Medals.cpp index 5fac830..4ab9a40 100644 --- a/RenX.Medals/RenX_Medals.cpp +++ b/RenX.Medals/RenX_Medals.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -29,12 +29,14 @@ using namespace Jupiter::literals; -RenX_MedalsPlugin::RenX_MedalsPlugin() +bool RenX_MedalsPlugin::initialize() { this->INTERNAL_RECS_TAG = RenX::getUniqueInternalTag(); this->INTERNAL_NOOB_TAG = RenX::getUniqueInternalTag(); this->INTERNAL_WORTH_TAG = RenX::getUniqueInternalTag(); init(); + + return true; } RenX_MedalsPlugin::~RenX_MedalsPlugin() @@ -139,11 +141,11 @@ void RenX_MedalsPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo if (player->uuid.isNotEmpty() && player->isBot == false) { int worth = getWorth(player); - Jupiter::INIFile::Section *section = RenX_MedalsPlugin::joinMessageFile.getSection(RenX_MedalsPlugin::firstSection); + Jupiter::INIFile::Section *section = RenX_MedalsPlugin::config.getSection(RenX_MedalsPlugin::firstSection); if (section != nullptr) { while (section->hasKey(STRING_LITERAL_AS_REFERENCE("MaxRecs")) && section->get(STRING_LITERAL_AS_REFERENCE("MaxRecs")).asInt() < worth) - if ((section = RenX_MedalsPlugin::joinMessageFile.getSection(section->get(STRING_LITERAL_AS_REFERENCE("NextSection")))) == nullptr) + if ((section = RenX_MedalsPlugin::config.getSection(section->get(STRING_LITERAL_AS_REFERENCE("NextSection")))) == nullptr) return; // No matching section found. if (section->hasKey(STRING_LITERAL_AS_REFERENCE("1"))) @@ -264,24 +266,21 @@ int RenX_MedalsPlugin::OnRehash() { RenX_MedalsPlugin::medalsFile.sync(RenX_MedalsPlugin::medalsFileName); RenX_MedalsPlugin::medalsFile.flushData(); - RenX_MedalsPlugin::joinMessageFile.flushData(); init(); return 0; } void RenX_MedalsPlugin::init() { - RenX_MedalsPlugin::killCongratDelay = Jupiter::IRC::Client::Config->getInt(this->getName(), STRING_LITERAL_AS_REFERENCE("KillCongratDelay"), 60); - RenX_MedalsPlugin::vehicleKillCongratDelay = Jupiter::IRC::Client::Config->getInt(this->getName(), STRING_LITERAL_AS_REFERENCE("VehicleKillCongratDelay"), 60); - RenX_MedalsPlugin::kdrCongratDelay = Jupiter::IRC::Client::Config->getInt(this->getName(), STRING_LITERAL_AS_REFERENCE("KDRCongratDelay"), 60); - RenX_MedalsPlugin::medalsFileName = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("MedalsFile"), STRING_LITERAL_AS_REFERENCE("Medals.ini")); - RenX_MedalsPlugin::joinMessageFileName = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("JoinMessageFile"), STRING_LITERAL_AS_REFERENCE("Medals.Join.ini")); + RenX_MedalsPlugin::killCongratDelay = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("KillCongratDelay"), 60); + RenX_MedalsPlugin::vehicleKillCongratDelay = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("VehicleKillCongratDelay"), 60); + RenX_MedalsPlugin::kdrCongratDelay = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("KDRCongratDelay"), 60); + RenX_MedalsPlugin::medalsFileName = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("MedalsFile"), STRING_LITERAL_AS_REFERENCE("Medals.ini")); RenX_MedalsPlugin::medalsFile.readFile(RenX_MedalsPlugin::medalsFileName); - RenX_MedalsPlugin::joinMessageFile.readFile(RenX_MedalsPlugin::joinMessageFileName); - RenX_MedalsPlugin::firstSection = RenX_MedalsPlugin::joinMessageFile.get(Jupiter::StringS::empty, STRING_LITERAL_AS_REFERENCE("FirstSection")); - RenX_MedalsPlugin::recsTag = RenX_MedalsPlugin::joinMessageFile.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("RecsTag"), STRING_LITERAL_AS_REFERENCE("{RECS}")); - RenX_MedalsPlugin::noobTag = RenX_MedalsPlugin::joinMessageFile.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("NoobsTag"), STRING_LITERAL_AS_REFERENCE("{NOOBS}")); - RenX_MedalsPlugin::worthTag = RenX_MedalsPlugin::joinMessageFile.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("WorthTag"), STRING_LITERAL_AS_REFERENCE("{WORTH}")); + RenX_MedalsPlugin::firstSection = RenX_MedalsPlugin::config.get(Jupiter::StringS::empty, STRING_LITERAL_AS_REFERENCE("FirstSection")); + RenX_MedalsPlugin::recsTag = RenX_MedalsPlugin::config.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("RecsTag"), STRING_LITERAL_AS_REFERENCE("{RECS}")); + RenX_MedalsPlugin::noobTag = RenX_MedalsPlugin::config.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("NoobsTag"), STRING_LITERAL_AS_REFERENCE("{NOOBS}")); + RenX_MedalsPlugin::worthTag = RenX_MedalsPlugin::config.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("WorthTag"), STRING_LITERAL_AS_REFERENCE("{WORTH}")); RenX::Core *core = RenX::getCore(); unsigned int sCount = core->getServerCount(); diff --git a/RenX.Medals/RenX_Medals.h b/RenX.Medals/RenX_Medals.h index 618a68b..662ed17 100644 --- a/RenX.Medals/RenX_Medals.h +++ b/RenX.Medals/RenX_Medals.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -50,12 +50,11 @@ public: // RenX::Plugin void RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) override; void RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore) override; void RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type) override; - RenX_MedalsPlugin(); ~RenX_MedalsPlugin(); public: // Jupiter::Plugin + virtual bool initialize() override; int OnRehash() override; - const Jupiter::ReadableString &getName() override { return name; } public: time_t killCongratDelay; @@ -66,12 +65,9 @@ public: Jupiter::StringS worthTag; Jupiter::StringS firstSection; Jupiter::StringS medalsFileName; - Jupiter::StringS joinMessageFileName; Jupiter::INIFile medalsFile; - Jupiter::INIFile joinMessageFile; private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Medals"); Jupiter::StringS INTERNAL_RECS_TAG; Jupiter::StringS INTERNAL_NOOB_TAG; Jupiter::StringS INTERNAL_WORTH_TAG; diff --git a/RenX.MinPlayers/RenX_MinPlayers.cpp b/RenX.MinPlayers/RenX_MinPlayers.cpp index 27fd1af..d2ba173 100644 --- a/RenX.MinPlayers/RenX_MinPlayers.cpp +++ b/RenX.MinPlayers/RenX_MinPlayers.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -24,9 +24,10 @@ using namespace Jupiter::literals; -RenX_MinPlayersPlugin::RenX_MinPlayersPlugin() +bool RenX_MinPlayersPlugin::initialize() { - RenX_MinPlayersPlugin::player_threshold = Jupiter::IRC::Client::Config->getInt(this->getName(), "PlayerThreshold"_jrs, 20); + RenX_MinPlayersPlugin::player_threshold = this->config.getInt(Jupiter::ReferenceString::empty, "PlayerThreshold"_jrs, 20); + return true; } void RenX_MinPlayersPlugin::RenX_OnMapStart(RenX::Server *server, const Jupiter::ReadableString &map) diff --git a/RenX.MinPlayers/RenX_MinPlayers.h b/RenX.MinPlayers/RenX_MinPlayers.h index 9f60d89..a482019 100644 --- a/RenX.MinPlayers/RenX_MinPlayers.h +++ b/RenX.MinPlayers/RenX_MinPlayers.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -35,9 +35,7 @@ public: void RenX_OnKill(RenX::Server *server, const Jupiter::ReadableString &killer, const RenX::TeamType &killerTeam, const RenX::PlayerInfo *victim, const Jupiter::ReadableString &damageType) override; void RenX_OnDie(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &damageType) override; - const Jupiter::ReadableString &getName() override { return name; } - - RenX_MinPlayersPlugin(); + virtual bool initialize() override; private: void AnyDeath(RenX::Server *server, const RenX::PlayerInfo *player); @@ -45,7 +43,6 @@ private: /** Configuration variables */ size_t player_threshold; - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.MinPlayers"); }; #endif // _RENX_MINPLAYERS_H_HEADER \ No newline at end of file diff --git a/RenX.ModSystem/RenX_ModSystem.cpp b/RenX.ModSystem/RenX_ModSystem.cpp index 81e32af..9836530 100644 --- a/RenX.ModSystem/RenX_ModSystem.cpp +++ b/RenX.ModSystem/RenX_ModSystem.cpp @@ -26,15 +26,13 @@ using namespace Jupiter::literals; -void RenX_ModSystemPlugin::init() +bool RenX_ModSystemPlugin::initialize() { - RenX_ModSystemPlugin::modsFile.readFile(Jupiter::IRC::Client::Config->get(RenX_ModSystemPlugin::getName(), STRING_LITERAL_AS_REFERENCE("ModsFile"), STRING_LITERAL_AS_REFERENCE("Mods.ini"))); - - RenX_ModSystemPlugin::lockSteam = RenX_ModSystemPlugin::modsFile.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LockSteam"), false); + RenX_ModSystemPlugin::lockSteam = RenX_ModSystemPlugin::modsFile.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LockSteam"), true); RenX_ModSystemPlugin::lockIP = RenX_ModSystemPlugin::modsFile.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LockIP"), false); RenX_ModSystemPlugin::lockName = RenX_ModSystemPlugin::modsFile.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LockName"), false); RenX_ModSystemPlugin::kickLockMismatch = RenX_ModSystemPlugin::modsFile.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("KickLockMismatch"), true); - RenX_ModSystemPlugin::autoAuthSteam = RenX_ModSystemPlugin::modsFile.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("AutoAuthSteam"), false); + RenX_ModSystemPlugin::autoAuthSteam = RenX_ModSystemPlugin::modsFile.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("AutoAuthSteam"), true); RenX_ModSystemPlugin::autoAuthIP = RenX_ModSystemPlugin::modsFile.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("AutoAuthIP"), false); RenX_ModSystemPlugin::atmDefault = RenX_ModSystemPlugin::modsFile.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ATMDefault")); RenX_ModSystemPlugin::moderatorGroup = RenX_ModSystemPlugin::modsFile.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Moderator"), STRING_LITERAL_AS_REFERENCE("Moderator")); @@ -110,6 +108,8 @@ void RenX_ModSystemPlugin::init() for (Jupiter::DLList::Node *n = server->players.getNode(0); n != nullptr; n = n->next) RenX_ModSystemPlugin::auth(server, n->data, true); } + + return true; } unsigned int RenX_ModSystemPlugin::logoutAllMods(const RenX::Server *server) @@ -305,11 +305,6 @@ RenX_ModSystemPlugin::ModGroup *RenX_ModSystemPlugin::getAdministratorGroup() co return RenX_ModSystemPlugin::getGroupByName(RenX_ModSystemPlugin::administratorGroup); } -RenX_ModSystemPlugin::RenX_ModSystemPlugin() -{ - RenX_ModSystemPlugin::init(); -} - RenX_ModSystemPlugin::~RenX_ModSystemPlugin() { RenX::Core *core = RenX::getCore(); @@ -415,8 +410,7 @@ int RenX_ModSystemPlugin::OnRehash() RenX_ModSystemPlugin::modsFile.flushData(); while (RenX_ModSystemPlugin::groups.size() != 0) delete RenX_ModSystemPlugin::groups.remove(0U); - RenX_ModSystemPlugin::init(); - return 0; + return this->initialize() ? 0 : -1; } // Plugin instantiation and entry point. diff --git a/RenX.ModSystem/RenX_ModSystem.h b/RenX.ModSystem/RenX_ModSystem.h index a01ccff..2f1414a 100644 --- a/RenX.ModSystem/RenX_ModSystem.h +++ b/RenX.ModSystem/RenX_ModSystem.h @@ -88,7 +88,7 @@ public: ModGroup *getModeratorGroup() const; ModGroup *getAdministratorGroup() const; - RenX_ModSystemPlugin(); + virtual bool initialize() override; ~RenX_ModSystemPlugin(); public: // RenX::Plugin @@ -103,13 +103,9 @@ public: // RenX::Plugin public: // Jupiter::Plugin int OnRehash(); - const Jupiter::ReadableString &getName() override { return name; } - Jupiter::INIFile modsFile; + Jupiter::INIFile &modsFile = Jupiter::Plugin::config; private: - void init(); - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.ModSystem"); - bool lockSteam; bool lockIP; bool lockName; diff --git a/RenX.NicknameUUID/RenX_NicknameUUID.h b/RenX.NicknameUUID/RenX_NicknameUUID.h index dc9753c..d1732db 100644 --- a/RenX.NicknameUUID/RenX_NicknameUUID.h +++ b/RenX.NicknameUUID/RenX_NicknameUUID.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Jessica James. + * Copyright (C) 2015-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -28,14 +28,9 @@ class RenX_NicknameUUIDPlugin : public RenX::Plugin public: // RenX::Plugin void RenX_OnServerCreate(RenX::Server *server) override; -public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } - +public: RenX_NicknameUUIDPlugin(); ~RenX_NicknameUUIDPlugin(); - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.NicknameUUID"); }; #endif // _RENX_NICKNAMEUUID_H_HEADER \ No newline at end of file diff --git a/RenX.Plugin.Template/Example.h b/RenX.Plugin.Template/Example.h index e627fd3..b0deefb 100644 --- a/RenX.Plugin.Template/Example.h +++ b/RenX.Plugin.Template/Example.h @@ -15,11 +15,6 @@ class RenX_TPlugin : public RenX::Plugin { -public: - const Jupiter::ReadableString &getName() override { return name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX_TemplatePlugin"); }; #endif // _EXAMPLE_H_HEADER \ No newline at end of file diff --git a/RenX.ServerList/RenX_ServerList.cpp b/RenX.ServerList/RenX_ServerList.cpp index cada9b4..c4c831d 100644 --- a/RenX.ServerList/RenX_ServerList.cpp +++ b/RenX.ServerList/RenX_ServerList.cpp @@ -84,13 +84,13 @@ Jupiter::String jsonify(const Jupiter::ReadableString &in_str) return result; } -RenX_ServerListPlugin::RenX_ServerListPlugin() +bool RenX_ServerListPlugin::initialize() { - RenX_ServerListPlugin::web_hostname = Jupiter::IRC::Client::Config->get(this->name, "Hostname"_jrs, ""_jrs); - RenX_ServerListPlugin::web_path = Jupiter::IRC::Client::Config->get(this->name, "Path"_jrs, "/"_jrs); - RenX_ServerListPlugin::server_list_page_name = Jupiter::IRC::Client::Config->get(this->name, "ServersPageName"_jrs, "servers.jsp"_jrs); - RenX_ServerListPlugin::server_list_long_page_name = Jupiter::IRC::Client::Config->get(this->name, "HumanServersPageName"_jrs, "servers_long.jsp"_jrs); - RenX_ServerListPlugin::server_page_name = Jupiter::IRC::Client::Config->get(this->name, "ServerPageName"_jrs, "server.jsp"_jrs); + RenX_ServerListPlugin::web_hostname = this->config.get(Jupiter::ReferenceString::empty, "Hostname"_jrs, ""_jrs); + RenX_ServerListPlugin::web_path = this->config.get(Jupiter::ReferenceString::empty, "Path"_jrs, "/"_jrs); + RenX_ServerListPlugin::server_list_page_name = this->config.get(Jupiter::ReferenceString::empty, "ServersPageName"_jrs, "servers.jsp"_jrs); + RenX_ServerListPlugin::server_list_long_page_name = this->config.get(Jupiter::ReferenceString::empty, "HumanServersPageName"_jrs, "servers_long.jsp"_jrs); + RenX_ServerListPlugin::server_page_name = this->config.get(Jupiter::ReferenceString::empty, "ServerPageName"_jrs, "server.jsp"_jrs); /** Initialize content */ Jupiter::HTTP::Server &server = getHTTPServer(); @@ -120,6 +120,7 @@ RenX_ServerListPlugin::RenX_ServerListPlugin() server.hook(RenX_ServerListPlugin::web_hostname, RenX_ServerListPlugin::web_path, content); this->updateServerList(); + return true; } RenX_ServerListPlugin::~RenX_ServerListPlugin() diff --git a/RenX.ServerList/RenX_ServerList.h b/RenX.ServerList/RenX_ServerList.h index f00af93..3edc271 100644 --- a/RenX.ServerList/RenX_ServerList.h +++ b/RenX.ServerList/RenX_ServerList.h @@ -31,22 +31,16 @@ public: // RenX_ServerListPlugin void addServerToServerList(RenX::Server *server); void updateServerList(); - RenX_ServerListPlugin(); + virtual bool initialize() override; ~RenX_ServerListPlugin(); public: // RenX::Plugin void RenX_OnServerFullyConnected(RenX::Server *server) override; - void RenX_OnServerDisconnect(RenX::Server *server, RenX::DisconnectReason reason) override; void RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) override; void RenX_OnPart(RenX::Server *server, const RenX::PlayerInfo *player) override; -public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } - private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.ServerList"); - Jupiter::StringS server_list_json; Jupiter::StringS web_hostname, web_path, server_list_page_name, server_list_long_page_name, server_page_name; }; diff --git a/RenX.SetJoin/RenX_SetJoin.cpp b/RenX.SetJoin/RenX_SetJoin.cpp index 5eaa94e..08af531 100644 --- a/RenX.SetJoin/RenX_SetJoin.cpp +++ b/RenX.SetJoin/RenX_SetJoin.cpp @@ -24,11 +24,6 @@ using namespace Jupiter::literals; -RenX_SetJoinPlugin::RenX_SetJoinPlugin() -{ - RenX_SetJoinPlugin::setjoin_file.readFile(Jupiter::IRC::Client::Config->get(this->getName(), "SetJoinFile"_jrs, "RenX.SetJoin.ini"_jrs)); -} - void RenX_SetJoinPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) { if (player->uuid.isNotEmpty()) diff --git a/RenX.SetJoin/RenX_SetJoin.h b/RenX.SetJoin/RenX_SetJoin.h index 2305f1e..f9c1623 100644 --- a/RenX.SetJoin/RenX_SetJoin.h +++ b/RenX.SetJoin/RenX_SetJoin.h @@ -27,18 +27,10 @@ class RenX_SetJoinPlugin : public RenX::Plugin { public: - Jupiter::INIFile setjoin_file; - - RenX_SetJoinPlugin(); + Jupiter::INIFile &setjoin_file = Jupiter::Plugin::config; public: // RenX::Plugin void RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) override; - -public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } - -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.SetJoin"); }; GENERIC_GAME_COMMAND(SetJoinGameCommand) diff --git a/RenX.Warn/RenX_Warn.cpp b/RenX.Warn/RenX_Warn.cpp index cbeed04..12a7a4a 100644 --- a/RenX.Warn/RenX_Warn.cpp +++ b/RenX.Warn/RenX_Warn.cpp @@ -21,16 +21,16 @@ #include "RenX_PlayerInfo.h" #include "RenX_Warn.h" -int RenX_WarnPlugin::OnRehash() +bool RenX_WarnPlugin::initialize() { - RenX_WarnPlugin::maxWarns = Jupiter::IRC::Client::Config->getInt(RenX_WarnPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MaxWarns"), 3); - RenX_WarnPlugin::warnAction = Jupiter::IRC::Client::Config->getInt(RenX_WarnPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MaxAction"), -1); - return 0; + RenX_WarnPlugin::maxWarns = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("MaxWarns"), 3); + RenX_WarnPlugin::warnAction = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("MaxAction"), -1); + return true; } -RenX_WarnPlugin::RenX_WarnPlugin() +int RenX_WarnPlugin::OnRehash() { - this->OnRehash(); + return this->initialize() ? 0 : -1; } // Plugin instantiation and entry point. diff --git a/RenX.Warn/RenX_Warn.h b/RenX.Warn/RenX_Warn.h index 130d13c..2dc8969 100644 --- a/RenX.Warn/RenX_Warn.h +++ b/RenX.Warn/RenX_Warn.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -28,14 +28,11 @@ class RenX_WarnPlugin : public RenX::Plugin { public: // Jupiter::Plugin - const Jupiter::ReadableString &getName() override { return name; } + virtual bool initialize() override; int OnRehash() override; - RenX_WarnPlugin(); int maxWarns; int warnAction; /** -1 = kick; 0 = perm ban; other = temp ban */ -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.Warn"); }; GENERIC_IRC_COMMAND(WarnIRCCommand) diff --git a/SetJoin/SetJoin.cpp b/SetJoin/SetJoin.cpp index 38befb5..57d6936 100644 --- a/SetJoin/SetJoin.cpp +++ b/SetJoin/SetJoin.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -24,7 +24,7 @@ void SetJoinPlugin::OnJoin(Jupiter::IRC::Client *server, const Jupiter::ReadableString &chan, const Jupiter::ReadableString &nick) { - const Jupiter::ReadableString &setjoin = server->Config->get(STRING_LITERAL_AS_REFERENCE("SetJoins"), nick); + const Jupiter::ReadableString &setjoin = this->config.get(server->getConfigSection(), nick); if (setjoin.isNotEmpty()) { if (setjoin == nullptr) @@ -34,6 +34,8 @@ void SetJoinPlugin::OnJoin(Jupiter::IRC::Client *server, const Jupiter::Readable } } +SetJoinPlugin pluginInstance; + // SetJoin Command void SetJoinIRCCommand::create() @@ -45,8 +47,8 @@ void SetJoinIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString & { if (parameters.isNotEmpty()) { - source->Config->set(STRING_LITERAL_AS_REFERENCE("SetJoins"), nick, parameters); - source->Config->sync(); + pluginInstance.setjoin_file.set(source->getConfigSection(), nick, parameters); + pluginInstance.setjoin_file.sync(); source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Your join message has been set.")); } else source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Too few parameters! Syntax: setjoin ")); @@ -71,7 +73,7 @@ void ViewJoinIRCCommand::create() void ViewJoinIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString ¶meters) { const Jupiter::ReadableString &target = parameters.isEmpty() ? nick : parameters; - const Jupiter::ReadableString &r = source->Config->get(STRING_LITERAL_AS_REFERENCE("SetJoins"), target); + const Jupiter::ReadableString &r = pluginInstance.setjoin_file.get(source->getConfigSection(), target); if (r.isEmpty()) source->sendMessage(channel, Jupiter::StringS::Format("No setjoin has been set for \"%.*s\".", target.size(), target.ptr())); @@ -97,7 +99,7 @@ void DelJoinIRCCommand::create() void DelJoinIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString ¶meters) { - if (source->Config->remove(STRING_LITERAL_AS_REFERENCE("SetJoins"), nick)) + if (pluginInstance.setjoin_file.remove(source->getConfigSection(), nick)) source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Your setjoin has been deleted successfully.")); else source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("No setjoin was found to delete.")); } @@ -111,7 +113,6 @@ const Jupiter::ReadableString &DelJoinIRCCommand::getHelp(const Jupiter::Readabl IRC_COMMAND_INIT(DelJoinIRCCommand) // Plugin instantiation and entry point. -SetJoinPlugin pluginInstance; extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin() { diff --git a/SetJoin/SetJoin.h b/SetJoin/SetJoin.h index 8cbc9f1..d532354 100644 --- a/SetJoin/SetJoin.h +++ b/SetJoin/SetJoin.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2014-2015 Jessica James. + * Copyright (C) 2014-2016 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -25,11 +25,9 @@ class SetJoinPlugin : public Jupiter::Plugin { public: - void OnJoin(Jupiter::IRC::Client *server, const Jupiter::ReadableString &chan, const Jupiter::ReadableString &nick) override; - const Jupiter::ReadableString &getName() override { return name; } + Jupiter::INIFile &setjoin_file = Jupiter::Plugin::config; -private: - STRING_LITERAL_AS_NAMED_REFERENCE(name, "SetJoin"); + void OnJoin(Jupiter::IRC::Client *server, const Jupiter::ReadableString &chan, const Jupiter::ReadableString &nick) override; }; GENERIC_IRC_COMMAND(SetJoinIRCCommand)