[Miranda-Commits] SF.net SVN: miranda:[8088] trunk/miranda/protocols/JabberG/jabber_chat.cpp

View: New views
1 Messages — Rating Filter:   Alert me  

[Miranda-Commits] SF.net SVN: miranda:[8088] trunk/miranda/protocols/JabberG/jabber_chat.cpp

by vpavlychko :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Revision: 8088
          http://miranda.svn.sourceforge.net/miranda/?rev=8088&view=rev
Author:   vpavlychko
Date:     2008-07-21 09:58:32 +0000 (Mon, 21 Jul 2008)

Log Message:
-----------
Feature request #0000073: Nick in kick/ban reasons

Modified Paths:
--------------
    trunk/miranda/protocols/JabberG/jabber_chat.cpp

Modified: trunk/miranda/protocols/JabberG/jabber_chat.cpp
===================================================================
--- trunk/miranda/protocols/JabberG/jabber_chat.cpp 2008-07-21 01:16:03 UTC (rev 8087)
+++ trunk/miranda/protocols/JabberG/jabber_chat.cpp 2008-07-21 09:58:32 UTC (rev 8088)
@@ -1052,6 +1052,7 @@
  static DWORD dwLastBanKickTime = 0;
 
  TCHAR szBuffer[ 1024 ];
+ TCHAR szTitle[256];
 
  if ((gch->dwData >= CLISTMENUIDMIN) && (gch->dwData <= CLISTMENUIDMAX))
  {
@@ -1122,9 +1123,10 @@
  if ((GetTickCount() - dwLastBanKickTime) > BAN_KICK_INTERVAL)
  {
  dwLastBanKickTime = GetTickCount();
- mir_sntprintf( szBuffer, SIZEOF(szBuffer), _T("%s %s"), TranslateT( "Reason to kick" ), him->resourceName );
+ mir_sntprintf( szBuffer, SIZEOF(szBuffer), _T("%s: "), me->resourceName );
+ mir_sntprintf( szTitle, SIZEOF(szTitle), _T("%s %s"), TranslateT( "Reason to kick" ), him->resourceName );
  TCHAR *resourceName_copy = mir_tstrdup(him->resourceName); // copy resource name to prevent possible crash if user list rebuilds
- if ( ppro->EnterString(szBuffer, SIZEOF(szBuffer), NULL, JES_MULTINE, "gcReason_" ))
+ if ( ppro->EnterString(szBuffer, SIZEOF(szBuffer), szTitle, JES_MULTINE, "gcReason_" ))
  {
  XmlNodeIq iq( "set", NOID, item->jid );
  XmlNode* query = iq.addQuery( xmlnsAdmin );
@@ -1172,9 +1174,10 @@
  if ((GetTickCount() - dwLastBanKickTime) > BAN_KICK_INTERVAL)
  {
  dwLastBanKickTime = GetTickCount();
- mir_sntprintf( szBuffer, SIZEOF(szBuffer), _T("%s %s"), TranslateT( "Reason to ban" ), him->resourceName );
+ mir_sntprintf( szBuffer, SIZEOF(szBuffer), _T("%s: "), me->resourceName );
+ mir_sntprintf( szTitle, SIZEOF(szTitle), _T("%s %s"), TranslateT( "Reason to ban" ), him->resourceName );
  TCHAR *resourceName_copy = mir_tstrdup(him->resourceName); // copy resource name to prevent possible crash if user list rebuilds
- if ( ppro->EnterString(szBuffer, SIZEOF(szBuffer), NULL, JES_MULTINE, "gcReason_" ))
+ if ( ppro->EnterString(szBuffer, SIZEOF(szBuffer), szTitle, JES_MULTINE, "gcReason_" ))
  {
  XmlNodeIq iq( "set", NOID, item->jid );
  XmlNode* query = iq.addQuery( xmlnsAdmin );


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Miranda-Commits mailing list
Miranda-Commits@...
https://lists.sourceforge.net/lists/listinfo/miranda-commits
LightInTheBox - Buy quality products at wholesale price