X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/6e637324a7d146b5675fec00c819259d7ac9c244..0605ae7fa0f13acc07644b5e09b3f4187518b3d8:/NetworkObject.m diff --git a/NetworkObject.m b/NetworkObject.m index da316e1..32bbbc8 100755 --- a/NetworkObject.m +++ b/NetworkObject.m @@ -21,9 +21,24 @@ @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 @@ -42,8 +57,10 @@ - (BOOL)sendPassword:(NSData *)password { if ([password isEqualToData:[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"]]) { + _authenticated = YES; return YES; } else { + _authenticated = NO; return NO; } }