diff --git a/Classes/IRC/IRCClient.m b/Classes/IRC/IRCClient.m index 8cc7603f..f257f178 100644 --- a/Classes/IRC/IRCClient.m +++ b/Classes/IRC/IRCClient.m @@ -2917,15 +2917,19 @@ - (void)receiveMode:(IRCMessage*)m [self updateChannelTitle:c]; } - NSString* text = [NSString stringWithFormat:@"%@ has changed mode: %@", nick, modeStr]; - [self printBoth:(c ?: (id)target) type:LINE_TYPE_MODE text:text timestamp:m.timestamp]; + if ([Preferences showModeChange]) { + NSString* text = [NSString stringWithFormat:@"%@ has changed mode: %@", nick, modeStr]; + [self printBoth:(c ?: (id)target) type:LINE_TYPE_MODE text:text timestamp:m.timestamp]; + } } else { // user mode [_myMode update:modeStr]; - NSString* text = [NSString stringWithFormat:@"%@ has changed mode: %@", nick, modeStr]; - [self printBoth:nil type:LINE_TYPE_MODE text:text timestamp:m.timestamp]; + if ([Preferences showModeChange]) { + NSString* text = [NSString stringWithFormat:@"%@ has changed mode: %@", nick, modeStr]; + [self printBoth:nil type:LINE_TYPE_MODE text:text timestamp:m.timestamp]; + } [self updateClientTitle]; } } diff --git a/Classes/Preferences/Preferences.h b/Classes/Preferences/Preferences.h index b712f2bc..2f8b70b1 100644 --- a/Classes/Preferences/Preferences.h +++ b/Classes/Preferences/Preferences.h @@ -55,6 +55,7 @@ typedef enum { + (BOOL)openBrowserInBackground; + (BOOL)showInlineImages; + (BOOL)showJoinLeave; ++ (BOOL)showModeChange; + (BOOL)showRename; + (BOOL)stopNotificationsOnActive; + (BOOL)bounceIconOnEveryPrivateMessage; diff --git a/Classes/Preferences/Preferences.m b/Classes/Preferences/Preferences.m index 3541a957..571ec5b9 100644 --- a/Classes/Preferences/Preferences.m +++ b/Classes/Preferences/Preferences.m @@ -102,6 +102,12 @@ + (BOOL)showJoinLeave return [ud boolForKey:@"Preferences.General.show_join_leave"]; } ++ (BOOL)showModeChange +{ + NSUserDefaults* ud = [NSUserDefaults standardUserDefaults]; + return [ud boolForKey:@"Preferences.General.show_mode_change"]; +} + + (BOOL)showRename { NSUserDefaults* ud = [NSUserDefaults standardUserDefaults]; @@ -811,6 +817,7 @@ + (void)initPreferences [d setBool:YES forKey:@"Preferences.General.open_browser_in_background"]; [d setBool:YES forKey:@"Preferences.General.show_inline_images"]; [d setBool:YES forKey:@"Preferences.General.show_join_leave"]; + [d setBool:YES forKey:@"Preferences.General.show_mode_change"]; [d setBool:YES forKey:@"Preferences.General.showRename"]; [d setBool:YES forKey:@"Preferences.General.use_growl"]; [d setBool:YES forKey:@"Preferences.General.stop_growl_on_active"]; diff --git a/English.lproj/Preferences.xib b/English.lproj/Preferences.xib index d0f3119d..270f513a 100644 --- a/English.lproj/Preferences.xib +++ b/English.lproj/Preferences.xib @@ -441,7 +441,7 @@ - + @@ -462,7 +462,7 @@ - + @@ -482,7 +482,7 @@ - + @@ -512,7 +512,7 @@ +