Irc astro code

This is code i have developed that will let you run an astrology and tarot robot on the irc. You need a bot that can use these c++ classes. All you have to do is send channel tells or querries to the function, processIrcChannel in the file interface.cpp and the code will handle the rest. You will need the dll from www.astro.com/swisseph linked to this project.

download: www.adammr.com/irc-astro-code-3-1-07.zip

the file birthdata.txt is included with some sample birthdates/times/locations. The format is name d m y h m latdeg latmin longdeg longmin.

Use a negative number for latdeg for south and a negative number for longdeg for west.

Chessclub.com astro code

the chessclub.com version of this code i developed is at http://www.adam16mr.org/chess.h it uses the same format for birthdata.txt as the irc version and the code is very similar. in fact the irc version is more advanced. You need to supply telnet code for both the icc and irc versions and there is a function that recveives the 'tell' data on icc or 'privmessage' data on irc. Be sure to download the dll on http://www.astro.com/swisseph/. If you can provide a telnet application that can send communications to the code and you have the dll you can run this code. questions contact adams161 at fastmail dot fm.

updated chessclub code 3-22-09

http://adammr.com/tarot-code-no-folder-3-22-09.zip. this contains the updated chess.h which now has the irc astro code functions ported in for more funtionality, and it also contains my gameclass which lets you run mastermind and connect4 on icc, and it has sample files of birthdata.txt and cities.txt so you can see their format. Total of 4 files not in a folder just lose in the zip.
The engine code for fourbot(c) my connect 4 program that interacts wtih that astro connect 4 game hosting is at http://www.adam16mr.org/four97.html. This is a functional connect 4 program with no interface, but contains all the engine code.

more info

In the chessclub.com code there are actually several point of entry functions to the astro code. you have: void processCHANELL(const char *p, const char *n)
there is also a process shout
and with the irc code its processIrcChannel

They all work the same in that they are fed two pieces of info. n is name or who sent it and p is the body of what they sent. the code will output the info to that name. On irc a name could be a login handle if it was sent via a querry or it could be a channel such as #horoscopes. the code will parse the body of the messge to see if its a command for example if the body is !planets it will register to go to the planets function and when it finishes doing the caclulations and formats the output it will send a response typially to the name ( and it will use the output method of sending for example a privatemessage on irc ) and the response will be in the same communication method that it got the input, i.e.if the message came in a channel tell it responds to the channel.

I think maybe with shouts on icc it may not use the name to figure out how to send the output, but it still tracks the name for exaxmple there is an ignore list or it could send a private message to that person if its max tells is exceeded. But it just knows that if it receives a shout to send a shout. There are some if statements at the bottom of each function that sends output like the planets function that you send a variable in, this is handled in proccesShout the setting up of what 'channel' it came in' that tell it should i shout this or send to a channel ( i think in chanels case the name is the channel number ) or should I send output directly to a person.

To use this code you just need a telnet bot that can connect to irc or chessclub.com and extract the communmications such as tells and privmessages and send them to these point of entry functions split into who sent it and what they said.

adams161 at fastmail ( hang on its not .com ) .fm (federation of micronesia)