For start you omittied the #
at the start of the room name. And you should be operating in a room that you are in.
An outbound whisper has the format:
PRIVMSG #roomnane :.w targetuser words that are to be sent
I prefer the .
notification of chat commands but both .w
and /w
are valid, some IRC Lib’s are known to grab the /
and reprocess it as a server command, but you seem to be lib less, so this shouldn’t be an issue.
You mileage will vary with Whispers. The older post talk about the semantics.
But the newer posts talk about deliverbility problems:
May: Whisper doesn't work. Please
June: An update for the delayed bot verification request process - #25 by Dist
June: Send whispers with GMS2 - #7
June: How to reply to whispers with bot - #5
They are just not desgined to be used by bots and there are generally better ways to work privately with users, third party portals, extensions etc.
Whispers have deliverability problems for bots. And should be avoided if you want reliabilty.
Generally speaking you will have better luck repling to a whisper as this should of open a conversation whisper. And as per the old freenode rule: A bot should reply in the same medium as it was triggered.
So if it was triggered by chat it replies in chat, if it was triggered in a whisper it replies via whisper.