]> granicus.if.org Git - ejabberd/commitdiff
* src/mod_register.erl: Revert support for io_lib newline, since
authorBadlop <badlop@process-one.net>
Fri, 11 Jul 2008 13:35:08 +0000 (13:35 +0000)
committerBadlop <badlop@process-one.net>
Fri, 11 Jul 2008 13:35:08 +0000 (13:35 +0000)
there is a standard character that representes newline (EJAB-501)
* doc/guide.tex: Update documentation to explain newline character
* doc/guide.html: Likewise
* src/ejabberd.cfg.example: Likewise

SVN Revision: 1436

ChangeLog
doc/guide.html
doc/guide.tex
src/ejabberd.cfg.example
src/mod_register.erl

index 8f59518ef5bc79913c8629d9c35a898db8e32c02..778913788d1c07919bfd0aea53c68bb619e3777e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-07-11  Badlop  <badlop@process-one.net>
+
+       * src/mod_register.erl: Revert support for io_lib newline, since
+       there is a standard character that representes newline (EJAB-501)
+       * doc/guide.tex: Update documentation to explain newline character
+       * doc/guide.html: Likewise
+       * src/ejabberd.cfg.example: Likewise
+
 2008-07-10  Badlop  <badlop@process-one.net>
 
        * src/configure.ac: Don't check for erlang header file (EJAB-232)
index b7f10839b6d613eab933ff115da1fb4e612fb215..d1841a4cbcd4d6dd2bc8079bc1a2c545e9761d89 100644 (file)
@@ -2363,7 +2363,7 @@ restrictions by default).
 </DD><DT CLASS="dt-description"><B><TT>welcome_message</TT></B></DT><DD CLASS="dd-description"> Set a welcome message that
 is sent to each newly registered account. The first string is the subject, and 
 the second string is the message body.
-In the body you can set a newline with the characters: <TT>~n</TT>.
+In the body you can set a newline with the characters: <CODE>\n</CODE>
 </DD><DT CLASS="dt-description"><B><TT>registration_watchers</TT></B></DT><DD CLASS="dd-description"> This option defines a 
 list of JIDs which will be notified each time a new account is registered.
 </DD><DT CLASS="dt-description"><B><TT>iqdisc</TT></B></DT><DD CLASS="dd-description"> This specifies 
@@ -2414,7 +2414,7 @@ Also define a registration timeout of one hour:
   ...
   {mod_register,
    [
-    {welcome_message, {"Welcome!", "Hi.~nWelcome to this Jabber server.~n Check http://www.jabber.org~n~nBye"}},
+    {welcome_message, {"Welcome!", "Hi.\nWelcome to this Jabber server.\n Check http://www.jabber.org\n\nBye"}},
     {registration_watchers, ["admin1@example.org", "boss@example.net"]}
    ]},
   ...
index 5a23a359acf2eb0977ecc0ab2c041ce4ccd4f15e..49e40400d3c9f66ea152f3b7ae2a1e106a8697bd 100644 (file)
@@ -3036,7 +3036,7 @@ Options:
 \titem{welcome\_message} \ind{options!welcomem}Set a welcome message that
   is sent to each newly registered account. The first string is the subject, and 
   the second string is the message body.
-  In the body you can set a newline with the characters: \term{\~\ n}.
+  In the body you can set a newline with the characters: \verb|\n|
 \titem{registration\_watchers} \ind{options!rwatchers}This option defines a 
   list of JIDs which will be notified each time a new account is registered.
 \iqdiscitem{In-Band Registration (\ns{jabber:iq:register})}
@@ -3095,7 +3095,7 @@ Also define a registration timeout of one hour:
   ...
   {mod_register,
    [
-    {welcome_message, {"Welcome!", "Hi.~nWelcome to this Jabber server.~n Check http://www.jabber.org~n~nBye"}},
+    {welcome_message, {"Welcome!", "Hi.\nWelcome to this Jabber server.\n Check http://www.jabber.org\n\nBye"}},
     {registration_watchers, ["admin1@example.org", "boss@example.net"]}
    ]},
   ...
index eb43bb3ca8a2e13d459e0f05653fc934b50a2b55..022a9ebc2be097c0874bef1d0c62eea15246c2c8 100644 (file)
                  %% a message with this subject and body.
                  %%
                  {welcome_message, {"Welcome!", 
-                                    "Hi.~nWelcome to this Jabber server."}},
+                                    "Hi.\nWelcome to this Jabber server."}},
 
                  %%
                  %% When a user registers, send a notification to 
index 21080c8a249d3667b3793d34a5180866e710da39..a936ea5e1a522df302063d09f7ee1c9857a4fc66 100644 (file)
@@ -241,13 +241,12 @@ send_welcome_message(JID) ->
        {"", ""} ->
            ok;
        {Subj, Body} ->
-           BodyFormatted = io_lib:format(Body, []),
            ejabberd_router:route(
              jlib:make_jid("", Host, ""),
              JID,
              {xmlelement, "message", [{"type", "normal"}],
               [{xmlelement, "subject", [], [{xmlcdata, Subj}]},
-               {xmlelement, "body", [], [{xmlcdata, BodyFormatted}]}]});
+               {xmlelement, "body", [], [{xmlcdata, Body}]}]});
        _ ->
            ok
     end.