1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
20 DLLManager::DLLManager(const char *fname)
22 if (!strstr(fname,".so"))
24 err = "This doesn't look like a module file to me...";
29 h = dlopen(fname, RTLD_NOW|RTLD_LOCAL|RTLD_NODELETE);
36 DLLManager::~DLLManager()
38 /* close the library */
48 Module* DLLManager::callInit()
54 initfn.vptr = dlsym(h, MODULE_INIT_STR);
61 return (*initfn.fptr)();