Move all handling of SED messages and notices into ctcp.c, re-enable SED notices
Actual encryped messages and notices are now printed directly from do_sed() / do_reply_sed(). Inline CTCP replacement is only done if the message cannot be decrypted (for the [ENCRYPTED MESSAGE] placeholder). This removes the need for the global flag 'sed' to alter the NOTICE and PRIVMSG handling. A side-effect of this is that SED PRIVMSGs now do not go through the usual PRIVMSG ignore and flood handling. This is acceptable because messages can only go through this path if the sender has actually been added as a SED peer with /ENCRYPT, and it still goes through the CTCP ignore and flood handling.
This commit is contained in:
@@ -613,13 +613,6 @@ static void p_privmsg(char *from, char **Args)
|
||||
else
|
||||
no_flood = check_flooding(from, flood_type, ptr, NULL);
|
||||
|
||||
if (sed == 1)
|
||||
{
|
||||
if (do_hook(ENCRYPTED_PRIVMSG_LIST,"%s %s %s",from, to, ptr))
|
||||
put_it("%s",convert_output_format(fget_string_var(FORMAT_ENCRYPTED_PRIVMSG_FSET), "%s %s %s %s %s", update_clock(GET_TIME), from, FromUserHost, to, ptr));
|
||||
sed = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int added_to_tab = 0;
|
||||
if (list_type == PUBLIC_LIST || list_type == PUBLIC_OTHER_LIST || list_type == PUBLIC_MSG_LIST)
|
||||
|
||||
Reference in New Issue
Block a user