My BoT project

Back to Module Development

Page: 1  
From User Message Body
Post #1033
Date: 11:03 pm, Apr 15 2010
Posts: 22

I just had to chock the occasional visitor by making this post.

I'm right now putting together an bot module to run for fun. Basically it will..

*let user register
And set personal password and so on so user can reclaim profile after hostmaskchange and so on.

*Keep and save userstats of what ever you want. (will be easy to add more) Right now it has flags, xp, title and so on.

*run a simple fightgame, basically rock, paper scissor but with some flavour.

*let admin assign flags to users. Both to determine bot-access and irc flags to set on join (and identified)

*also its using ini-files instead of sql.

:Update:21 april
restructured the whole userDB handling
added counter for failed logins and applying lock on profile after 3 failed attempts.
Also verifying(login) if host already is tied to a profile works.
Automatically track joins and nickchange and update DB accordingly.
No need for new login if not seen seen for 48h.

Basically I did a clean-up and rework of the awful code so far :P

:Update:28 April
A very basic trivia is up and running. (to get a peak on timer handling)
Tracked down a bug in the seen function that ended up registering empty users :P
By now I think the identifying and tracking part should be ok enough to continue.

Next: make an import function for the trivia that can handle the most common question.txt format. Also expand so every question gets its ID registered under a subject.

Last edited by MuNgLo at 9:19 pm, Apr 28 2010

Post #1036
Date: 10:28 pm, May 11 2010
Posts: 22

Just sat down and added some functionality to the trivia part. Now each question has a subject and an optional alternative answer.
Also answers don't care if caps are matching.
All which is working. next time ill store last couple of question, enable !ask cmd to support subject argument and hopefully make a generic import feature cus manually adding questions is a pain. :P

Oh and have a lookover so it all supports channelchange and so on. I know i cheated on a couple of places. After that i can put up some files without being totally embarrassed. :)

Post #1041
Date: 9:09 am, May 20 2010
Posts: 22

Well now I have basic triva working with 7000+ questions imported.

Not really my type of questions but hey.

Anyways ill upload the files just to show it actually is happening.

it should be pretty useless and code looks awful but it seems to work :P

I think I haven't missed any hardcoded channels or so.

Last edited by MuNgLo at 7:55 pm, May 27 2010

Post #1049
Date: 8:03 pm, May 27 2010
Posts: 22

Changed and was pleased enough with the format of questions. Now its about collecting some stats and deny repetition of questions.
Also I'll add support to !ask for subject and language as arguments.
Either way I found some stuff that would have broke the trivia except for my channel. Now it should even work to have separate trivas running in different channels. Hopefully.

Anyways here is the updated files.

Also if anyone wants to make some questions I sure would like to get my hands on them. :P Any subject and in any language.

Oh and the import function is broken in this version so don't use it. Need to update it to new structure of questions ini's.

Post #1097
Date: 6:22 pm, Feb 9 2012
Posts: 1

I do not know if you are still working on this or not as the last post is over 6 months old but I will ask anyway.

I am a newbie to PHP but want to learn how to write a trivia bot.
The link to your download is not working and nowhere in your posts do you say where the triva bot is running.

Could you please post the server #channel that it is on so I can see what it does?

I am not new to programming, just php.


Back to Module Development