Quick intermediary checkin to add the preset color pull-down. More coming soon.
[MenuTunes.git] / NetworkObject.m
index da316e1..32bbbc8 100755 (executable)
 
 @implementation NetworkObject
 
 
 @implementation NetworkObject
 
+- (id)init
+{
+    if ( (self = [super init]) ) {
+        if (![self requiresPassword]) {
+            _authenticated = YES;
+        } else {
+            _authenticated = NO;
+        }
+    }
+    return self;
+}
+
 - (ITMTRemote *)remote
 {
 - (ITMTRemote *)remote
 {
-    return [[MainController sharedController] currentRemote];
+    if (_authenticated)
+        return [[MainController sharedController] currentRemote];
+    else
+        return nil;
 }
 
 - (NSString *)serverName
 }
 
 - (NSString *)serverName
 - (BOOL)sendPassword:(NSData *)password
 {
     if ([password isEqualToData:[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"]]) {
 - (BOOL)sendPassword:(NSData *)password
 {
     if ([password isEqualToData:[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"]]) {
+        _authenticated = YES;
         return YES;
     } else {
         return YES;
     } else {
+        _authenticated = NO;
         return NO;
     }
 }
         return NO;
     }
 }