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
They were removed from Atheme, because people thought them to be more
secure than PLAIN + SSL, so ZNC shouldn't advertise them as secure.
I think that DH-AES and DH-BLOWFISH should say something about not being
widely supported, but I am not sure what. Newer Atheme doesn't support
it and with Anope they are optional unlike PLAIN and EXTERNAL that are
in their SASL core.
The old AttachUser() that sent JOIN without topic or names replies
would leave clients in incomplete/broken state. JoinUser() was doing
two things; depending on passed arguments it was either joining user
on the channel on IRC, or attaching clients (properly). Now JoinUser()
joins the user on IRC, and AttachUser() attaches as expected from the
method names.