Mihawk пре 12 година
родитељ
комит
43d96d9cc7
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      Client.cpp

+ 5 - 1
Client.cpp

@@ -47,7 +47,7 @@ Client::~Client()
 void Client::connect(const char *host, quint16 port)
 {
   myJoinMessageScheduled = true; //Hi message only scheduled at bot connection
-
+  setPing(13);
   QWClient::connect(host, port);
 }
 
@@ -361,6 +361,8 @@ void Client::onLevelChanged(int, const char *levelName, float, float, float, flo
   myDownloadProgressPrintedFlag = false;
   mySpamMutedFlag = false;
   myQWMutedFlag = false;
+
+  setPing(13);
 }
 
 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -420,6 +422,8 @@ void Client::onStuffedCmd(const char *cmd)
   {
     myOnServerFlag = true;
 
+    setPing(Settings::globalInstance()->botPing());
+
     /* Only say hi if hi is scheduled */
     if(myJoinMessageScheduled)
     {