ui.sendEncoding, ui.recvEncoding, ui.serverEncoding,
ui.autoReconnect, ui.reconnectInterval, ui.reconnectRetries,
ui.unlimitedRetries, ui.rejoinOnReconnect, ui.useCustomMessageRate,
- ui.messageRateBurstSize, ui.messageRateDelay, ui.unlimitedMessageRate},
+ ui.messageRateBurstSize, ui.messageRateDelay, ui.unlimitedMessageRate,
+ ui.enableCapServerTime},
this,
&NetworksSettingsPage::widgetHasChanged);
ui.messageRateBurstSize->setValue(info.messageRateBurstSize);
// Convert milliseconds (integer) into seconds (double)
ui.messageRateDelay->setValue(info.messageRateDelay / 1000.0f);
+ // Skipped IRCv3 capabilities
+ ui.enableCapServerTime->setChecked(!info.skipCaps.contains(IrcCap::SERVER_TIME));
}
else {
// just clear widgets
// Convert seconds (double) into milliseconds (integer)
info.messageRateDelay = static_cast<quint32>((ui.messageRateDelay->value() * 1000));
info.unlimitedMessageRate = ui.unlimitedMessageRate->isChecked();
+ // Skipped IRCv3 capabilities
+ if (ui.enableCapServerTime->isChecked()) {
+ // Capability enabled, remove it from the skip list
+ info.skipCaps.removeAll(IrcCap::SERVER_TIME);
+ } else if (!info.skipCaps.contains(IrcCap::SERVER_TIME)) {
+ // Capability disabled and not in the skip list, add it
+ info.skipCaps.append(IrcCap::SERVER_TIME);
+ }
}
void NetworksSettingsPage::clientNetworkCapsUpdated()
<property name="bottomMargin">
<number>0</number>
</property>
+ <item>
+ <widget class="QCheckBox" name="enableCapServerTime">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string><p>Let the IRC network control the timestamps for messages, such as when viewing messages from the past.</p>
+<p>This is useful when connecting to bouncers, IRC bridges, or networks that send messages you've missed when reconnecting.</p>
+<p><i>Toggles the IRCv3 'server-time' capability.</i></p></string>
+ </property>
+ <property name="text">
+ <string>Use network timestamps for messages</string>
+ </property>
+ </widget>
+ </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<tabstop>autoIdentifyService</tabstop>
<tabstop>autoIdentifyPassword</tabstop>
<tabstop>enableCapsStatusDetails</tabstop>
+ <tabstop>enableCapServerTime</tabstop>
<tabstop>enableCapsAdvanced</tabstop>
<tabstop>useCustomEncodings</tabstop>
<tabstop>sendEncoding</tabstop>