]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/login.c
Whitespace fixes (no functional changes)
[ngircd-alex.git] / src / ngircd / login.c
index b3ab2ed3cf70138efb7326d7e9158bcf0b29e713..ba9378f824e333b1576bb7837094acf221d6b26e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <strings.h>
 #include <unistd.h>
 
-#include "defines.h"
 #include "conn.h"
 #include "class.h"
-#include "client.h"
 #include "client-cap.h"
 #include "channel.h"
 #include "conf.h"
-#include "io.h"
 #include "parse.h"
 #include "log.h"
 #include "messages.h"
 #include "ngircd.h"
-#include "pam.h"
 #include "irc-info.h"
 #include "irc-mode.h"
 #include "irc-write.h"
 #include "login.h"
 
 #ifdef PAM
+
+#include "io.h"
+#include "pam.h"
+
 static void cb_Read_Auth_Result PARAMS((int r_fd, UNUSED short events));
+
 #endif
 
 /**
@@ -92,7 +92,7 @@ Login_User(CLIENT * Client)
                /* Don't do any PAM authentication at all if PAM is not
                 * enabled, instead emulate the behavior of the daemon
                 * compiled without PAM support. */
-               if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0) 
+               if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0)
                        return Login_User_PostAuth(Client);
                Client_Reject(Client, "Bad server password", false);
                return DISCONNECTED;
@@ -192,7 +192,7 @@ Login_User_PostAuth(CLIENT *Client)
        /* Set default user modes */
        if (Conf_DefaultUserModes[0]) {
                snprintf(modes, sizeof(modes), "+%s", Conf_DefaultUserModes);
-               Req.prefix = Client_ThisServer();
+               Req.prefix = Client_ID(Client_ThisServer());
                Req.command = "MODE";
                Req.argc = 2;
                Req.argv[0] = Client_ID(Client);