I did a bot to connect to irc for punches and giggles, and I did it in response to different things, but I would like it to respond with the CTCP ACTION command, this is usually known to the user as / me is used to play roles or display actions.
according to this great ctcp webpage http://www.irchelp.org/irchelp/rfc/ctcpspec.html ?
format \ 001ACTION barfs on the floor. \ 001
so I installed my bot to answer
writer.WriteLine("PRIVMSG " + CHANNEL + " \001ACTION " + message + "\001");
I will print this result on my console as well, all it answers is "There is no text to send"
who doesn't really know what it means to tell me, I guess the escape character breaks the line early when \ 0 completely ignores the other 01 after it, so I have a bot print on the console, whatever it reads and I type / dances me and I read in the console
PRIVMSG CHANNEL: (odd character) ACTION message (odd character) I donβt know what the odd characters are, but to me they look like emoticons ... after talking with several people, I understand that the format is correct, but \ 001 may differ for different languages
so I see what \ 001 can mean for C # and I fin \ x01 and \ 0011, and \ 0011 does nothing, and \ x01 also returns the same answer to me .... "There is no text to send"
I print "PRIVMSG" + CHANNEL + "\ x01ACTION" + message + "\ x01" to my console, and I \ x01 is replaced by the same emoticon face that it shows when I type / dances me and the bot prints that what he reads on the console ...
my code is just for him
if (type == MessageType.ActionMessage) { writer.WriteLine("PRIVMSG " + CHANNEL + " \x01ACTION " + message + "\x01"); Console.WriteLine("PRIVMSG " + CHANNEL + " \x01ACTION " + message + "\x01"); writer.Flush(); }
the recording object is not null, and writing it to my console means that I see what is happening
The final question is whether this is correct, and if that is not what is the right way to show the action using the C # client on the CTCP client protocol