Commits

Thijs Alkemade committed e27b254

Added an option to also ignore authorization requests that match

  • Participants
  • Parent commits 3ff7575

Comments (0)

Files changed (9)

 #define KEY_SF_CASE_SENSITIVE @"Case Sensitive"
 #define KEY_SF_REGEX @"Regular Expression"
 
+#define KEY_SF_SHOULD_BLOCK_CYRILLIC @"ICQ:Should Block Authorization Requests Containing Cyrillic"
+
 @class AISFPreferences;
 
 @interface AISFPlugin : NSObject <AIPlugin> {
 
 - (void)installPlugin
 {
-	preferences = [[AISFPreferences preferencePaneForPlugin:self] retain];
+	//preferences = [[AISFPreferences preferencePaneForPlugin:self] retain];
+	preferences = [[AISFPreferences sharedInstance] retain];
 	
 	[[NSNotificationCenter defaultCenter] addObserver:self
 											 selector:@selector(willReceiveContent:)
 												 name:Content_WillReceiveContent
 											   object:nil];
 	
-	AILogWithSignature(@"Adium spamfilter plugin loaded.");
-	
-	// the dynamic nib loading for preference panes can cause problems when editing outside the preferences.
-	// so use this trick to load it anyways.
-	[preferences view];
+	AILogWithSignature(@"Adium spamfilter plugin loaded: %@", [preferences view]);
 }
 
 - (void)uninstallPlugin

AISFPreferences.h

 	
 	NSMutableArray				*blacklist;
 	NSMutableDictionary			*currentlyEditing;
+	
+	NSNumber					*shouldIgnoreAuthorizationRequests;
 }
+
++ (AISFPreferences *)sharedInstance;
+
 - (IBAction)add:(id)sender;
 - (IBAction)remove:(id)sender;
 
 - (IBAction)cancel:(id)sender;
 - (IBAction)accept:(id)sender;
 
+- (IBAction)save:(id)sender;
+
 - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row;
 - (void)tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row;
 - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView;
 
 - (void)editObject:(NSDictionary *)inObject;
 
+@property (copy) NSNumber *shouldIgnoreAuthorizationRequests;
+
 @end

AISFPreferences.m

 
 #import "AISFPreferences.h"
 
+static AISFPreferences	*sharedInstance = nil;
+
 @implementation AISFPreferences
 
+@synthesize shouldIgnoreAuthorizationRequests;
+
++ (AISFPreferences *)sharedInstance
+{	
+	@synchronized(self) {
+		if (!sharedInstance) {
+			sharedInstance = [[self alloc] init];
+		}
+	}
+	
+	return sharedInstance;
+}
+
 - (AIPreferenceCategory)category
 {
     return AIPref_Advanced;
 	return [NSImage imageNamed:@"block"];
 }
 
-- (void)saveTerms
+- (IBAction)save:(id)sender
 {
+	AILogWithSignature(@"Saving: %@", self.shouldIgnoreAuthorizationRequests);
 	NSMutableArray *blacklistCopy = [[blacklist mutableCopy] autorelease];
 	
 	// Never save a blank term.
 									   forKey:KEY_SF_FILTERS
 										group:PREF_GROUP_SPAMFILTER];
 	
+	[adium.preferenceController setPreference:self.shouldIgnoreAuthorizationRequests
+									   forKey:KEY_SF_SHOULD_BLOCK_CYRILLIC
+										group:PREF_GROUP_SPAMFILTER];
+	
 	[tableView reloadData];
 }
 
 	}
 
 	
-	[self saveTerms];
+	[self save:nil];
 	
 	[addSheet orderOut:nil];
 	[NSApp endSheet:addSheet];
 	NSIndexSet *indexes = [tableView selectedRowIndexes];
 	
 	[blacklist removeObjectsAtIndexes:indexes];
-	[self saveTerms];
+	[self save:nil];
 	
 	[tableView reloadData];
 	[tableView deselectAll:nil];
 }
 
+- (NSView *)view
+{
+	return [[super view] retain];
+}
+
 /*!
  * @brief The view loaded
  */
 	
 	blacklist = [[NSMutableArray alloc] initWithArray:[adium.preferenceController preferenceForKey:KEY_SF_FILTERS group:PREF_GROUP_SPAMFILTER]];
 	
