|
|
|
|
|
by theshrike79
1513 days ago
|
|
"How long does it take me to build an IRC bot" was my test for trying new languages for a long time. You need to: - open a TCP connection to a specific port and keep it open
- check for PING/PONG messages asynchronously and automatically
- parse a bunch of kinda-sorta RFC defined strings and parse them to a structure of some sort
- and if you want to be fancy, you can start storing all kinds of stuff what happens on channels and keep a in-memory state of everything and (try to) keep it in sync
- on a pro-level you need to be able to have multiple TCP connections open to multiple servers (different irc networks) and not mix up channel #hackernews on network A with #hackernews on network B
|
|