Executing CTCP Commands in an IRC Box (Haskell)

I followed the Haskell wiki tutorial about I supplementing the IRC bot. and everything turned out fine. But as soon as I started expanding it, I realized that he would need to respond to CTCP requests from other users for commands such as version and ping. These commands work for the server, but not for the bot.

I read rfc for CTCP and for IRC clients , but they are not very useful. I did the following, but I do not think this post is:

write "PRIVMSG" (sender++"\001VERSION Haskellbot : v1.0 : GHCi\001") 

It only requested version information from the sender. So, how do I start implementing a return message for CTCP requests and other CTCP requests in general?

+4
source share
1 answer

Upon closer inspection of CTCP rfc, I solved it with:

 write "NOTICE" (sender++"\001VERSION Haskellbot : v1.0 : GHCi\001") 
+2
source

Source: https://habr.com/ru/post/1303321/


All Articles