Did some tinkering, nothing really useful done though. Removed a useless
[MenuTunes.git] / NetworkObject.m
index da316e1..4473970 100755 (executable)
 
 @implementation NetworkObject
 
+- (id)init
+{
+    if ( (self = [super init]) ) {
+        if (![self requiresPassword]) {
+            _authenticated = YES;
+        } else {
+            _authenticated = NO;
+        }
+    }
+    return self;
+}
+
 - (ITMTRemote *)remote
 {
-    return [[MainController sharedController] currentRemote];
+    if (_authenticated) {
+        return [[MainController sharedController] currentRemote];
+    } else {
+        return nil;
+    }
 }
 
 - (NSString *)serverName
 - (BOOL)sendPassword:(NSData *)password
 {
     if ([password isEqualToData:[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"]]) {
+        _authenticated = YES;
         return YES;
     } else {
+        _authenticated = NO;
         return NO;
     }
 }