+	self.shouldIgnoreAuthorizationRequests = [adium.preferenceController preferenceForKey:KEY_SF_SHOULD_BLOCK_CYRILLIC group:PREF_GROUP_SPAMFILTER];
+	
 	[super viewDidLoad];
 }
 
 {
 	[blacklist release]; blacklist = nil;
 	
+	[[super view] release];
+	
 	[super viewWillClose];
 }
 
 	
 	[blacklist replaceObjectAtIndex:row withObject:word];
 	
-	[self saveTerms];
+	[self save:nil];
 }
 
 - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView

CBPurpleAccount+AuthBlocker.h

+/* 
+ * Adium is the legal property of its developers, whose names are listed in the copyright file included
+ * with this source distribution.
+ * 
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License as published by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+ * Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along with this program; if not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <Adium/AIAccount.h>
+#import <AdiumLibpurple/CBPurpleAccount.h>
+#import <Adium/ESDebugAILog.h>
+
+#define KEY_ICQ_BLOCK_CYRILLIC_AYTHORIZATION_REQUESTS	@"ICQ:BlockCyrillicAuthorizationRequests"
+

CBPurpleAccount+AuthBlocker.m

+//
+//  ESPurpleICQAccount+CyrillicAuthBlocker.m
+//  spamfilter
+//
+//  Created by Thijs Alkemade on 23-12-10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "CBPurpleAccount+AuthBlocker.h"
+#import "AISFPreferences.h"
+#import <Adium/AIPreferenceControllerProtocol.h>
+
+@implementation CBPurpleAccount (AuthBlocker)
+
+- (id)authorizationRequestWithDict:(NSDictionary*)dict {
+	if ([AISFPreferences sharedInstance].shouldIgnoreAuthorizationRequests) {
+		NSString *reason = [dict valueForKey:@"Reason"];
+		
+		NSArray *blacklist = [adium.preferenceController preferenceForKey:KEY_SF_FILTERS
+																	group:PREF_GROUP_SPAMFILTER];
+		
+		for (NSDictionary *message in blacklist) {
+			if ([[message valueForKey:KEY_SF_REGEX] boolValue]) {
+				
+				NSPredicate *regex;
+				
+				if ([[message valueForKey:KEY_SF_CASE_SENSITIVE] boolValue]) {
+					regex = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", [message valueForKey:KEY_SF_PHRASE]];
+				} else {
+					regex = [NSPredicate predicateWithFormat:@"SELF MATCHES[c] %@", [message valueForKey:KEY_SF_PHRASE]];
+				}
+				
+				@try {
+					if ([regex evaluateWithObject:reason]) {
+						AILogWithSignature(@"Ignoring auth request %@ as it matches regex %@", dict, message);
+						return NULL;
+					}
+				}
+				@catch (NSException *e) {
+					AILog(@"Regex %@ seems to have failed: %@", message, e);
+					// show the error after a delay, so the incoming message doesn't have to wait
+					[self performSelector:@selector(error:) withObject:[NSDictionary dictionaryWithObjectsAndKeys:message, @"Message", e, @"Exception", nil] afterDelay:0.1];
+				}
+				
+			} else if ([reason rangeOfString:[message valueForKey:KEY_SF_PHRASE]
+									 options:([[message valueForKey:KEY_SF_CASE_SENSITIVE] boolValue] ? 0 : NSCaseInsensitiveSearch)].location != NSNotFound) {
+				AILogWithSignature(@"Ignoring auth request %@ as it matches regex %@", dict, message);
+				return NULL;
+			}
+		}
+	}
+	
+	return [super authorizationRequestWithDict:dict];
+}
+
+@end

English.lproj/SFPreferences.xib

 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
 	<data>
 		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">10F569</string>
+		<string key="IBDocument.SystemVersion">10H574</string>
 		<string key="IBDocument.InterfaceBuilderVersion">762</string>
-		<string key="IBDocument.AppKitVersion">1038.29</string>
+		<string key="IBDocument.AppKitVersion">1038.35</string>
 		<string key="IBDocument.HIToolboxVersion">461.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
 		</object>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<integer value="53"/>
 			<integer value="22"/>
+			<integer value="43"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
 									<object class="NSTableView" id="519591502">
 										<reference key="NSNextResponder" ref="455047774"/>
 										<int key="NSvFlags">256</int>
-										<string key="NSFrameSize">{324, 136}</string>
+										<string key="NSFrameSize">{324, 76}</string>
 										<reference key="NSSuperview" ref="455047774"/>
 										<bool key="NSEnabled">YES</bool>
 										<object class="NSTableHeaderView" key="NSHeaderView" id="615780236">
 										<int key="NSTableViewDraggingDestinationStyle">0</int>
 									</object>
 								</object>
-								<string key="NSFrame">{{1, 17}, {324, 136}}</string>
+								<string key="NSFrame">{{1, 17}, {324, 76}}</string>
 								<reference key="NSSuperview" ref="789821158"/>
 								<reference key="NSNextKeyView" ref="519591502"/>
 								<reference key="NSDocView" ref="519591502"/>
 							</object>
 							<reference ref="1063727381"/>
 						</object>
-						<string key="NSFrame">{{5, 34}, {326, 154}}</string>
+						<string key="NSFrame">{{5, 92}, {326, 94}}</string>
 						<reference key="NSSuperview" ref="821482609"/>
 						<reference key="NSNextKeyView" ref="455047774"/>
 						<int key="NSsFlags">562</int>
 					<object class="NSButton" id="461799578">
 						<reference key="NSNextResponder" ref="821482609"/>
 						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{5, 4}, {23, 23}}</string>
+						<string key="NSFrame">{{5, 62}, {23, 23}}</string>
 						<reference key="NSSuperview" ref="821482609"/>
 						<bool key="NSEnabled">YES</bool>
 						<object class="NSButtonCell" key="NSCell" id="11530052">
 					<object class="NSButton" id="970227346">
 						<reference key="NSNextResponder" ref="821482609"/>
 						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{27, 4}, {23, 23}}</string>
+						<string key="NSFrame">{{27, 62}, {23, 23}}</string>
 						<reference key="NSSuperview" ref="821482609"/>
 						<bool key="NSEnabled">YES</bool>
 						<object class="NSButtonCell" key="NSCell" id="777121719">
 					<object class="NSTextField" id="602337447">
 						<reference key="NSNextResponder" ref="821482609"/>
 						<int key="NSvFlags">266</int>
-						<string key="NSFrame">{{2, 193}, {332, 42}}</string>
+						<string key="NSFrame">{{2, 191}, {332, 42}}</string>
 						<reference key="NSSuperview" ref="821482609"/>
 						<bool key="NSEnabled">YES</bool>
 						<object class="NSTextFieldCell" key="NSCell" id="514012981">
 							<reference key="NSTextColor" ref="203011007"/>
 						</object>
 					</object>
+					<object class="NSBox" id="412653598">
+						<reference key="NSNextResponder" ref="821482609"/>
+						<int key="NSvFlags">34</int>
+						<string key="NSFrame">{{5, 23}, {326, 5}}</string>
+						<reference key="NSSuperview" ref="821482609"/>
+						<string key="NSOffsets">{0, 0}</string>
+						<object class="NSTextFieldCell" key="NSTitleCell">
+							<int key="NSCellFlags">67239424</int>
+							<int key="NSCellFlags2">0</int>
+							<string key="NSContents">Box</string>
+							<reference key="NSSupport" ref="941022885"/>
+							<object class="NSColor" key="NSBackgroundColor" id="525572768">
+								<int key="NSColorSpace">6</int>
+								<string key="NSCatalogName">System</string>
+								<string key="NSColorName">textBackgroundColor</string>
+								<object class="NSColor" key="NSColor">
+									<int key="NSColorSpace">3</int>
+									<bytes key="NSWhite">MQA</bytes>
+								</object>
+							</object>
+							<object class="NSColor" key="NSTextColor">
+								<int key="NSColorSpace">3</int>
+								<bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
+							</object>
+						</object>
+						<int key="NSBorderType">3</int>
+						<int key="NSBoxType">2</int>
+						<int key="NSTitlePosition">0</int>
+						<bool key="NSTransparent">NO</bool>
+					</object>
+					<object class="NSTextField" id="505236519">
+						<reference key="NSNextResponder" ref="821482609"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{2, 25}, {84, 14}}</string>
+						<reference key="NSSuperview" ref="821482609"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSTextFieldCell" key="NSCell" id="261564424">
+							<int key="NSCellFlags">68288064</int>
+							<int key="NSCellFlags2">272630784</int>
+							<string key="NSContents">Miscellaneous</string>
+							<object class="NSFont" key="NSSupport">
+								<string key="NSName">LucidaGrande-Bold</string>
+								<double key="NSSize">11</double>
+								<int key="NSfFlags">16</int>
+							</object>
+							<reference key="NSControlView" ref="505236519"/>
+							<reference key="NSBackgroundColor" ref="483544159"/>
+							<reference key="NSTextColor" ref="203011007"/>
+						</object>
+					</object>
+					<object class="NSButton" id="416678582">
+						<reference key="NSNextResponder" ref="821482609"/>
+						<int key="NSvFlags">290</int>
+						<string key="NSFrame">{{2, 1}, {394, 18}}</string>
+						<reference key="NSSuperview" ref="821482609"/>
+						<bool key="NSEnabled">YES</bool>
+						<object class="NSButtonCell" key="NSCell" id="628408481">
+							<int key="NSCellFlags">67239424</int>
+							<int key="NSCellFlags2">131072</int>
+							<string key="NSContents">Also ignore authorization requests that match.</string>
+							<object class="NSFont" key="NSSupport">
+								<string key="NSName">LucidaGrande</string>
+								<double key="NSSize">11</double>
+								<int key="NSfFlags">16</int>
+							</object>
+							<reference key="NSControlView" ref="416678582"/>
+							<int key="NSButtonFlags">1211912703</int>
+							<int key="NSButtonFlags2">2</int>
+							<reference key="NSNormalImage" ref="599045242"/>
+							<reference key="NSAlternateImage" ref="834908821"/>
+							<string key="NSAlternateContents"/>
+							<string key="NSKeyEquivalent"/>
+							<int key="NSPeriodicDelay">200</int>
+							<int key="NSPeriodicInterval">25</int>
+						</object>
+					</object>
 				</object>
-				<string key="NSFrameSize">{337, 240}</string>
+				<string key="NSFrameSize">{337, 238}</string>
 				<reference key="NSSuperview"/>
 			</object>
 			<object class="NSWindowTemplate" id="580259733">
 								<reference key="NSSupport" ref="941022885"/>
 								<reference key="NSControlView" ref="58376066"/>
 								<bool key="NSDrawsBackground">YES</bool>
-								<object class="NSColor" key="NSBackgroundColor">
-									<int key="NSColorSpace">6</int>
-									<string key="NSCatalogName">System</string>
-									<string key="NSColorName">textBackgroundColor</string>
-									<object class="NSColor" key="NSColor">
-										<int key="NSColorSpace">3</int>
-										<bytes key="NSWhite">MQA</bytes>
-									</object>
-								</object>
+								<reference key="NSBackgroundColor" ref="525572768"/>
 								<object class="NSColor" key="NSTextColor">
 									<int key="NSColorSpace">6</int>
 									<string key="NSCatalogName">System</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
-						<string key="label">view</string>
-						<reference key="source" ref="1001"/>
-						<reference key="destination" ref="821482609"/>
-					</object>
-					<int key="connectionID">61</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
 						<string key="label">dataSource</string>
 						<reference key="source" ref="519591502"/>
 						<reference key="destination" ref="1001"/>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
-						<string key="label">tableView</string>
-						<reference key="source" ref="1001"/>
-						<reference key="destination" ref="519591502"/>
-					</object>
-					<int key="connectionID">64</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
 						<string key="label">label_explanation</string>
 						<reference key="source" ref="1001"/>
 						<reference key="destination" ref="602337447"/>
 					</object>
 					<int key="connectionID">72</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="821482609"/>
+					</object>
+					<int key="connectionID">75</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">tableView</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="519591502"/>
+					</object>
+					<int key="connectionID">76</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">save:</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="416678582"/>
+					</object>
+					<int key="connectionID">89</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBBindingConnection" key="connection">
+						<string key="label">value: shouldIgnoreAuthorizationRequests</string>
+						<reference key="source" ref="416678582"/>
+						<reference key="destination" ref="1001"/>
+						<object class="NSNibBindingConnector" key="connector">
+							<reference key="NSSource" ref="416678582"/>
+							<reference key="NSDestination" ref="1001"/>
+							<string key="NSLabel">value: shouldIgnoreAuthorizationRequests</string>
+							<string key="NSBinding">value</string>
+							<string key="NSKeyPath">shouldIgnoreAuthorizationRequests</string>
+							<int key="NSNibBindingConnectorVersion">2</int>
+						</object>
+					</object>
+					<int key="connectionID">90</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
 						<reference key="object" ref="821482609"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="602337447"/>
+							<reference ref="789821158"/>
 							<reference ref="461799578"/>
 							<reference ref="970227346"/>
-							<reference ref="602337447"/>
-							<reference ref="789821158"/>
+							<reference ref="412653598"/>
+							<reference ref="505236519"/>
+							<reference ref="416678582"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
 						<reference key="object" ref="96616599"/>
 						<reference key="parent" ref="542699967"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">77</int>
+						<reference key="object" ref="412653598"/>
+						<reference key="parent" ref="821482609"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">80</int>
+						<reference key="object" ref="505236519"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="261564424"/>
+						</object>
+						<reference key="parent" ref="821482609"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">81</int>
+						<reference key="object" ref="261564424"/>
+						<reference key="parent" ref="505236519"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">82</int>
+						<reference key="object" ref="416678582"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="628408481"/>
+						</object>
+						<reference key="parent" ref="821482609"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">83</int>
+						<reference key="object" ref="628408481"/>
+						<reference key="parent" ref="416678582"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
 					<string>70.IBPluginDependency</string>
 					<string>73.IBPluginDependency</string>
 					<string>74.IBPluginDependency</string>
+					<string>77.IBPluginDependency</string>
+					<string>80.IBPluginDependency</string>
+					<string>81.IBPluginDependency</string>
+					<string>82.CustomClassName</string>
+					<string>82.ImportedFromIB2</string>
 				</object>
 				<object class="NSMutableArray" key="dict.values">
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>{{0, 774}, {337, 240}}</string>
+					<string>{{538, 466}, {337, 238}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>AILocalizationButton</string>
+					<boolean value="YES"/>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="unlocalizedProperties">
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">74</int>
+			<int key="maxID">90</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
 							<string>add:</string>
 							<string>cancel:</string>
 							<string>remove:</string>
+							<string>save:</string>
 						</object>
 						<object class="NSMutableArray" key="dict.values">
 							<bool key="EncodedWithXMLCoder">YES</bool>
 							<string>id</string>
 							<string>id</string>
 							<string>id</string>
+							<string>id</string>
 						</object>
 					</object>
 					<object class="NSMutableDictionary" key="outlets">
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
+					<string key="className">AIAdvancedPreferencePane</string>
+					<string key="superclassName">AIModularPane</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">AdiumLibpurple.framework/Headers/AIAdvancedPreferencePane.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">AILocalizationButton</string>
+					<string key="superclassName">NSButton</string>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>view_anchorToLeftSide</string>
+							<string>view_anchorToRightSide</string>
+							<string>window_anchorOnLeftSide</string>
+							<string>window_anchorOnRightSide</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>NSView</string>
+							<string>NSView</string>
+							<string>NSWindow</string>
+							<string>NSWindow</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="93468772">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Adium.framework/Headers/AILocalizationButton.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
 					<string key="className">AIModularPane</string>
 					<string key="superclassName">NSObject</string>
 					<object class="NSMutableDictionary" key="actions">
 				</object>
 				<object class="IBPartialClassDescription">
 					<string key="className">NSButton</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">Adium.framework/Headers/AILocalizationButton.h</string>
-					</object>
+					<reference key="sourceIdentifier" ref="93468772"/>
 				</object>
 				<object class="IBPartialClassDescription">
 					<string key="className">NSButtonCell</string>
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">AdiumLibpurple.framework/Headers/SLPurpleCocoaAdapter.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
 					<string key="className">NSTextField</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
 						<string key="majorKey">IBFrameworkSource</string>
 <plist version="1.0">
 <dict>
 	<key>AIMinimumAdiumVersionRequirement</key>
-	<string>1.4b1</string>
+	<string>1.4.1</string>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>English</string>
 	<key>CFBundleExecutable</key>

spamfilter.xcodeproj/project.pbxproj

 	objects = {
 
 /* Begin PBXBuildFile section */
