QTfrontend/net/newnetclient.cpp
branchflibqtfrontend
changeset 8208 171da01bd04d
parent 8103 c247346d296f
parent 8157 695f1eef72c8
child 8304 620560c89284
--- a/QTfrontend/net/newnetclient.cpp	Fri Nov 30 18:19:52 2012 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Tue Dec 04 09:15:55 2012 +0400
@@ -364,6 +364,14 @@
         return;
     }
 
+    if (lst[0] == "BANLIST")
+    {
+        QStringList tmp = lst;
+        tmp.removeFirst();
+        emit bansList(tmp);
+        return;
+    }
+
     if (lst[0] == "CLIENT_FLAGS")
     {
         if(lst.size() < 3 || lst[1].size() < 2)
@@ -863,6 +871,26 @@
     RawSendNet(QString("BAN%1%2").arg(delimeter).arg(nick));
 }
 
+void HWNewNet::banIP(const QString & ip, const QString & reason, int seconds)
+{
+    RawSendNet(QString("BANIP%1%2%1%3%1%4").arg(delimeter).arg(ip).arg(reason).arg(seconds));
+}
+
+void HWNewNet::banNick(const QString & nick, const QString & reason, int seconds)
+{
+    RawSendNet(QString("BANNICK%1%2%1%3%1%4").arg(delimeter).arg(nick).arg(reason).arg(seconds));
+}
+
+void HWNewNet::getBanList()
+{
+    RawSendNet(QByteArray("BANLIST"));
+}
+
+void HWNewNet::removeBan(const QString & b)
+{
+    RawSendNet(QString("UNBAN%1%2").arg(delimeter).arg(b));
+}
+
 void HWNewNet::kickPlayer(const QString & nick)
 {
     RawSendNet(QString("KICK%1%2").arg(delimeter).arg(nick));