summaryrefslogtreecommitdiff
path: root/plugins/MyDetails/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-24 14:06:33 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-24 14:06:33 +0300
commit1de0331abb7082ebda12896cd52a509047ae5799 (patch)
treefb919f2a2a6d8027549ba986eaaeecb675a7e4a9 /plugins/MyDetails/src
parent06ca4d0df9ed5aadccacf4645cc56b702e738fbc (diff)
another burst of fantasy...
Diffstat (limited to 'plugins/MyDetails/src')
-rw-r--r--plugins/MyDetails/src/data.cpp12
-rw-r--r--plugins/MyDetails/src/data.h1
-rw-r--r--plugins/MyDetails/src/services.cpp2
3 files changed, 1 insertions, 14 deletions
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;