Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Fri Jan 09, 2004 7:29 am Post subject:
Okay so here is the template that I have been working on.
Features (in what ever order i remember them):
auto reloads commands when they are updated.
uses folders like (admin, mod, and public) to set the permissions levels of commands.
commands have access to user settings and bot settings.
commands are sent only the part after the command char and the command name, so they never need to worry about what $msg contains.
the command char can be changed at setup and at any time there after, no code changes needed.
user settings and bot settings are saved after any commands are run. so you never need to open a text file agian.
commands can return either plain text to signifiy the response to send to the user. or a {Message => "repsonse here", Color => "red"} where you can also include font etc. just like in $self->sendmsg().
Brains (more on this below).
No globals to confuse anything. all variables are scoped correctly. violaters will be punished!
13 commands included to get you started. Many more not included with this download.
on first load the bot requests all needed info.
--debug when starting the bot puts it in debug mode (perl andromeda.pl --debug).
bot settings, and user settings are saved in files corresponding to the bots file name. allows many individual bots in the same directory with the same brains and commands but different settings.
its just easier i think
Brains After that rambling list of features I would like to explain brains a bit more. For those folk who don't realy care just know that brains can be added to your bot and chosen dynamicaly while the bot is running. Brains are what handle the text that doesn't match a command. So this would be like the blab module or those learning thought.pl's (i hope to get brains of both types up very soon!).
For those more inclined. A brain is a module, not a class, to preserve name space. It has a process command, and a description command.Process handles incoming text, and follows basicaly the exact same code as a regular command. Descrption is used to get a description for when the user is choosing brians.
Setup
Unzip these files to an empty directory (c:\bot\ would work just fine)
Install MSN.pm and latest SSL updates
run andromeda.pl (or whatever you rename it)
follow the on screen directions
Notice that NO editing of any files is required to get this bot running.
Good Luck and More Commands on the Way! _________________ Eric256
Proud previous owner and current admin of Bot-depot.com
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Fri Jan 09, 2004 3:02 pm Post subject:
You can put the MSN.pm anywhere perl will find it. Including the bots own folder _________________ Eric256
Proud previous owner and current admin of Bot-depot.com
hi eric i installed perl and all the updates and i started it up filled in th correct information and it ended and gave me an aplication that needs to be opened with sumin is that right or is there sumin wrong
and for you who are getting problems not finding msn.pm, all I can say is it worked for me while I was testing. So if it can't read it from the directory you have it you can always but it in your perls lib folder.
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Fri Jan 09, 2004 5:59 pm Post subject:
QUOTE(ultimo @ Jan 9 2004, 07:11 AM)
hi eric i installed perl and all the updates and i started it up filled in th correct information and it ended and gave me an aplication that needs to be opened with sumin is that right or is there sumin wrong
How in the world am i suppose to guess from that? Did it give you any errors? Did you try it with --debug to see if it gave you any errors? Did you run it from dos, or did you try double clicking the .pl file? These would all eb helpfull things. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Fri Jan 09, 2004 6:02 pm Post subject:
QUOTE(SyPhEr_ @ Jan 9 2004, 07:04 AM)
Doesn't look like it:
Quote:
Can't locate MSN.pm in @INC (@INC contains: F:/Perl/lib F:/Perl/site/lib .) at MSN/Bot.pm line 8.
Btw i've found a small bug in 'admins' ..
There you can see only the mods ({mods} -> {admins})
Thanks for the heads up on the admins part, lol, i changed all the text but not he code.
Where did you put MSN.pm? It wont work on the MSN folder it needs to be in the same folder as adromeda.pl or in your perl directories. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com
I don't quite get what's with the hash thing at the end of your commands... like with the name and description and stuff. What's it do and how's it work?
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Fri Jan 09, 2004 9:01 pm Post subject:
You type in the email addresses (the ones they use for msn) of your admins and mods seperated by commas. So if you want yourself to be an admin (recommended) then type your email address there. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com