Subject: Re: bug#37344: rcirc: nil gets interpreted as a nickname

From: Leo Liu <[email-masked]>
Date: Sat, 21 Sep 2019 13:21:04 +0800

On 2019-09-20 20:33 +0200, Lars Ingebrigtsen wrote:
>> Thanks. Does the following patch fix the issue?
>
> It was confirmed that it does, so I guess you should just apply the
> patch, but:

Will do.

>> -(defun rcirc-cmd-me (args &optional process target)
>> -  (rcirc-send-ctcp process target "ACTION" args))
>> +(defun rcirc-cmd-me (args process target)
>> +  (when target (rcirc-send-ctcp process target "ACTION" args)))
>
> Perhaps you should keep the &optional there to avoid changing the call
> signature?  Somebody else may have code that calls the function with
> that calling convention.

The signature is wrong from the start. Directly call them without
providing these optional (mandatory-in-disguise) arguments throws an
error, unlike commands defined by defun-rcirc-command which correctly
handle &optional arguments. I'll commit the patch as is if no
objections. Thanks for raising the issue.

Leo