]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-login.c
Add new class.{c|h} to project
[ngircd-alex.git] / src / ngircd / irc-login.c
index 0577cd9c0a94877532d7d594a2bb780e62c96598..eeecf96d82d88b40af7b4693ec1edbc3056bb6c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2011 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
@@ -27,6 +27,7 @@
 
 #include "ngircd.h"
 #include "conn-func.h"
+#include "class.h"
 #include "conf.h"
 #include "channel.h"
 #include "io.h"
@@ -936,6 +937,12 @@ Hello_User(CLIENT * Client)
        }
 #endif
 
+       if (Class_IsMember(CLASS_GLINE, Client) ||
+           Class_IsMember(CLASS_KLINE, Client)) {
+               Reject_Client(Client);
+               return DISCONNECTED;
+       }
+
 #ifdef PAM
        if (!Conf_PAM) {
                /* Don't do any PAM authentication at all, instead emulate
@@ -959,6 +966,7 @@ Hello_User(CLIENT * Client)
        } else {
                /* Sub process */
                Log_Init_Subprocess("Auth");
+               Conn_CloseAllSockets(NONE);
                result = PAM_Authenticate(Client);
                if (write(pipefd[1], &result, sizeof(result)) != sizeof(result))
                        Log_Subprocess(LOG_ERR,