Fix war feed

This commit is contained in:
Sakuhl 2018-02-15 13:11:02 +01:00
parent 4c6ee35ac7
commit 146ccac1fa

View File

@ -88,7 +88,7 @@ pub fn war_livefeed() {
}).filter(|&(_, is_in_it)| is_in_it).next().unwrap_or(("WC?", true)).0; }).filter(|&(_, is_in_it)| is_in_it).next().unwrap_or(("WC?", true)).0;
if old_server != key { if old_server != key {
let player = player.as_str().unwrap(); let player = player.as_str().unwrap();
let guild = wynncraft::player(player).unwrap().guild.name; let guild = wynncraft::player(player).map(|x| x.guild.name).unwrap_or("?".to_owned());
for listener in warfeedlisteners for listener in warfeedlisteners
.load::<WarfeedListener>(&connection) .load::<WarfeedListener>(&connection)
.expect("Error loading listeners") { .expect("Error loading listeners") {