{"action":"opened","issue":{"url":"https://api.github.com/repos/Elemental-IRCd/elemental-ircd/issues/190","labels_url":"https://api.github.com/repos/Elemental-IRCd/elemental-ircd/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/Elemental-IRCd/elemental-ircd/issues/190/comments","events_url":"https://api.github.com/repos/Elemental-IRCd/elemental-ircd/issues/190/events","html_url":"https://github.com/Elemental-IRCd/elemental-ircd/issues/190","id":111448964,"number":190,"title":"Cross-module symbol linking","user":{"login":"Xe","id":529003,"avatar_url":"https://avatars.githubusercontent.com/u/529003?v=3","gravatar_id":"","url":"https://api.github.com/users/Xe","html_url":"https://github.com/Xe","followers_url":"https://api.github.com/users/Xe/followers","following_url":"https://api.github.com/users/Xe/following{/other_user}","gists_url":"https://api.github.com/users/Xe/gists{/gist_id}","starred_url":"https://api.github.com/users/Xe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xe/subscriptions","organizations_url":"https://api.github.com/users/Xe/orgs","repos_url":"https://api.github.com/users/Xe/repos","events_url":"https://api.github.com/users/Xe/events{/privacy}","received_events_url":"https://api.github.com/users/Xe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Elemental-IRCd/elemental-ircd/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/Elemental-IRCd/elemental-ircd/labels/wishlist","name":"wishlist","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-14T17:30:15Z","updated_at":"2015-10-14T17:30:15Z","closed_at":null,"body":"This is gonna be a bit of a doozy.\r\n\r\nBasically what has come up as part of adding [ircv3](https://github.com/Elemental-IRCd/elemental-ircd/issues?utf8=%E2%9C%93&q=label%3Aircv3+) support among other things is that there is no real good way to have functions defined in one module be available to another module without putting them into the core. This has caused many issues when trying to clean up the core, things like `core/m_message.so` and other annoyingly large code files.\r\n\r\nA naiive way to implement this would be to abuse hooks in ways they should not be abused. However this is 2015 and we have better ways of doing things.\r\n\r\n- [ ] Create a generic `char*` -> `void*` hashmap and a vtable-like global for modules to introduce and remove functions they provide to other modules.\r\n- [ ] Create a way for modules to declare and require functions from other modules, failing module load if they cannot find the required symbols.\r\n- [ ] Begin to migrate features that would depend on this to the cross-module linking system.\r\n  - [ ] `MONITOR` #188 \r\n  - [ ] extban support\r\n\r\nExtra credit: \r\n- [ ] move operhash and the like to use the above generic hashmap"}}