Syzop wrote:Since the modules API is indeed highly underdocumented, you are best off with checking existing modules, how they do it.
Like, have a look at my
nopost module, or AntiMoon, or AntiRandom, etc...
Thank you, it was helpful.
By now I have another problem. I'm using the function place_host_ban() in function banflood_filter_msg() called in HOOKTYPE_USERMSG and HOOKTYPE_CHANMSG. And after the function banflood_filter_msg() returns the ircd-server crashes. Without place_host_ban() it works fine but didn't do what it expected to do
.
In comment to place_host_ban() is written: "(you should NOT read from 'sptr' after you got FLUSH_BUFFER!!!)". In my case there is other module(s) which use HOOKTYPE_USERMSG and HOOKTYPE_CHANMSG and I can't prevent them from reading from 'sptr' (at least I don't know how to do it).
What am I doing wrong?
Is there another solution how to ban a user in this case?
Thank you for answers!