IRC Protocol Sucks! (Tuesday, September 28th, 2004) |
In between submitting job applications, I've been working on an IRC bot called frogbot. For those of you unfamiliar with Internet Relay Chat, it's basically a protocol for setting up online chatrooms that anyone can run on their own network of servers (as opposed to AIM or MSN chatrooms that run on AOL's or Microsoft's servers). IRC has been around for about fifteen years (yes, that's before you even knew what the Internet was), and clients are available for just about every computing platform (Windows, Mac, Linux, UNIX, PDAs, cell phones...). A bot is a program that logs in as if it were a real person, and can either pretend to be a human (an AI bot) or can simply respond to specific commands or do other useful things. For example, one of the things my bot does is watches for anyone to type “(sp?)” after a word, which is a common way to indicate that you're not sure whether you've spelled that word correctly. The bot takes the word in question, sends it to Google to get spelling suggestions, and displays the correct spelling in the chatroom (called a “channel” on IRC). So anyway, enough with the introductions. If any of that was new to you, the rest of this probably won't make much sense, so you may want to stop reading now, before you hurt yourself. The problem I've run into is, the IRC protocol is absolutely horrible and is totally not set up in a way that makes sense.
The latter two types of modes take an argument - either a nick (for
channel user modes, which aren't really officially called channel user
modes, that's just what I call them because I have to call them something),
or something else like a hostmask for modes like So the first problem is that we have one kind of message ( Most of the time, these modes are set one at a time, so this isn't nearly
so confusing, but they can be set all at once. Anyway, that's not too bad.
The obnoxious part is, which of those modes take an argument, and which don't?
There is no list of these, because each different IRC server has its own
modes that it supports in addition to the most common ones. So, if the
first argument is Why is all of this necessary just to parse a |
Themes |
Random Quote |
“Intuition: that strange instinct that tells a woman she is right,
whether she is or not.”
|