Skip to content
Permalink
Browse files

Change HideWarningGump and HideWarningItem to ShowWarningGump and Sho…

…wWarningItem. (#85)

* Changed: pol.cfg settings HideWarningGump and HideWarningItem to ShowWarningGump and ShowWarningItem. This positive logic is consistent with all other console output settings.
Default is zero (0). The output will not be displayed unless set to one (1).

* Set default behaviour for ShowWarningGump and ShowWarningItem to display warnings (1).

* Added ShowWarningGump and ShowWarningItem settings to pol.cfg.example.
  • Loading branch information...
Admin-Yukiko authored and turleypol committed Mar 9, 2019
1 parent c35faa4 commit 4a1c08b6dac22783af9c6fab7ec23d620c6c4405
@@ -954,8 +954,8 @@ PidFilePath=(where POL will write its .pid file {default ./})
[ReportAdminEmail=(string email {default ""})]
[ReportServer=(string servername {default "polserver.com"})]
[ReportURL=(string url {default "/pol/report_program_abort.php"})]
[HideWarningGump=(1/0 {default 0})]
[HideWarningItem=(1/0 {default 0})]
[ShowWarningGump=(1/0 {default 1})]
[ShowWarningItem=(1/0 {default 1})]
</structure>
<explain>Your own pol.cfg should give descriptions on most of these. I'll describe them here if people want me to.</explain>
ignition = uorice = none, 2.0.0x and due to autocalculation major.minor.build (no patch)
@@ -974,8 +974,8 @@ PidFilePath=(where POL will write its .pid file {default ./})
<explain>EnforceMountObjtype: will enforce that only items with the mount objtype (as defined in extobj.cfg) can be mounted.</explain>
<explain>AllowMultiClientsPerAccount: when true, will allow multiple characters from the same account to be logged in at the same time</explain>
<explain>ProfileCProps: when true, will record CProp usage statistics. Helps detecting unused CProps, at the cost of some RAM and an unnoticeable performance impact. It should be enabled from startup, or the core will be unable to detect the type of some CProps.</explain>
<explain>HideWarningGump: will hide unexpected gump warning messages on the console.</explain>
<explain>HideWarningItem: will hide equip item and drop item warning messages on the console.</explain>
<explain>ShowWarningGump: will show unexpected gump warning messages on the console.</explain>
<explain>ShowWarningItem: will show equip item and drop item warning messages on the console.</explain>
</cfgfile>


@@ -2,9 +2,16 @@
<ESCRIPT>
<header>
<topic>Latest Core Changes</topic>
<datemodified>02-02-2019</datemodified>
<datemodified>03-09-2019</datemodified>
</header>
<version name="POL100">
<entry>
<date>03-08-2019</date>
<author>Yukiko:</author>
<change type="Changed">pol.cfg settings HideWarningGump and HideWarningItem to ShowWarningGump and ShowWarningItem.<br/>
This positive logic is consistent with all other console output settings.<br/>
Default setting is one (1). The output be displayed by default. Set to zero (0) to suppress.</change>
</entry>
<entry>
<date>02-18-2019</date>
<author>Skinny:</author>
@@ -1,4 +1,8 @@
-- POL100 --
03-08-2019 Yukiko:
Changed: pol.cfg settings HideWarningGump and HideWarningItem to ShowWarningGump and ShowWarningItem.
This positive logic is consistent with all other console output settings.
Default setting is one (1). The output be displayed by default. Set to zero (0) to suppress.
02-18-2019 Skinny:
Added: pol.cfg HideWarningGump and HideWarningItem.
Many players macros generate warnings messages on the console, causing flooding, especially if you have lots of players online.
@@ -799,7 +799,7 @@ void drop_item( Network::Client* client, PKTIN_08_V1* msg )
Items::Item* item = client->chr->gotten_item();
if ( item == nullptr )
{
if ( !Plib::systemstate.config.hide_warning_item )
if ( Plib::systemstate.config.show_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but had not gotten an item.\n" )
@@ -809,7 +809,7 @@ void drop_item( Network::Client* client, PKTIN_08_V1* msg )
}
if ( item->serial != item_serial )
{
if ( !Plib::systemstate.config.hide_warning_item )
if ( Plib::systemstate.config.show_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but instead had gotten item 0x{:X}.\n" )
@@ -875,7 +875,7 @@ void drop_item_v2( Network::Client* client, PKTIN_08_V2* msg )
Items::Item* item = client->chr->gotten_item();
if ( item == nullptr )
{
if ( !Plib::systemstate.config.hide_warning_item )
if ( Plib::systemstate.config.show_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but had not gotten an item.\n" )
@@ -885,7 +885,7 @@ void drop_item_v2( Network::Client* client, PKTIN_08_V2* msg )
}
if ( item->serial != item_serial )
{
if ( !Plib::systemstate.config.hide_warning_item )
if ( Plib::systemstate.config.show_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but instead had gotten item 0x{:X}.\n" )
@@ -44,7 +44,7 @@ void equip_item( Network::Client* client, PKTIN_13* msg )

if ( item == nullptr )
{
if ( !Plib::systemstate.config.hide_warning_item )
if ( Plib::systemstate.config.show_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to equip item 0x{:X}, which did not exist in gotten_items.\n" )
@@ -56,7 +56,7 @@ void equip_item( Network::Client* client, PKTIN_13* msg )

if ( item->serial != serial )
{
if ( !Plib::systemstate.config.hide_warning_item )
if ( Plib::systemstate.config.show_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to equip item 0x{:X}, but had gotten item 0x{:X}\n" )
@@ -1474,7 +1474,7 @@ void gumpbutton_handler( Client* client, PKTIN_B1* msg )
UOExecutorModule* uoemod = client->gd->find_gumpmod( gumpid );
if ( uoemod == nullptr )
{
if ( !Plib::systemstate.config.hide_warning_gump )
if ( Plib::systemstate.config.show_warning_gump )
{
POLLOG_INFO.Format(
"\nWarning: Character 0x{:X} sent an unexpected gump menu selection. Gump ID 0x{:X}, "
@@ -255,8 +255,8 @@ void PolConfig::read_pol_config( bool initial_load )
Plib::systemstate.config.thread_decay_statistics =
elem.remove_bool( "ThreadDecayStatistics", false );

Plib::systemstate.config.hide_warning_gump = elem.remove_bool( "HideWarningGump", false );
Plib::systemstate.config.hide_warning_item = elem.remove_bool( "HideWarningItem", false );
Plib::systemstate.config.show_warning_gump = elem.remove_bool( "ShowWarningGump", true );
Plib::systemstate.config.show_warning_item = elem.remove_bool( "ShowWarningItem", true );

// store the configuration for the reporting system in the ExceptionParser
bool reportingActive = elem.remove_bool( "ReportCrashsAutomatically", false );
@@ -96,8 +96,8 @@ struct PolConfig
bool single_thread_decay;
bool thread_decay_statistics;

bool hide_warning_gump;
bool hide_warning_item;
bool show_warning_gump;
bool show_warning_item;

/**
* @brief Returns true if program aborts are reported
@@ -119,6 +119,18 @@ MaxCallDepth=100
#
ShowRealmInfo=0

#
# ShowWarningGump: will display unexpected gump warning messages on the console if set to 1.
# ShowWarningGump= (0/1) Default is 1
#
ShowWarningGump=1

#
# ShowWarningItem: will display equip item and drop item warning messages on the console if set to 1.
# ShowWarningItem= (0/1) Default is 1
#
ShowWarningItem=1

#############################################################################
## Debugging
#############################################################################

0 comments on commit 4a1c08b

Please sign in to comment.
You can’t perform that action at this time.