← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2619: add %[continent] to country variables

 

------------------------------------------------------------
revno: 2619
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2011-09-30 14:13:00 +0200
message:
  add %[continent] to country variables
modified:
  changelog.txt
  dcpp/GeoIP.cpp
  help/settings_appearance.html


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt	2011-09-23 11:47:15 +0000
+++ changelog.txt	2011-09-30 12:13:00 +0000
@@ -43,7 +43,8 @@
 * COM initialization fix for the Windows UPnP mapper (thanks bigmuscle)
 * Show country codes next to country names (poy)
 * [L#425667] More accurate indexing time left calculation (poy)
-* Switch to binary GeoIP databases and add IPv6 support (poy)
+* Switch to binary GeoIP databases, add the IPv6 one (poy)
+* The country format can be customized, see help for available codes (poy)
 
 -- 0.782 2011-03-05 --
 * Prevent a remote crash triggered via malformed user commands (poy)

=== modified file 'dcpp/GeoIP.cpp'
--- dcpp/GeoIP.cpp	2011-09-30 11:59:16 +0000
+++ dcpp/GeoIP.cpp	2011-09-30 12:13:00 +0000
@@ -66,6 +66,7 @@
 			params["2code"] = [id] { return forwardRet(GeoIP_code_by_id(id)); };
 			params["3code"] = [id] { return forwardRet(GeoIP_code3_by_id(id)); };
 			params["name"] = [this, id] { return forwardRet(GeoIP_country_name_by_id(geo, id)); };
+			params["continent"] = [id] { return forwardRet(GeoIP_continent_by_id(id)); };
 
 			return Util::formatParams(SETTING(COUNTRY_FORMAT), params);
 		}

=== modified file 'help/settings_appearance.html'
--- help/settings_appearance.html	2011-09-30 11:59:16 +0000
+++ help/settings_appearance.html	2011-09-30 12:13:00 +0000
@@ -76,9 +76,10 @@
 interface. <b>Default: %[2code] - %[name]</b><br/><br/>
 Available variables:
 <ul>
-	<li><b>%[2code]</b> gets replaced by a 2-letters country code</li>
-	<li><b>%[3code]</b> gets replaced by a 3-letters country code</li>
-	<li><b>%[name]</b> gets replaced by the full country name</li>
+	<li><b>%[2code]</b> gets replaced by a 2-letters country code (eg DE, FR).</li>
+	<li><b>%[3code]</b> gets replaced by a 3-letters country code (eg DEU, FRA).</li>
+	<li><b>%[name]</b> gets replaced by the full country name (eg Germany, France).</li>
+	<li><b>%[continent]</b> gets replaced by a continent code (AF, AS, EU, NA, OC, SA for Africa, Asia, Europe, North America, Oceania and South America).</li>
 </ul>
 </dd>
 <dt id="messagelines">Height of the message editing box</dt>