This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

mysql.mod and eggdrop 1.6.17

Old posts that have not been replied to for several years.
Locked
w
wize_one

mysql.mod and eggdrop 1.6.17

Post by wize_one »

has anyone been able to get it to work? we use that mod alot and cant upgreade our eggdrop without it.


nm i r dum
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

I just use the libmysqlclient. Include some stuff in your module Makefile and you can use the mysql functions that the mysql team made themselves. All functions are specified on www.mysql.com and no extra compiling is needed.

Code: Select all

# Makefile for src/mod/warmanager.mod/
# $Id: Makefile,v 1.11 2003/11/01 23:26:58 wcc Exp $

srcdir = .


doofus:
	@echo ""
	@echo "Let's try this from the right directory..."
	@echo ""
	@cd ../../../ && make

static: ../warmanager.o

modules: ../../../warmanager.$(MOD_EXT)

../warmanager.o:
	$(CC) $(CFLAGS) $(shell mysql_config --cflags) $(CPPFLAGS) -DMAKING_MODS -c $(srcdir)/warmanager.c
	@rm -f ../warmanager.o
	mv warmanager.o ../

../../../warmanager.$(MOD_EXT): ../warmanager.o
	$(LD) $(shell mysql_config --libs) -o ../../../warmanager.$(MOD_EXT) ../warmanager.o
	$(STRIP) ../../../warmanager.$(MOD_EXT)

depend:
	$(CC) $(CFLAGS) $(CPPFLAGS) -MM $(srcdir)/warmanager.c > .depend

clean:
	@rm -f .depend *.o *.$(MOD_EXT) *~
distclean: clean

#safety hash
../warmanager.o: ../warmanager.mod/warmanager.c ../../../src/mod/module.h \
 ../../../src/main.h ../../../src/lang.h ../../../src/eggdrop.h \
 ../../../src/flags.h ../../../src/proto.h ../../../lush.h \
 ../../../src/misc_file.h ../../../src/cmdt.h ../../../src/tclegg.h \
 ../../../src/tclhash.h ../../../src/chan.h ../../../src/users.h \
 ../../../src/compat/compat.h ../../../src/compat/inet_aton.h \
 ../../../src/compat/snprintf.h \
 ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
 ../../../src/compat/strcasecmp.h ../../../src/mod/modvals.h \
 ../../../src/tandem.h
d
drmann

Post by drmann »

Galadhrim wrote:I just use the libmysqlclient. Include some stuff in your module Makefile and you can use the mysql functions that the mysql team made themselves. All functions are specified on www.mysql.com and no extra compiling is needed.
can you tell me, what exactly has to be included in the makefile ?

i could not find out of your pasted code..

thanks !
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

he probably meant that you can link against native mysql library with appropriate Makefile, but forgot to mention you still have to implement tcl interfaces to those functions
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

Sorry for my ultra late response :S But you do have to reprogram the code that uses the mysql.mod commands.
demond wrote:he probably meant that you can link against native mysql library with appropriate Makefile, but forgot to mention you still have to implement tcl interfaces to those functions
This isn't the TCL forum so I'm assuming he's is talking about the module mysql.mod (is there a tcl version?). Personally I like to avoid TCL all the same.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Galadhrim wrote:Sorry for my ultra late response :S But you do have to reprogram the code that uses the mysql.mod commands.
demond wrote:he probably meant that you can link against native mysql library with appropriate Makefile, but forgot to mention you still have to implement tcl interfaces to those functions
This isn't the TCL forum so I'm assuming he's is talking about the module mysql.mod (is there a tcl version?). Personally I like to avoid TCL all the same.
so, what's mysql.mod? isn't it a module that provides Tcl inteface to mysql? and what your "warmanager" has to do with that? from the Makefile you pasted it's not clear how it's related to interfacing mysql - it's merely a generic module Makefile which links against mysql libs

paste warmanager.c and show how to "reprogram the code that uses mysql.mod commands"
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

Oh, didn't realise the mod did that. My warmanager is in C aswell so I guess the lad needs to reprogram it all to C in order to use the mysqlclient library... Wonder why a module doesn't work with a newer eggdrop version, unless the eggdrop team changed alot that the module won't compile...

Tried to get the mysql.mod but the website keeps whining about FireFox, which I don't want so meaning I cant download it lol... :shock:
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

There's nothing wrong with that module, I'm running it on 3 different systems, all running 1.6.17 or latest cvs.

http://barkerjr.net/irc/eggdrop/modules/
Locked