diff options
-rw-r--r-- | include/m_protosvc.h | 9 | ||||
-rw-r--r-- | plugins/MyDetails/src/data.cpp | 12 | ||||
-rw-r--r-- | plugins/MyDetails/src/data.h | 1 | ||||
-rw-r--r-- | plugins/MyDetails/src/services.cpp | 2 |
4 files changed, 1 insertions, 23 deletions
diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 4f6b990b28..5291a94759 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -545,15 +545,6 @@ struct PROTOFILERESUME #define PS_SETMYNICKNAME "/SetNickname"
///////////////////////////////////////////////////////////////////////////////
-// Get the max allowed length for the user nickname
-// Optional, default value is 1024
-// wParam = 0
-// lParam = 0
-// return = <= 0 for error, >0 the max length of the nick
-
-#define PS_GETMYNICKNAMEMAXLENGTH "/GetMyNicknameMaxLength"
-
-///////////////////////////////////////////////////////////////////////////////
// Get the unread email message count, optional
// wParam = 0
// lParam = 0
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index f6f59da5a1..2552a33a4f 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -253,18 +253,6 @@ void Protocol::GetAvatar() data_changed = true;
}
-
-int Protocol::GetNickMaxLength()
-{
- if (!ProtoServiceExists(name, PS_GETMYNICKNAMEMAXLENGTH))
- return MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE;
-
- int ret = CallProtoService(name, PS_GETMYNICKNAMEMAXLENGTH, 0, 0);
- if (ret <= 0)
- ret = MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE;
- return ret;
-}
-
wchar_t* Protocol::GetNick()
{
ptrW nick(Contact::GetInfo(CNF_DISPLAY, NULL, name));
diff --git a/plugins/MyDetails/src/data.h b/plugins/MyDetails/src/data.h index 627fd599ce..ece3d8d9fc 100644 --- a/plugins/MyDetails/src/data.h +++ b/plugins/MyDetails/src/data.h @@ -74,7 +74,6 @@ public: //void SetAvatar(const char *file_name, HBITMAP hBmp);
wchar_t *GetNick(); // Copy to cache and return a copy
- int GetNickMaxLength();
bool CanSetNick();
void SetNick(const wchar_t *nick);
diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp index 12f2392850..661dfda26b 100644 --- a/plugins/MyDetails/src/services.cpp +++ b/plugins/MyDetails/src/services.cpp @@ -78,7 +78,7 @@ public: }
m_edtNickname.SetText(proto->nickname);
- m_edtNickname.SendMsg(EM_LIMITTEXT, min(MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE, proto->GetNickMaxLength()), 0);
+ m_edtNickname.SendMsg(EM_LIMITTEXT, MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE, 0);
}
}
return true;
|