site

(djk)
2011-04-02: Patch for Freetalk support from:

Patch for Freetalk support from: sethcg@a-tin0kMl1I~8xn5lkQDqYZRExKLzJITrxcNsr4T~fY CHK@6-CWxjyvcNVgPmYPvOZLSTlgBaB1fkF4watv4kogeF0,QlPqmYC4UplCedc-cHQiiRZWRx3jK~2kaVe6ZwDXj~I,AAIC--8/freetalk2.patch sha1sum:c78d1cc634cf148555ab1f8f1660d69dcb88da3d freetalk2.patch

diff --git a/alien/src/fmsutil/FMSConnection.java b/alien/src/fmsutil/FMSConnection.java
--- a/alien/src/fmsutil/FMSConnection.java
+++ b/alien/src/fmsutil/FMSConnection.java
@@ -53,6 +53,9 @@ class FMSConnection extends NNTPConnecti
     // Hmmmm... would be better to raise NNTPExceptions here.
     // Returns -1 for 'null' trust.
     public int xgettrust(int kind, String fmsId) throws IOException {
+        if (fmsId.indexOf("@") != -1) {
+            return -1;
+        }
         send(String.format("XGETTRUST %s %s", trustKindToString(kind), fmsId));
         String reply = read();
         StatusResponse response = parseResponse(reply, false);
diff --git a/doc/quickstart.txt b/doc/quickstart.txt
--- a/doc/quickstart.txt
+++ b/doc/quickstart.txt
@@ -3,7 +3,9 @@
 
 == Quick Start ==
 
-===Configuration===
+jfniki can be configured to either use FMS or Freetalk, but not both at the same time.
+
+===Configuration for FMS===
 # Click on the "View" link below to view (and edit) the configuration. \\
   //Hint: Open the "View" link in a separate tab or window.//
 # Set the "FMS Name" to the human readable part of your FMS ID (everything before the '@').
@@ -11,6 +13,12 @@
 # Adjust any other values as necessary.  If you're running FMS and Fred on the same machine on the default ports this shouldn't be necessary.
 # Click the "Done" button to save the configuration changes.
 
+===Configuration for Freetalk===
+Same as configuring for FMS, except read "Freetalk" any time you see "FMS".
+# Change the "FMS Port" to 1199, which is Freetalk's default port
+# Set the "FMS Name" to your full Freetalk identity as shown at the top of the Freetalk => Identities page.
+# Change the "FMS Group" from "biss.test000" to "mul.biss.test000"
+
 === Finding Other Versions Of the testwiki===
 Click the "Discover" link below to search for other versions of the wiki.
 
@@ -31,7 +39,7 @@ Try entering "freenetdocwiki" in for the
 # The only way to start an empty wiki from scratch is by loading and unloading the plugin (or running stand alone from the command line).
 
 ----
-=== Finding Your Private SSK ===
+=== Finding Your Private SSK in FMS===
 # Go to http://127.0.0.1:18080/localidentities.htm in the FMS web interface and click the "Export Identities" button
 to save your FMS indentities to a file.
 # In the text editor of your choice, open the file you saved above and look for the Name and PrivateKey values for the identity you want to use.
@@ -56,6 +64,25 @@ SSK@YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
 }}}
 
 ----
+
+=== Finding Your Private SSK in Freetalk===
+#Go to your "Own anonymous identities" page in Freetalk (http://127.0.0.1:8888/WebOfTrust/OwnIdentities) and click "Edit" for the ID you want to use. 
+#Take the USK from the "Insert URI (KEEP THIS SECRET!)" field and replace the "USK" with "SSK" and strip off the "WebOfTrust/xx" stuff off the end.
+
+For example:
+
+----
+Look for something like this:
+{{{
+Insert URI (KEEP THIS SECRET!): USK@YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY,YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY,AQECAAE/WebOfTrust/12
+}}}
+
+And then copy it and edit it to look like this:
+{{{
+SSK@YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY,YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY,AQECAAE/
+}}}
+----
+
 ===FMS Configuration===
 
 By default the prototype uses the "biss.test000" FMS group.
@@ -67,3 +94,15 @@ http://127.0.0.1:18080/boards.htm
 Search for "biss.test000" and make sure "Save Received Messages" is checked.
 
 If you can't find the group, add it.
+
+===Freetalk Configuration===
+
+By default the prototype uses the "biss.test000" group. Since Freetalk requires a language code, "mul.biss.test000" can be used.
+
+To subscribe to this board, got to your Freetalk "Select Boards" page (http://127.0.0.1:8888/Freetalk/SelectBoards) and look for "mul.biss.test000" board and click the "Subscribe" button.
+
+If you can't find the group, add it.
+
+Also, Freetalk does not have the NNTP server enabled by default. You can do that in the Freetalk settings page (http://127.0.0.1:8888/Freetalk/Settings) by setting the "Enable NNTP server?" option to "true" in the "Global settings" section. 
+
+It claims that you have to restart your node for the settings to take effect, but you can just go to your Freenet plugins page and click the "Reload" button for the Freetalk plugin to make these settings take effect.
diff --git a/src/fniki/wiki/ArchiveManager.java b/src/fniki/wiki/ArchiveManager.java
--- a/src/fniki/wiki/ArchiveManager.java
+++ b/src/fniki/wiki/ArchiveManager.java
@@ -102,7 +102,7 @@ public class ArchiveManager {
     public String getParentUri() { return mParentUri; }
 
     public void setFmsId(String value) {
-        if (value.indexOf("@") != -1) {
+        if (value.indexOf("@") != -1 && value.indexOf(".freetalk") == -1) {
             throw new IllegalArgumentException("FMS Id Should only include the part before the '@'!");
         }
 
diff --git a/src/fniki/wiki/Configuration.java b/src/fniki/wiki/Configuration.java
--- a/src/fniki/wiki/Configuration.java
+++ b/src/fniki/wiki/Configuration.java
@@ -106,7 +106,7 @@ public final class Configuration {
             throw new ConfigurationException("The private SSK value must start with 'SSK@' " +
                                              "and end with ',AQECAAE/'.");
         }
-        if (mFmsId.indexOf("@") != -1) {
+        if (mFmsId.indexOf("@") != -1 && mFmsId.indexOf(".freetalk") == -1) {
             throw new ConfigurationException("FMS Id Should only include the part before the '@'.");
         }
         if (!mFproxyPrefix.startsWith("http") || !mFproxyPrefix.endsWith("/")) {