port: 6600];
return;
} @catch (id e) {
- of_log(@"Connection failed, retrying in %" PRIi64
- " seconds", pause);
+ [of_stderr writeFormat: @"Connection failed, retrying"
+ " in %" PRIi64 " seconds\n", pause];
[OFThread sleepForTimeInterval: pause];
if (pause < 120)
pause *= 2;
[conn setDelegate: self];
if ([arguments count] != 3) {
- of_log(@"Invalid count of command line arguments!");
+ [of_stdout writeFormat: @"Usage: %@ <server> <user> <passwd>\n",
+ [OFApplication programName]];
[OFApplication terminateWithStatus: 1];
}
- (void)connectionWasAuthenticated: (XMPPConnection*)conn
{
- of_log(@"Auth successful");
+ [of_stdout writeLine: @"Auth successful"];
}
- (void)connection: (XMPPConnection*)conn
XMPPPresence *pres;
XMPPIQ *disco;
- of_log(@"Bound to JID: %@", [jid fullJID]);
+ [of_stdout writeFormat: @"Bound to JID: %@\n", [jid fullJID]];
pres = [XMPPPresence presence];
[pres addPriority: 0];
- (void)connectionWasClosed: (XMPPConnection*)conn
{
- of_log(@"Connection was closed!");
+ [of_stdout writeLine: @"Connection was closed!"];
}
@end