*** VERSION 5.2.0 ***
[NeonServV5.git] / src / cmd_neonserv_ban.c
index 19f10c82ffbf51c4d6cfa670e117a7fe84efe617..b6b6c706e12efc6452b6902647a1fec3a084ef79 100644 (file)
@@ -1,4 +1,4 @@
-/* cmd_neonserv_ban.c - NeonServ v5.0
+/* cmd_neonserv_ban.c - NeonServ v5.2
  * Copyright (C) 2011  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -81,6 +81,11 @@ static void neonserv_cmd_ban_async1(struct ClientSocket *client, struct ClientSo
                     skip = 1;
                     break;
                 }
+                if(cuser == user || ((cuser->flags & USERFLAG_ISAUTHED) && !stricmp(user->auth, cuser->auth))) {
+                    reply(textclient, user, "NS_YOU_PROTECTED");
+                    skip = 1;
+                    break;
+                }
                 if(isUserProtected(chan, cuser, user)) {
                     reply(textclient, user, "NS_USER_PROTECTED", cuser->nick);
                     skip = 1;