# HG changeset patch
# User unc0rr
# Date 1298826948 -10800
# Node ID b3fa882105704337b29c1d7f6dafa25ccab1f033
# Parent  705c6186ad9d7c57b2d62cab0a21d92b98b78ad5# Parent  59c2489afcbd9c76d0ca7c8ca1907896e86ac140
merge

diff -r 705c6186ad9d -r b3fa88210570 QTfrontend/chatwidget.h
--- a/QTfrontend/chatwidget.h	Sun Feb 27 20:15:09 2011 +0300
+++ b/QTfrontend/chatwidget.h	Sun Feb 27 20:15:48 2011 +0300
@@ -61,6 +61,7 @@
   void setShowReady(bool s);
   void setShowFollow(bool enabled);
   static const char* STYLE;
+  QStringList ignoreList, friendsList;
 
 private:
   void loadList(QStringList & list, const QString & file);
@@ -90,7 +91,6 @@
   QGridLayout mainLayout;
   QTextBrowser* chatText;
   QStringList chatStrings;
-  QStringList ignoreList, friendsList;
   QListWidget* chatNicks;
   QLineEdit* chatEditLine;
   QAction * acInfo;
diff -r 705c6186ad9d -r b3fa88210570 QTfrontend/gameuiconfig.h
--- a/QTfrontend/gameuiconfig.h	Sun Feb 27 20:15:09 2011 +0300
+++ b/QTfrontend/gameuiconfig.h	Sun Feb 27 20:15:48 2011 +0300
@@ -31,6 +31,7 @@
     Q_OBJECT
 
 public:
+    HWForm * Form;
     GameUIConfig(HWForm * FormWidgets, const QString & fileName);
     QStringList GetTeamsList();
     QRect vid_Resolution();
@@ -67,7 +68,6 @@
     void SaveOptions();
 
 private:
-    HWForm * Form;
     quint8 depth;
 };
 
diff -r 705c6186ad9d -r b3fa88210570 QTfrontend/newnetclient.cpp
--- a/QTfrontend/newnetclient.cpp	Sun Feb 27 20:15:09 2011 +0300
+++ b/QTfrontend/newnetclient.cpp	Sun Feb 27 20:15:48 2011 +0300
@@ -29,6 +29,10 @@
 #include "gamecfgwidget.h"
 #include "teamselect.h"
 #include "misc.h"
+/* only to get the ignoreList from the chat widget */
+#include "hwform.h"
+#include "pages.h"
+#include "chatwidget.h"
 
 char delimeter='\n';
 
@@ -398,8 +402,15 @@
                 if (isChief)
                     emit configAsked();
             }
-            emit nickAdded(lst[i], isChief && (lst[i] != mynick));
-            emit chatStringFromNet(tr("%1 *** %2 has joined the room").arg('\x03').arg(lst[i]));
+            if (lst[i] != mynick && isChief && config->Form->ui.pageRoomsList->chatWidget->ignoreList.contains(lst[i], Qt::CaseInsensitive) && !config->Form->ui.pageRoomsList->chatWidget->friendsList.contains(lst[i], Qt::CaseInsensitive))
+            {
+                kickPlayer(lst[i]);
+            }
+            else
+            {
+                emit nickAdded(lst[i], isChief && (lst[i] != mynick));
+                emit chatStringFromNet(tr("%1 *** %2 has joined the room").arg('\x03').arg(lst[i]));
+            }
         }
         return;
     }