MantisBT - opensim
View Issue Details
0007624opensim[GRID] Other Servicepublic2015-06-23 14:472015-08-18 09:34
QuillLittlefeather 
Diva 
normalfeaturealways
closedfixed 
AnyAnyAny
master (dev code) 
 
Standalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
BasicPhysics
Unknown
None
0007624: Added support to use <USERNAME> in Welcome Message along with MessageUrl to enable web script messages.
I have created a patch that changes the Welcome message.

MessageUrl is used to generate the welcome message from a web script.
If MessageUrl is enabled and set then this will override the WelcomeMessage option in the ini

Note changing the welcome message text in the ini or the webserver no longer requires you to reset opensim/robust. change between MessageUrl and WelcomeMessage requires restarting
    
If you add <USERNAME> anywhere anywhere in the welcome message in the ini or webserver it will replace it with the first and last name of the user logging in
    
Example loginservice config option MessageUrl = "http://www.andromedagrid.com/welcome.txt" [^]

I have tested this patch and it works perfectly.
login
png null.png (65,485) 2015-06-23 14:53
http://opensimulator.org/mantis/file_download.php?file_id=4270&type=bug
png

diff WelcomeMessage-fixed.diff (3,698) 2015-06-23 18:44
http://opensimulator.org/mantis/file_download.php?file_id=4276&type=bug
? LLLoginService.cs (49,594) 2015-06-23 19:29
http://opensimulator.org/mantis/file_download.php?file_id=4278&type=bug
Issue History
2015-06-23 14:47QuillLittlefeatherNew Issue
2015-06-23 14:47QuillLittlefeatherFile Added: WelcomeMessage.patch
2015-06-23 14:49QuillLittlefeatherTag Attached: login
2015-06-23 14:49QuillLittlefeatherStatusnew => patch included
2015-06-23 14:53DivaFile Added: null.png
2015-06-23 14:54DivaNote Added: 0028785
2015-06-23 14:56QuillLittlefeatherFile Deleted: WelcomeMessage.patch
2015-06-23 14:56QuillLittlefeatherFile Added: WelcomeMessage.patch
2015-06-23 14:57QuillLittlefeatherNote Added: 0028786
2015-06-23 15:00DivaNote Added: 0028787
2015-06-23 15:07QuillLittlefeatherNote Added: 0028788
2015-06-23 15:10QuillLittlefeatherFile Deleted: WelcomeMessage.patch
2015-06-23 15:10QuillLittlefeatherFile Added: mypatch.patch
2015-06-23 15:19QuillLittlefeatherFile Added: mypatch2.patch
2015-06-23 15:19QuillLittlefeatherFile Deleted: mypatch.patch
2015-06-23 15:19QuillLittlefeatherFile Deleted: mypatch2.patch
2015-06-23 15:20QuillLittlefeatherFile Added: WelcomeMessage.patch
2015-06-23 15:20QuillLittlefeatherNote Deleted: 0028788
2015-06-23 15:20QuillLittlefeatherNote Added: 0028789
2015-06-23 16:22DivaNote Added: 0028790
2015-06-23 18:39QuillLittlefeatherFile Added: WelcomeMessage-fixed.diff
2015-06-23 18:43QuillLittlefeatherFile Deleted: WelcomeMessage-fixed.diff
2015-06-23 18:44QuillLittlefeatherFile Added: WelcomeMessage-fixed.diff
2015-06-23 18:45QuillLittlefeatherNote Added: 0028791
2015-06-23 19:09QuillLittlefeatherFile Added: LLoginResponce.diff
2015-06-23 19:16QuillLittlefeatherNote Added: 0028792
2015-06-23 19:26QuillLittlefeatherFile Deleted: LLoginResponce.diff
2015-06-23 19:29QuillLittlefeatherFile Added: LLLoginService.cs
2015-06-23 19:29QuillLittlefeatherFile Deleted: WelcomeMessage.patch
2015-06-23 19:30QuillLittlefeatherStatuspatch included => patch feedback
2015-06-23 20:09QuillLittlefeatherNote Deleted: 0028792
2015-06-25 15:05DivaNote Added: 0028816
2015-06-26 16:03DivaStatuspatch feedback => resolved
2015-06-26 16:03DivaResolutionopen => fixed
2015-06-26 16:03DivaAssigned To => Diva
2015-08-18 09:34aiaustinNote Added: 0029209
2015-08-18 09:34aiaustinStatusresolved => closed

Notes
(0028785)
Diva   
2015-06-23 14:54   
I attached a picture showing what your patch looks like to me. Please resend.
(0028786)
QuillLittlefeather   
2015-06-23 14:57   
why is it doing this?
(0028787)
Diva   
2015-06-23 15:00   
It's being signaled as a binary file.

$ less WelcomeMessage.patch
"WelcomeMessage.patch" may be a binary file. See it anyway?
(0028789)
QuillLittlefeather   
2015-06-23 15:20   
Ok fixed the patch.
(0028790)
Diva   
2015-06-23 16:22   
Thanks, I have a few questions about this patch.

1 - Why this?

+ protected string lastName;
+ protected string firstName;

Where are these being initialized?

2 - Why this?

+ if (m_MessageUrl != String.Empty)
+ {
...
+ }
+ if (m_MessageUrl == String.Empty)
+ {
...
+ }

That should be an else. Also the body of the second one is a subset of the body of the first one. Please refactor.

3 - Indentation seems to be broken.

Please clean up the logic and the indentation, and resubmit. Also, make sure your patch includes your email and name. (this should happen if you have git properly configured before generating the patch)
(0028791)
QuillLittlefeather   
2015-06-23 18:45   
This should be good now I tested the patch and it apply correctly.
(0028816)
Diva   
2015-06-25 15:05   
[15:02] <cia-opensim> opensim: qlittlefeather * r4131fbea0c19 OpenSim/Services/LLLoginService (LLLoginService.cs):
[15:02] <cia-opensim> Changes to Welcome Message sent to clients.
[15:02] <cia-opensim>
[15:02] <cia-opensim> .gitignore | 1 +
[15:02] <cia-opensim> OpenSim/Services/LLLoginService/LLLoginService.cs | 32 +++++++++++++++--------
[15:02] <cia-opensim> 1 files changed, 22 insertions(+), 11 deletions(-)
[15:02] <cia-opensim> http://opensimulator.org/viewgit/?a=commit&p=opensim&h=4131fbea0c190fb5257803fd22758e8b06296df6 [^]
[15:02] <cia-opensim> opensim: diva * rc299414d508d OpenSim/Services/LLLoginService (LLLoginService.cs):
[15:02] <cia-opensim> Fixed bad-ish code in login patch
[15:02] <cia-opensim> http://opensimulator.org/viewgit/?a=commit&p= [^]
(0029209)
aiaustin   
2015-08-18 09:34   
Resolved issue marked as closed. Please open a new issue and refer to this one if problems arise.