When joining a channel, OnMode() (via SetModes()) was called with pOpNick ==
NULL. This bad pointer was turned into a reference and given to modules.
This bug exists since 2008 when the OnMode() module call was added. It wasn't
noticed before because apparently no module used this CNick argument before.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Buflines need to know which part of text to wrap with the timestamp. The
second parameter to `AddLine` (and shorthands) is that text, which after
wrapping is added as the `text` parameter to `NamedFormat`.
Timestamps are formatted at the moment buffers are flushed to the
client. The client parameter to `GetLine` provides access to the User
and the new server-time capability.
This is in preparation of adding more attributes to a CBufLine. Going
forward, at least savebuf will need access to all of these to properly
serialize buffers.
Basically, instead of relying on `GetLine()` to return `false`, the
caller is now expected to check bounds himself using `Size()`.