Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: OnPartChannel never binded  (Read 4617 times)

0 Members and 1 Guest are viewing this topic.

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 259
    • Réseau IRC francophone
OnPartChannel never binded
« on: June 17, 2024, 02:41:38 PM »

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:
Code: [Select]
/** 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):
Code: [Select]
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:
Quote
[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 ?

Sadie

  • Team
  • *
  • Offline Offline
  • Posts: 12
Re: OnPartChannel never binded
« Reply #1 on: June 18, 2024, 02:35:18 PM »

What version of Anope are you using?
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 259
    • Réseau IRC francophone
Re: OnPartChannel never binded
« Reply #2 on: June 18, 2024, 05:05:51 PM »

I'm with anope-2.0.15 working on Debian 12
Pages: [1]   Go Up