Cinch 2.4.0 adds support for spoofing nicknames using the draft/relaymsg
capability and its RELAYMSG
command, introduced in ircv3/ircv3-specifications#417.
To do so, pass a nickname to Target#send
, Target#safe_send
, Target#action
or Target#safe_action
using the new optional as
keyword argument. The IRCd must advertise support for the draft/relaymsg
capability during capability negotiation, and, depending on its implementation and configuration, may require the bot to be an IRC operator and/or include a nickname separator character. Ergo is one IRCd that supports the current draft spec.
Target('#foo').safe_send('Hello world using RELAYMSG!', as: 'FooBot/Bar')
#=> RELAYMSG #foo FooBot/Bar :Hello world using RELAYMSG!