- ServerInstance->Modules->UseInterface("SQLutils");
-
- if (!ServerInstance->Modules->PublishFeature("SQL", this))
- {
- throw ModuleException("m_sqlite3: Unable to publish feature 'SQL'");
- }
-
- /* Create a socket on a random port. Let the tcp stack allocate us an available port */
-#ifdef IPV6
- listener = new SQLiteListener(this, ServerInstance, 0, "::1");
-#else
- listener = new SQLiteListener(this, ServerInstance, 0, "127.0.0.1");
-#endif
-
- if (listener->GetFd() == -1)
- {
- ServerInstance->Modules->DoneWithInterface("SQLutils");
- throw ModuleException("m_sqlite3: unable to create ITC pipe");
- }
- else
- {
- ServerInstance->Logs->Log("m_sqlite3", DEBUG, "SQLite: Interthread comms port is %d", listener->GetPort());
- }
-
- ReadConf();
-
- ServerInstance->Modules->PublishInterface("SQL", this);
- Implementation eventlist[] = { I_OnRequest, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);