Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2   Go Down

Author Topic: zbot project  (Read 28526 times)

0 Members and 1 Guest are viewing this topic.

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
zbot project
« on: February 15, 2006, 03:44:29 AM »

Since drstein has been away for some time and hasn't had time to work on zbot, and people have asked for it to be updated I spent a few over the past few weeks improve it.

Changes
1. Split over many C files to make it easier to maintain and update
2. memory leaks cleaned up (mostly)
3. Code is updated to be stream lined.
4. Uses config file settings so it doesn't require edits to the code
5. works with 1.7.x (tested against current svn before this post)

I have setup space on my svn server for this project. You can grab the source from

svn co svn://svn.nomadirc.net/repos/zbot/trunk

place the zbot directory it downloads in src/modules and compile as normal

[Edited on 15-2-2006 by Trystan]
Logged
my God my tourniquet, return to me salvation

FiXato

  • Guest
(No subject)
« Reply #1 on: February 15, 2006, 04:36:14 AM »

Thanks a lot for the work Trystan :)
Nice work on splitting it over several modulair files!
I'll be testing it as soon as I find some time this week :)

By
Quote

4. Uses config file settings so it doesn't require edits to the code

you mean the zbot_config.c file?
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #2 on: February 15, 2006, 04:51:08 AM »

Can add the following lines to services.conf

zbotsqldb "module_bs_zbot"
zbotsqluser "Zbot"
zbotsqlpass "mypass"
zbotsqlhost "localhost"
zbotsqlport 3306
zbotsqlsock "/var/run/mysqld/mysqld.sock"
zbotUseChanPrivmsg
zbotUseNickPrivmsg

all the files make up one module.. but I had a hell of a time find stuff in all one file.. thats why I split it up over serval files so I could maintain it better
Logged
my God my tourniquet, return to me salvation

FiXato

  • Guest
(No subject)
« Reply #3 on: February 15, 2006, 05:27:26 AM »

Ahh, okay, that explains it!
Thanks a lot :)
I take it no database changes have to be done when updating from bs_zbot Version: 0.8.8 Author: DrStein?
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #4 on: February 15, 2006, 01:56:41 PM »

No database changes just fixed up the code
Logged
my God my tourniquet, return to me salvation

Gabriel Acevedo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 102
    • http://faltanideas.com/
(No subject)
« Reply #5 on: February 19, 2006, 08:15:46 PM »

You seem to have made a great work T, although I have not seen the code or tested the module yet I trust in your work.
I had made something but I guess I could help you out with your version or seomthing. We must to talk about.
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #6 on: February 20, 2006, 10:58:17 PM »

doc drop me a line, get you setup on svn so you can do some edits
Logged
my God my tourniquet, return to me salvation

thepitster

  • Guest
(No subject)
« Reply #7 on: February 22, 2006, 12:52:03 AM »

any chance of making a non-mysql version ?
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #8 on: February 22, 2006, 01:53:57 AM »

maybe in a bit.. I personally would find the non-sql one faster over all but would eat more memory..
Logged
my God my tourniquet, return to me salvation

thepitster

  • Guest
(No subject)
« Reply #9 on: March 09, 2006, 12:30:01 AM »

that would be sweet
Logged

SpaceDoG

  • Anope User
  • Offline Offline
  • Posts: 183
    • http://www.hypermutt.net
(No subject)
« Reply #10 on: March 10, 2006, 09:01:41 PM »

Exactly what is zbot? Also how do you shut off the channel notices?

[Edited on 10-3-2006 by SpaceDoG]
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #11 on: March 10, 2006, 10:20:01 PM »

zbot project is based off a project done by dengle to act as an info bot

!learn word meaning
?word
get meaning

In my project version its a config file option, read the readme
Logged
my God my tourniquet, return to me salvation

SpaceDoG

  • Anope User
  • Offline Offline
  • Posts: 183
    • http://www.hypermutt.net
(No subject)
« Reply #12 on: March 10, 2006, 10:22:01 PM »

I did and I commented out the this line zbotUseChanPrivmsg. After reloading the config file it still sends a channel message.
Logged

Gabriel Acevedo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 102
    • http://faltanideas.com/
(No subject)
« Reply #13 on: March 14, 2006, 12:54:34 PM »

Quote
Originally posted by thepitster
any chance of making a non-mysql version ?


I was working on that and have something done. As soon as I get in contact with T I will start some code.
Logged

thepitster

  • Guest
(No subject)
« Reply #14 on: March 29, 2006, 06:05:43 AM »

RIGHT ON!!! the doctor is IN!!!
Logged

Monk

  • Anope User
  • Offline Offline
  • Posts: 17
(No subject)
« Reply #15 on: April 02, 2006, 08:46:39 PM »

