Introduction: Hacks #78-85
IRC protocol to get the most out of
your bot hacking. The protocol imposes restrictions on the lengths of
your messagesif you don't know about this,
you may make a bot that sends too much data in one go and run the
risk of truncating your valuable messages.To ascertain the authenticity of who you claim to be, a lot of IRC
servers try to contact your machine and ask it who you are. The
Ident Protocol is used to handle this
request, but Windows machines do not run an Ident server. Most
Windows IRC clients therefore create their own temporary Ident server
that runs while the client is connecting to an IRC server. In case
you need to add such a feature to one of your bots, one of the hacks
shows you how to create your own disposable Ident server.In Chapter 4, you were shown how to add color
and formatting to your IRC messages. When parsing these messages
within the brain of an IRC bot, the extra formatting characters may
cause problems. This chapter shows you how to remove colors and
formatting from IRC messages, thus alleviating the problem.The IRC protocol is text based, so the only way you can ensure total
privacy is to encrypt your messages before they leave your IRC client
and decrypt them when another client receives them. One hack shows
you how to create a proof-of-concept bot that encrypts messages using
a shared pass phrase or key. Only people who know the key will be
able to decrypt the messages.Netsplits occur frequently on IRC. A
netsplit
is a link breaking between a pair of servers that make up the IRC
network. If you're wondering how IRC servers cope
when a netsplit occurs, the TS Protocol gives you an interesting
insight into the problems and how they are solved.