From: David ‘Bombe’ Roden Date: Sun, 14 Nov 2010 10:07:32 +0000 (+0100) Subject: Store the client name and version in the inserted Sone. X-Git-Tag: 0.3-RC1~98 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8fbb593a0292420f02c5efad30347e7076abe581;p=Sone.git Store the client name and version in the inserted Sone. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneInserter.java b/src/main/java/net/pterodactylus/sone/core/SoneInserter.java index 86ea92a..e23d1a9 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneInserter.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneInserter.java @@ -32,6 +32,7 @@ import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Reply; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.freenet.StringBucket; +import net.pterodactylus.sone.main.SonePlugin; import net.pterodactylus.util.io.Closer; import net.pterodactylus.util.logging.Logging; import net.pterodactylus.util.service.AbstractService; @@ -314,6 +315,7 @@ public class SoneInserter extends AbstractService { } template.set("currentSone", soneProperties); + template.set("version", SonePlugin.VERSION); StringWriter writer = new StringWriter(); StringBucket bucket = null; try { diff --git a/src/main/resources/templates/insert/sone.xml b/src/main/resources/templates/insert/sone.xml index b947dc4..d6dd643 100644 --- a/src/main/resources/templates/insert/sone.xml +++ b/src/main/resources/templates/insert/sone.xml @@ -3,6 +3,11 @@ + + Sone + <% version|xml> + + <% currentSone.profile.firstName|xml> <% currentSone.profile.middleName|xml>