mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
OnUserAction(), OnUserCTCP(), and OnUserNotice() don't separate private private and channel messages. A module could even redirect a message by modifying its target, so technically, if they were two distinct types, the type of a message could change on the way. The original reason for the separation was that at some point during CMessage development, GetChan() didn't exist in CPrivXxx, but only in CChanXxx message types. To achieve cleaner implementation, the getter was later promoted to CMessage and made return nullptr for non-channel specific messages. From this point of view, the separation is also no longer necessary since the CPrivXxx and CChanXxx types are API-wise identical with each other.