Discord toggle pt.2.
Forgot these.
This commit is contained in:
		
							parent
							
								
									95b8bd72d3
								
							
						
					
					
						commit
						7de64bd0c0
					
				@ -265,7 +265,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    QCryptographicHash hash(QCryptographicHash::Algorithm::Sha256);
 | 
					    QCryptographicHash hash(QCryptographicHash::Algorithm::Sha256);
 | 
				
			||||||
    hash.addData(server_address.toUtf8());
 | 
					    hash.addData(server_address.toUtf8());
 | 
				
			||||||
    discord->state_server(server_name.toStdString(), hash.result().toBase64().toStdString());
 | 
					    if (is_discord_enabled())
 | 
				
			||||||
 | 
					      discord->state_server(server_name.toStdString(), hash.result().toBase64().toStdString());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  else if (header == "CI")
 | 
					  else if (header == "CI")
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
 | 
				
			|||||||
@ -586,8 +586,11 @@ bool AOApplication::get_blank_blip()
 | 
				
			|||||||
    return result.startsWith("true");
 | 
					    return result.startsWith("true");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool AOApplication::is_discord_enabled()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    QString result = configini->value("discord", "true").value<QString>();
 | 
				
			||||||
 | 
					    return result.startsWith("true");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user