The User Deleted output for a success does not match the rest of the output formats for other commands and needs to match the same 'standard' for outputs.
This reverts commits 27d78795a7 and
f27109f1b4. It was decided that the
functionality is provided by a separate module instead, to avoid
unnecessarily bloating the core.
CModules::LoadModule() sets the module type _after_ construction.
The constructor cannot therefore do actions based on the module
type. Move loading to OnLoad().
IMHO these placeholder names are the most obvious choice and easiest
to remember. For old-timers and to retain compatibility, $me is still
supported. For the advanced users there's also $net for convenience.
Current clearbufferonmsg clears buffer on some user actions (OnMsg,
OnCTCP, OnAction, OnNotice, OnPart, OnTopic). And user can't change
this fixed built-in rule.
This built-in rule to clear buffer is too inflexible. So, this
extends clearbufferonmsg to satisfy more users on different
situations.
Add args to clearbufferonmsg to allow that user choose callbacks to clear.
msg - clear on OnUserMsg callback
ctcp - clear on OnUserCTCP callback
action - clear on OnUserAction callback
notice - clear on OnUserNotice callback
part - clear on OnUserPart callback
topic - clear on OnUserTopic callback
quit - clear on OnUserQuit callback
all - set all options above
By default, clear on msg, ctcp, action, notice, part, topic. (except
quit for backward compatibility).
Example usage in znc.conf:
[set all options]
LoadModule = clearbufferonmsg all
[on quit and part]
LoadModule = clearbufferonmsg !all quit part
Add OnUserQuit() callback. On smartphone, user doesn't want to see
same lines repeatedly. But, meanwhile, user doesn't want to miss lines
when connection was lost.
To do it, this uses OnUserQuit() callback. With this callback,
clearbufferonmsg can clear buffer if user quited client explicitly.
And when connection was lost, buffer is still not cleared.
The old internal storage format was:
::__:SAVEBUFF:__::<buffer lines>
The new storage format for channels:
::__:CHANBUFF:__::<buffer name>
<buffer lines>
The new storage format for queries:
::__:QUERYBUFF:__::<buffer name>
<buffer lines>
See #802 for details why the storage format had to be changed. Reading
the old storage format is still supported so old saved buffers load as
appropriate.
This patch ignores the value of JoinAfterCloaked unless UseCloakedHost
is set. Without this patch, it's possible to enable JoinAfterCloaked,
but not have UseCloakedHost enabled, which means that no channel will
ever be joined automatically by ZNC.
Fixes: #602