]> cgit.babelmonkeys.de Git - mpdbot.git/commitdiff
Get rid of most occurences of of_log()
authorFlorian Zeitz <florob@babelmonkeys.de>
Sat, 9 Jul 2011 16:11:46 +0000 (18:11 +0200)
committerFlorian Zeitz <florob@babelmonkeys.de>
Sat, 9 Jul 2011 16:11:46 +0000 (18:11 +0200)
src/PEPThread.m
src/mpdbot.m

index e857ae368311a28b6473fa83dd3bba77adbb90bd..e00db9d8597aebcfc6ada79fa3c27af2b49e3742 100644 (file)
@@ -47,8 +47,8 @@
                                       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;
index d5273a8655c30547d6938924778d820e728b0763..f55e4b77ec3b23f6cd8e7130b46cba15a8bab010 100644 (file)
@@ -49,7 +49,8 @@ OF_APPLICATION_DELEGATE(AppDelegate)
        [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];
        }
 
@@ -68,7 +69,7 @@ OF_APPLICATION_DELEGATE(AppDelegate)
 
 - (void)connectionWasAuthenticated: (XMPPConnection*)conn
 {
-       of_log(@"Auth successful");
+       [of_stdout writeLine: @"Auth successful"];
 }
 
 - (void)connection: (XMPPConnection*)conn
@@ -77,7 +78,7 @@ OF_APPLICATION_DELEGATE(AppDelegate)
        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];
@@ -133,6 +134,6 @@ OF_APPLICATION_DELEGATE(AppDelegate)
 
 - (void)connectionWasClosed: (XMPPConnection*)conn
 {
-       of_log(@"Connection was closed!");
+       [of_stdout writeLine: @"Connection was closed!"];
 }
 @end