OFArray *arguments = [OFApplication arguments];
conn = [[XMPPConnection alloc] init];
- conn.delegate = self;
+ [conn addDelegate: self];
if (arguments.count != 3) {
[of_stdout writeFormat: @"Usage: %@ <server> <user> <passwd>\n",
[conn connect];
[conn handleConnection];
} @catch (id e) {
- of_log(@"%@", e);
+ [of_stderr writeFormat: @"%@\n", e];
}
}
return YES;
}
}
+ [of_stderr writeLine: @"Server does NOT support PEP"];
}
return NO;
}
-- (void)connection: (XMPPConnection*)conn
- didReceiveMessage: (XMPPMessage*)msg
-{
- of_log(@"Message: %@", msg);
-}
-
- (void)connection: (XMPPConnection*)conn
didReceivePresence: (XMPPPresence*)pres
{