Add guild of player to war feed

This commit is contained in:
Sakuhl 2018-01-12 23:46:53 +01:00
parent d04ecc4d61
commit b9fcad2442

View File

@ -368,11 +368,14 @@ fn war_livefeed() {
}
}).filter(|&(_, is_in_it)| is_in_it).next().unwrap_or(("WC?", true)).0;
if old_server != key {
let player = player.as_str().unwrap();
let guild = wynncraft::player(player).unwrap().guild.name;
for listener in warfeedlisteners
.load::<WarfeedListener>(&connection)
.expect("Error loading listeners") {
let _ = ChannelId(listener.id as u64).say(format!("{}: ~~{}~~ -> **{}**",
player.as_str().unwrap(),
let _ = ChannelId(listener.id as u64).say(format!("{} ({}): ~~{}~~ -> **{}**",
player,
guild,
old_server,
key
));