From: <wel...@us...> - 2009-07-24 09:01:05
|
Revision: 4114 http://planeshift.svn.sourceforge.net/planeshift/?rev=4114&view=rev Author: weltall2 Date: 2009-07-24 09:00:55 +0000 (Fri, 24 Jul 2009) Log Message: ----------- private notes can be always be edited by the owner (even if without the permission). fix appending behaviour who says i can expect a new line at the end of the text? Modified Paths: -------------- trunk/src/server/guildmanager.cpp Modified: trunk/src/server/guildmanager.cpp =================================================================== --- trunk/src/server/guildmanager.cpp 2009-07-24 07:42:35 UTC (rev 4113) +++ trunk/src/server/guildmanager.cpp 2009-07-24 09:00:55 UTC (rev 4114) @@ -815,13 +815,18 @@ } else { - if ( !CheckClientRights(client, RIGHTS_EDIT_PRIVATE) ) + //allows to add private notes to others and to edit them for the member target of the + //notes (else he will get an infinitely filling entry which he can't clean when read) + if ( !CheckClientRights(client, RIGHTS_EDIT_PRIVATE) || client->GetPID() == char_id) { psserver->SendSystemError(client->GetClientNum(),"You do not have the rights to edit private notes."); return; } if (client->GetPID() != char_id)// if this is not my info - notes = member->private_notes + notes+ "\n";// append the notes to the end + { + if(member->private_notes.Length()) // append the notes to the end + notes = member->private_notes + (member->private_notes.Length() ? "\n" : "") + notes; + } } guild->SetMemberNotes(member, notes, isPublic); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |