Hi there,
I'm working on a log module, lot of things work but I'm unable to get the part.
Looking at the sources of modules.h:
/** Called when a user parts a channel
* @param u The user
* @param c The channel, may be NULL if the channel no longer exists
* @param channel The channel name
* @param msg The part reason
*/
virtual void OnPartChannel(User *u, Channel *c, const Anope::string &channel, const Anope::string &msg) { throw NotImplementedException(); }
So I made in my module (incomplete code, I just show the debug part):
void OnPartChannel(User *u, Channel *c, Anope::string &channel, Anope::string &msg) anope_override
{
Log(this) << "Got an action " << " part ";
}
void OnLeaveChannel(User *u, Channel *c) anope_override
{
Log(this) << "Got an action " << " leave ";
}
void OnPrePartChannel(User *u, Channel *c) anope_override
{
Log(this) << "Got an action " << " prepart ";
}
When I part & join a channel, this is what I've in my logfile:
[Jun 17 15:27:06 2024] M_LOGCHAN: Got an action prepart
[Jun 17 15:27:06 2024] M_LOGCHAN: Got an action leave
[Jun 17 15:27:18 2024] M_LOGCHAN: Got an action join
So, the part is never called, and it's the only one which has the part message.
Did I do something wrong or is it something else ?