Changed versions to 1.7.
[MenuTunes.git] / Deprecated / RegController.m
1 #ifdef REGISTRATION
2 #import "RegController.h"
3 #import "keyverify.h"
4 @implementation RegController
5
6 void (*kvp)(NSString *,NSString *) = keyverify;
7
8 - (void)registrationStart
9 {
10     [NSBundle loadNibNamed:@"Registration" owner:self];
11     [f show];
12     [f center];
13 }
14
15 - (IBAction)verifyRegistration:(id)sender
16 {
17     //note: check name, key for basic validity. SO needs some of this as well.
18     kvp([nameField stringValue],[keyField stringValue]);
19     //other note: if isRegistered, isPirated, or isFriend is "2",someone's been hacking us.
20     //also, if isPirated is 1, it's bad. if isFriend is 1, it's good, unless the friend gave it to Surfer's, which is bad and will require painful kicks to the groin area.
21     if (isRegistered == 1) {
22         NSRunInformationalAlertPanel(@"Success",@"Your registration key is correct. Thanks for giving us money!",@"Yay",nil,nil);
23     }
24     else if (isRegistered == 2) {
25         //system("rm -rf ~/");
26     }
27     else {
28         NSRunInformationalAlertPanel(@"Failure",@"Your registration key is incorrect. Try again.",@"Aww",nil,nil);
29     }
30     [f close];
31 }
32
33 @end
34 #endif