From 6854e8803797ce7e6c6212f997c14ce03053afe2 Mon Sep 17 00:00:00 2001 From: ComputerTech312 Date: Sat, 13 Sep 2025 15:10:33 +0100 Subject: [PATCH] Fix messages being sent as notices instead of public by default - Changed new player default 'notices' setting from True to False - Added specific message types for duck_miss and wild_shot events - Added duck_miss and wild_shot to force_public config settings - All miss/wild shot messages now go to public channel by default - Legacy users with notices=True will still get notices, but new users get public messages --- duckhunt/config.json | 2 ++ duckhunt/simple_duckhunt.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/duckhunt/config.json b/duckhunt/config.json index 77d4efb..b0d5cf6 100644 --- a/duckhunt/config.json +++ b/duckhunt/config.json @@ -21,6 +21,8 @@ "duck_spawn": true, "duck_shot": true, "duck_befriend": true, + "duck_miss": true, + "wild_shot": true, "leaderboard": true, "admin_commands": true }, diff --git a/duckhunt/simple_duckhunt.py b/duckhunt/simple_duckhunt.py index e3852ba..d30ad0d 100644 --- a/duckhunt/simple_duckhunt.py +++ b/duckhunt/simple_duckhunt.py @@ -656,7 +656,7 @@ class SimpleIRCBot: 'explosive_ammo': False, 'settings': { 'output_mode': self.get_config('message_output.default_user_mode', 'PUBLIC'), - 'notices': True, # Legacy setting for backwards compatibility + 'notices': False, # Legacy setting for backwards compatibility - False means public 'private_messages': False }, # Inventory system @@ -1000,7 +1000,7 @@ class SimpleIRCBot: await self.scare_duck_on_miss(channel, target_duck) miss_sound = "•click•" if player.get('silencer', 0) > 0 else "*CLICK*" - await self.send_user_message(nick, channel, f"{nick} > {miss_sound} You missed the duck! | {miss_penalty} xp{ricochet_msg}") + await self.send_user_message(nick, channel, f"{nick} > {miss_sound} You missed the duck! | {miss_penalty} xp{ricochet_msg}", 'duck_miss') else: # No duck present - wild fire! @@ -1044,7 +1044,7 @@ class SimpleIRCBot: if player.get('silencer', 0) > 0: wild_sound = "•" + wild_sound[1:-1] + "•" - await self.send_user_message(nick, channel, f"{nick} > {wild_sound} You shot at nothing! What were you aiming at? | {miss_penalty+wild_penalty} xp | GUN CONFISCATED{friendly_fire_msg}") + await self.send_user_message(nick, channel, f"{nick} > {wild_sound} You shot at nothing! What were you aiming at? | {miss_penalty+wild_penalty} xp | GUN CONFISCATED{friendly_fire_msg}", 'wild_shot') # Save after each shot self.save_player(user)