diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-07 12:09:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-07 12:09:27 +0000 |
commit | 03a0b643b94d5aa7f9c129fe73eea314d099cf56 (patch) | |
tree | 221081ffe0602905765815d302b02d1f761cf100 /plugins/TabSRMM | |
parent | 0ac4b544972fb011e7c7c69e60a1d5d180ada0ac (diff) |
shameful end of the group processing zoo, part 1
git-svn-id: http://svn.miranda-ng.org/main/trunk@5994 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/chat/clist.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/plugins/TabSRMM/src/chat/clist.cpp b/plugins/TabSRMM/src/chat/clist.cpp index 644fdf2338..3afb600074 100644 --- a/plugins/TabSRMM/src/chat/clist.cpp +++ b/plugins/TabSRMM/src/chat/clist.cpp @@ -36,20 +36,6 @@ plugin, originally written by Jörgen Persson char *szChatIconString = "chaticon";
-static HANDLE Clist_GroupExists(TCHAR *tszGroup)
-{
- for (int i=0; ; i++) {
- char str[10];
- _itoa(i, str, 10);
- ptrT groupName( db_get_tsa(0, "CListGroups", str));
- if (groupName == NULL)
- return NULL;
-
- if (!_tcscmp(tszGroup, &groupName[1]) && lstrlen(tszGroup) == lstrlen(&groupName[1]))
- return HANDLE(i + 1);
- }
-}
-
HANDLE CList_AddRoom(const char* pszModule, const TCHAR* pszRoom, const TCHAR* pszDisplayName, int iType)
{
TCHAR pszGroup[50]; *pszGroup = '\0';
@@ -222,9 +208,8 @@ void CList_CreateGroup(TCHAR* group) return;
g_Settings.hGroup = Clist_GroupExists(group);
-
if (g_Settings.hGroup == 0) {
- g_Settings.hGroup = (HANDLE)CallService(MS_CLIST_GROUPCREATE, 0, (LPARAM)group);
+ g_Settings.hGroup = Clist_CreateGroup(0, group);
if (g_Settings.hGroup) {
CallService(MS_CLUI_GROUPADDED, (WPARAM)g_Settings.hGroup, 0);
|