+		76018AB512C3DF6800FC4AF1 /* CBPurpleAccount+AuthBlocker.m in Sources */ = {isa = PBXBuildFile; fileRef = 76018AB412C3DF6800FC4AF1 /* CBPurpleAccount+AuthBlocker.m */; };
+		76018D0112C3E77400FC4AF1 /* AdiumLibpurple.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76018D0012C3E77400FC4AF1 /* AdiumLibpurple.framework */; };
 		761BD63612206D42004B9A39 /* AISFPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 761BD63512206D42004B9A39 /* AISFPlugin.m */; };
 		761BD99012208C23004B9A39 /* AISFPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 761BD98F12208C23004B9A39 /* AISFPreferences.m */; };
 		761BDA4512209826004B9A39 /* SFPreferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = 761BDA4412209826004B9A39 /* SFPreferences.xib */; };
 /* Begin PBXFileReference section */
 		089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
+		76018AB312C3DF6800FC4AF1 /* CBPurpleAccount+AuthBlocker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CBPurpleAccount+AuthBlocker.h"; sourceTree = "<group>"; };
+		76018AB412C3DF6800FC4AF1 /* CBPurpleAccount+AuthBlocker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CBPurpleAccount+AuthBlocker.m"; sourceTree = "<group>"; };
+		76018D0012C3E77400FC4AF1 /* AdiumLibpurple.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdiumLibpurple.framework; path = "../adium-1.4/build/Release/AdiumLibpurple.framework"; sourceTree = SOURCE_ROOT; };
 		761BD63412206D42004B9A39 /* AISFPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AISFPlugin.h; sourceTree = "<group>"; };
 		761BD63512206D42004B9A39 /* AISFPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AISFPlugin.m; sourceTree = "<group>"; };
 		761BD98E12208C23004B9A39 /* AISFPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AISFPreferences.h; sourceTree = "<group>"; };
 				8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */,
 				76F8BB25122481D50020A73A /* Adium.framework in Frameworks */,
 				76F8BB3C122482460020A73A /* Cocoa.framework in Frameworks */,
