- _previousConnectionAttemptFailed = false;
- _lastUsedServerlistIndex = 0;
- // TODO make configurable
- _whoTimer.setInterval(90 * 1000);
- _whoTimer.setSingleShot(false);
+
+ _previousConnectionAttemptFailed = false;
+ _lastUsedServerlistIndex = 0;
+
+ // TODO make autowho configurable (possibly per-network)
+ _autoWhoEnabled = true;
+ _autoWhoInterval = 90;
+ _autoWhoNickLimit = 0; // unlimited
+ _autoWhoDelay = 3;
+
+ _autoWhoTimer.setInterval(_autoWhoDelay * 1000);
+ _autoWhoTimer.setSingleShot(false);
+ _autoWhoCycleTimer.setInterval(_autoWhoInterval * 1000);
+ _autoWhoCycleTimer.setSingleShot(false);
+
+ // TokenBucket to avaid sending too much at once
+ _messagesPerSecond = 1;
+ _burstSize = 5;
+ _tokenBucket = 5; // init with a full bucket
+
+ _tokenBucketTimer.start(_messagesPerSecond * 1000);
+ _tokenBucketTimer.setSingleShot(false);