diff options
| author | cents <sens03.con@gmail.com> | 2020-05-23 10:44:36 -0700 |
|---|---|---|
| committer | cents <sens03.con@gmail.com> | 2020-05-23 10:44:36 -0700 |
| commit | 8ea01d4c3139e27e84091c0b24266d9fb50ddf38 (patch) | |
| tree | 6a1bfabfb8369a5905f6464cc5804db36bc1aceb | |
| parent | c83fd9f7323464493b76af915e974c1dc2262686 (diff) | |
Clanged changes
| -rw-r--r-- | src/courtroom.cpp | 24 | ||||
| -rw-r--r-- | src/packet_distribution.cpp | 52 |
2 files changed, 38 insertions, 38 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 4d73507c..f5361efc 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2170,8 +2170,7 @@ void Courtroom::handle_chatmessage_3() else
first_message_sent = true;
QString char_name = char_list.at(m_chatmessage[CHAR_ID].toInt()).name;
- ui_ic_chatlog->textCursor().insertHtml("<b>" + char_name +
- ": </b>");
+ ui_ic_chatlog->textCursor().insertHtml("<b>" + char_name + ": </b>");
}
else {
if (first_message_sent && log_goes_downwards)
@@ -2293,10 +2292,10 @@ QString Courtroom::filter_ic_text(QString p_text, bool skip_filter, bool delay_pop = false;
while (trick_check_pos < p_text.size()) {
f_character = p_text.at(trick_check_pos);
- if (f_character == "<")
- f_character = "<";
- else if (f_character == ">")
- f_character = ">";
+ if (f_character == "<")
+ f_character = "<";
+ else if (f_character == ">")
+ f_character = ">";
// Escape character.
if (f_character == "\\" && !ic_next_is_not_special) {
ic_next_is_not_special = true;
@@ -2509,9 +2508,10 @@ QString Courtroom::filter_ic_text(QString p_text, bool skip_filter, * \param p_text The text to be appended
* \param p_name The name of the character/entity who sent said text
* \param is_songchange Whether we are appending a song entry
- * \param force_filter If we are sending plain text and we want to force the filtering regardless of its status (e.g chat entry, song change etc)
- * \param skip_filter If we are sending appending text such as html so we skip the html filter
- * \param chat_color The color of the message sent
+ * \param force_filter If we are sending plain text and we want to force the
+ * filtering regardless of its status (e.g chat entry, song change etc) \param
+ * skip_filter If we are sending appending text such as html so we skip the html
+ * filter \param chat_color The color of the message sent
*/
void Courtroom::append_ic_text(QString p_text, QString p_name,
@@ -2795,7 +2795,7 @@ void Courtroom::chat_tick() chat_tick_timer->stop();
int msg_delay = message_display_speed[current_display_speed];
if (slower_blips)
- msg_delay = message_display_speed_slow[current_display_speed];
+ msg_delay = message_display_speed_slow[current_display_speed];
// Stops blips from playing when we have a formatting option.
bool formatting_char = false;
@@ -2832,7 +2832,9 @@ void Courtroom::chat_tick() f_character = f_character.toHtmlEscaped();
if (punctuation_chars.contains(f_character)) {
- msg_delay *= punctuation_modifier + 1; // Since we are handling a boolean, if its true its double (1 + 1) or false (1 + 0).
+ msg_delay *=
+ punctuation_modifier + 1; // Since we are handling a boolean, if its
+ // true its double (1 + 1) or false (1 + 0).
// ui_vp_message->insertPlainText(f_character);
}
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index 36593d6e..37231d85 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -482,35 +482,33 @@ void AOApplication::server_packet_received(AOPacket *p_packet) int element_ahead = 0;
for (int n_element = 0; n_element < f_contents.size(); ++n_element) {
element_ahead = n_element + 1;
- if (!musics_time && f_contents.at(n_element).startsWith("==") && (
- f_contents.at(element_ahead).endsWith(".wav") ||
- f_contents.at(element_ahead).endsWith(".mp3") ||
- f_contents.at(element_ahead).endsWith(".mp4") ||
- f_contents.at(element_ahead).endsWith(".ogg") ||
- f_contents.at(element_ahead).endsWith(".opus"))) {
- legacy_system = true;
-
- }
- if(!legacy_system) {
- if (!musics_time && (f_contents.at(n_element).startsWith("==") ||
- f_contents.at(element_ahead).endsWith(".wav") ||
- f_contents.at(element_ahead).endsWith(".mp3") ||
- f_contents.at(element_ahead).endsWith(".mp4") ||
- f_contents.at(element_ahead).endsWith(".ogg") ||
- f_contents.at(element_ahead).endsWith(".opus"))) {
- musics_time = true;
- }
+ if (!musics_time && f_contents.at(n_element).startsWith("==") &&
+ (f_contents.at(element_ahead).endsWith(".wav") ||
+ f_contents.at(element_ahead).endsWith(".mp3") ||
+ f_contents.at(element_ahead).endsWith(".mp4") ||
+ f_contents.at(element_ahead).endsWith(".ogg") ||
+ f_contents.at(element_ahead).endsWith(".opus"))) {
+ legacy_system = true;
}
- else{
- if (!musics_time && (f_contents.at(n_element).startsWith("==") ||
- f_contents.at(n_element).endsWith(".wav") ||
- f_contents.at(n_element).endsWith(".mp3") ||
- f_contents.at(n_element).endsWith(".mp4") ||
- f_contents.at(n_element).endsWith(".ogg") ||
- f_contents.at(n_element).endsWith(".opus"))) {
- musics_time = true;
+ if (!legacy_system) {
+ if (!musics_time && (f_contents.at(n_element).startsWith("==") ||
+ f_contents.at(element_ahead).endsWith(".wav") ||
+ f_contents.at(element_ahead).endsWith(".mp3") ||
+ f_contents.at(element_ahead).endsWith(".mp4") ||
+ f_contents.at(element_ahead).endsWith(".ogg") ||
+ f_contents.at(element_ahead).endsWith(".opus"))) {
+ musics_time = true;
+ }
}
-
+ else {
+ if (!musics_time && (f_contents.at(n_element).startsWith("==") ||
+ f_contents.at(n_element).endsWith(".wav") ||
+ f_contents.at(n_element).endsWith(".mp3") ||
+ f_contents.at(n_element).endsWith(".mp4") ||
+ f_contents.at(n_element).endsWith(".ogg") ||
+ f_contents.at(n_element).endsWith(".opus"))) {
+ musics_time = true;
+ }
}
// Not everything needs to have a thread.
|
