Bläddra i källkod

* CYGWIN fix
* compile fix


svn: 865

Bryan Drewery 22 år sedan
förälder
incheckning
4117b59d7f
2 ändrade filer med 9 tillägg och 2 borttagningar
  1. 8 1
      src/main.c
  2. 1 1
      src/mod/irc.mod/irc.c

+ 8 - 1
src/main.c

@@ -758,9 +758,14 @@ int main(int argc, char **argv)
   putlog(LOG_MISC, "*", "=== %s: %d users.", conf.bot->nick, count_users(userlist));
 
   /* Move into background? */
+  /* we don't split cygwin because to run as a service the bot shouldn't exit.
+     confuses windows ;)
+   */
   if (backgrd) {
+#ifndef CYGWIN_HACKS
     bg_do_split();
   } else {
+#endif /* !CYGWIN_HACKS */
     FILE *f = NULL;
     int xx;
 
@@ -776,7 +781,9 @@ int main(int argc, char **argv)
       fclose(f);
     } else
       printf(EGG_NOWRITE, conf.bot->pid_file);
-
+#ifdef CYGWIN_HACKS
+      printf("Launched into the background  (pid: %d)\n\n", xx);
+#endif
   }
 
   use_stderr = 0;		/* Stop writing to stderr now */

+ 1 - 1
src/mod/irc.mod/irc.c

@@ -533,7 +533,7 @@ static void request_op(struct chanset_t *chan)
   }
   if (!i) {
     /* FIXME: This notice floods when bots arent in chans..*/
-    if (channel_active(chan) && !channel_pending(chan)
+    if (channel_active(chan) && !channel_pending(chan))
       putlog(LOG_GETIN, "*", STR("No one to ask for ops on %s"), chan->dname);
     return;
   }