GLOBAL bool Channel_AddInvite(CHANNEL *c, const char *mask, bool onlyonce, const char *who ) { struct list_head *h = Channel_GetListInvites(c); LogDebug("Adding \"%s\" to \"%s\" invite list", mask, Channel_Name(c)); return Lists_Add(h, mask, time(NULL), who, onlyonce); }
GLOBAL bool Channel_AddExcept(CHANNEL *c, const char *mask, const char *who ) { struct list_head *h = Channel_GetListExcepts(c); LogDebug("Adding \"%s\" to \"%s\" exception list", mask, Channel_Name(c)); return Lists_Add(h, mask, time(NULL), who, false); }
GLOBAL bool Channel_AddBan(CHANNEL *c, const char *mask ) { struct list_head *h = Channel_GetListBans(c); LogDebug("Adding \"%s\" to \"%s\" ban list", mask, Channel_Name(c)); return Lists_Add(h, mask, false, NULL); }
void CMsnProto::Lists_Populate(void) { HANDLE hContact = db_find_first(m_szModuleName); while (hContact) { HANDLE hNext = db_find_next(hContact, m_szModuleName); char szEmail[MSN_MAX_EMAIL_LEN] = ""; if (getStaticString(hContact, "wlid", szEmail, sizeof(szEmail))) getStaticString(hContact, "e-mail", szEmail, sizeof(szEmail)); if (szEmail[0]) { bool localList = getByte(hContact, "LocalList", 0) != 0; if (localList) Lists_Add(LIST_LL, NETID_MSN, szEmail, hContact); else Lists_Add(0, NETID_UNKNOWN, szEmail, hContact); } else CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0); hContact = hNext; } }
GLOBAL bool Class_AddMask(const int Class, const char *Mask, time_t ValidUntil, const char *Reason) { assert(Class < CLASS_COUNT); assert(Mask != NULL); assert(Reason != NULL); return Lists_Add(&My_Classes[Class], Lists_MakeMask(Mask), ValidUntil, Reason); }
void CMsnProto::Lists_Populate(void) { MCONTACT hContact = db_find_first(m_szModuleName); while (hContact) { MCONTACT hNext = db_find_next(hContact, m_szModuleName); char szEmail[MSN_MAX_EMAIL_LEN] = ""; if (db_get_static(hContact, m_szModuleName, "wlid", szEmail, sizeof(szEmail))) { if (db_get_static(hContact, m_szModuleName, "e-mail", szEmail, sizeof(szEmail)) == 0) setString(hContact, "wlid", szEmail); } if (szEmail[0]) { bool localList = getByte(hContact, "LocalList", 0) != 0; int netId = getWord(hContact, "netId", localList?NETID_MSN:NETID_UNKNOWN); if (localList) Lists_Add(LIST_LL, netId, szEmail, hContact); else Lists_Add(0, netId, szEmail, hContact); } else if (!isChatRoom(hContact)) CallService(MS_DB_CONTACT_DELETE, hContact, 0); hContact = hNext; } }