+				76018D0112C3E77400FC4AF1 /* AdiumLibpurple.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
 			isa = PBXGroup;
 			children = (
+				76018D0012C3E77400FC4AF1 /* AdiumLibpurple.framework */,
 				76F8BB3B122482460020A73A /* Cocoa.framework */,
 				76F8BB24122481D50020A73A /* Adium.framework */,
 				0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */,
 				761BD63512206D42004B9A39 /* AISFPlugin.m */,
 				761BD98E12208C23004B9A39 /* AISFPreferences.h */,
 				761BD98F12208C23004B9A39 /* AISFPreferences.m */,
+				76018AB312C3DF6800FC4AF1 /* CBPurpleAccount+AuthBlocker.h */,
+				76018AB412C3DF6800FC4AF1 /* CBPurpleAccount+AuthBlocker.m */,
 			);
 			name = Source;
 			sourceTree = "<group>";
 			files = (
 				761BD63612206D42004B9A39 /* AISFPlugin.m in Sources */,
 				761BD99012208C23004B9A39 /* AISFPreferences.m in Sources */,
+				76018AB512C3DF6800FC4AF1 /* CBPurpleAccount+AuthBlocker.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SRCROOT)/../adium/build/Release\"",
+					"\"$(SRCROOT)/../adium-1.4/build/Release\"",
+					"\"$(SRCROOT)/../adium-1.4/Frameworks\"",
 				);
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_ENABLE_FIX_AND_CONTINUE = YES;
 				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
-					"\"$(SRCROOT)/../adium/build/Release\"",
+					"\"$(SRCROOT)/../adium-1.4/build/Release\"",
+					"\"$(SRCROOT)/../adium-1.4/Frameworks\"",
 				);
 				GCC_MODEL_TUNING = G5;
+				HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../adium-1.4/Frameworks/libglib.framework/Headers\"";
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "\"$(HOME)/Library/Application\\ Support/Adium\\ 2.0/PlugIns/\"";
 				OTHER_LDFLAGS = (
 				PRODUCT_NAME = spamfilter;
 				SDKROOT = macosx10.5;
 				SKIP_INSTALL = NO;
+				VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970";
 				WRAPPER_EXTENSION = AdiumPlugin;
 			};
 			name = Release;