Hi all,

Trystan, we installed your Zbot (SVN rev 3) on Anope-1.7.14 (1025). Channel adding to the zbot works fine but whenever we try to add a term botserv replies with "This key is already defined." although the mysql terms table is empty. If I add a term to the database manually also the ?-command works for this term. Just the adding of new terms does not work. Hope you can help-

Regards,

Monk
Logged

myself

  • Guest
(No subject)
« Reply #16 on: April 03, 2006, 06:03:10 AM »

I have the same problem. ;(
Logged

paul

  • Guest
(No subject)
« Reply #17 on: May 08, 2006, 12:19:19 AM »

I had this same problem however i reverted to an earlier version I found and it works just fine on 1.7x  

The only down side i have now is the mysql connection drops so services has to restart around every 24 hours hehe.
Logged

DeMiNe0

  • Guest
(No subject)
« Reply #18 on: May 10, 2006, 03:44:37 AM »

I get the following error when i try to load zbot in anope:

Quote
[May 09 21:40:49 2006] Trying to load module [zbot]
[May 09 21:40:49 2006] [zbot.so] Loaded successfully
[May 09 21:40:49 2006] Error: zbotsqldb missing
[May 09 21:40:49 2006] Error: zbotsqluser missing
[May 09 21:40:49 2006] Error: zbotsqlpass missing
[May 09 21:40:49 2006] Error: zbotsqlhost missing
[May 09 21:40:49 2006] zbot sql port set default of 3306
[May 09 21:40:49 2006] zbot requested unload...
[May 09 21:40:49 2006] [zbot.so] module unloaded



I configured the zbot_config.c with:


Code: [Select]
Directive confvalues[][1] = {
        {{"digtox_irc", {{PARAM_STRING, 0, &zbot_db}}}},
        {{"digtox_irc", {{PARAM_STRING, 0, &zbot_user}}}},
        {{"REMOVED", {{PARAM_STRING, 0, &zbot_pass}}}},
        {{"localhost", {{PARAM_STRING, 0, &zbot_host}}}},
        {{"3306", {{PARAM_PORT, 0, &zbot_port}}}},
        {{"/tmp/mysql.sock", {{PARAM_STRING, 0, &zbot_sock}}}},
        {{"zbotUseChanPrivmsg", {{PARAM_SET, 0, &zbot_use_chan_privmsg}}}},
        {{"zbotUseNickPrivmsg", {{PARAM_SET, 0, &zbot_use_nick_privmsg}}}},
    };
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #19 on: May 10, 2006, 04:46:41 AM »

Do NOT modify the code.. you need to edit your config file.. not the code
Logged
my God my tourniquet, return to me salvation

DeMiNe0

  • Guest
(No subject)
« Reply #20 on: May 10, 2006, 02:34:27 PM »

Yup. I JUST noticed that. I got it working now, although now i'm having the same problem as "Monk" and "Myself":


Quote
Hi all,

Trystan, we installed your Zbot (SVN rev 3) on Anope-1.7.14 (1025). Channel adding to the zbot works fine but whenever we try to add a term botserv replies with "This key is already defined." although the mysql terms table is empty. If I add a term to the database manually also the ?-command works for this term. Just the adding of new terms does not work. Hope you can help-

Regards,

Monk



Quote
Originally posted by Trystan
Do NOT modify the code.. you need to edit your config file.. not the code
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #21 on: May 11, 2006, 07:14:33 PM »

I will look into this, I found a few other nasty little memory problems and lack of code checks, so will work on that and get rev4 ready
Logged
my God my tourniquet, return to me salvation

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #22 on: June 02, 2006, 12:46:34 AM »

Okay rev4 finally ready, tested it and its working all around again.

http://www.nomadinc.net/mymods/files/zbot-1.0.0-svn.tar.gz

rev5 will be a little time off as I want to work on some ideas for improvements, also looking for translators as the code is now globalized
Logged
my God my tourniquet, return to me salvation

Fault

  • Guest
(No subject)
« Reply #23 on: June 04, 2006, 07:59:50 PM »

zbot.c: In function `AnopeInit':
zbot.c:32: error: `ac' undeclared (first use in this function)
zbot.c:32: error: (Each undeclared identifier is reported only once
zbot.c:32: error: for each function it appears in.)
make[1]: *** [zbot.o] Error 1
make[1]: Leaving directory `/home/chris/anope-1.7.14/src/modules'
make: *** [modules] Error 2



all I get from zbot trying to make module.
Logged

Fault

  • Guest
(No subject)
« Reply #24 on: June 08, 2006, 08:48:37 PM »

4 days since ipostedfor help. Is this guy even supporting this anymore?
Logged
Pages: [1] 2   Go Up