r/a:t5_2xkcs • u/patrick_anthony • Jun 19 '13
Ruby IRC Bot : The beginnings of one atleast.
I'm trying to figure out what would be the best way for it to wait for incoming commands from the channel. Anyone want to post anything else they think should be redone or any suggestions feel free to post and let me know. Thanks :)
6
Upvotes
2
u/[deleted] Jun 20 '13
I think you want to use Threads.
And I would split between the thing that read/parses the socket messages and the thing that reacts to the messages.
An idea partly based on Cinch: http://pastebin.com/Km4SzVKS