Article Preview
Buy Now
| Print: | |
| PDF: |
Beyond the Limits
IRC Bots: Easy! Part II
Issue: 2.6 (July/August 2004)
Article Description: No description available.
Article Length (in bytes): 6,368
Starting Page Number: 46
RBD Number: 2623
Resource File(s): None
Related Link(s): None
Known Limitations: None
Excerpt of article text...
Last time we saw what was required to start building an IRC bot. We ended up with most pieces ready for the next show: building an RBot! This is what we are going to do this time. It will involve running RBScripts on the fly, supplementing some missing features in RBScript, and some standard house-keeping tasks like preferences and options.
The Pieces
Last time, we learned how to identify a message coming from one of the members of the channel. We now have to decide whether it is a command or just plain chatter, and, in the case of a command, decide whether it is a known command. At startup time, we loaded a couple of RBScripts into a dictionary. This made testing for a command rather easy:
If commands.HasKey(cmd) Then
...
End If
Now, I have evoked the problem of seeding the script. I have to expand on that a little bit, because of some limitations in RBScript. I have banged my head a little bit on this one, and thought I'd share with you the results, if not the pain...
Seeding
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|









