choupette.mod problems

Discussion of Eggdrop's code and module programming in C.
Post Reply
t
teecee
Voice
Posts: 4
Joined: Wed Apr 27, 2005 5:16 am

choupette.mod problems

Post by teecee »

Hey guys I have a few problems compiling this script. I have tried to contact the writer but he has yet to reply.
http://choupette.bloup.net/index_en.php
choupette.mod is a magnificent module for eggdrop, aiming at looking after an hlds server from irc, it allows rconing of the server from irc, and tracking of players by keeping their wonids in a mysql database.
Basicly I need to run multiple server commands via IRC. I have 10 + game servers and if I could get this module to work it would be great.

Maybe you pro's could give me a hand. Here is the error:

In file included from /usr/include/mysql/mysql.h:62,
from ../choupette.mod/sql_choup.c:25,
from ../choupette.mod/choupette.c:77:
/usr/include/mysql/my_list.h:32: error: syntax error before "int"
../choupette.mod/choupette.c: In function `aff_server':
../choupette.mod/choupette.c:1096: warning: unused variable `fp'
make[2]: *** [../choupette.o] Error 1
make[1]: *** [choupette.mod_so] Error 2
make: *** [modules] Error 2
make[2]: Leaving directory `/home/clock/eggy/eggdrop1.6.172/src/mod/choupette.mod'
make[1]: Leaving directory `/home/clock/eggy/eggdrop1.6.172/src/mod'
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

Looks like something in the mysql headers you have on your server, because it compiles on my server. The only warning i get is:

Code: Select all

../choupette.mod/choupette.c: In function `aff_server':
../choupette.mod/choupette.c:1096: warning: unused variable `fp'
I suggest you either download the mysql source and compile it and then install it (over an existing version). Or, if you have some cool updating system like with Debian, you update your system automatically. I have 4.0.24 on Debian, but you can download 4.1.11 from MySQL.com

If you are sure your mysql headers are ok and they work for other programs than try this:

Replace the Makefile code with this:

Code: Select all

# Makefile for src/mod/choupette.mod/
# $Id: Makefile,v 1.12 2000/09/12 15:26:54 fabian Exp $

srcdir = .

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

static: ../choupette.o

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

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

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

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

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

#safety hash
../choupette.o: .././choupette.mod/choupette.c ../../../src/mod/module.h \
 ../../../src/main.h ../../../config.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/compat/strftime.h \
 ../../../src/mod/modvals.h ../../../src/tandem.h \
 ../../../src/mod/transfer.mod/transfer.h \
 ../../../src/mod/channels.mod/channels.h ../choupette.mod/choupette.h \
 ../choupette.mod/hlds_query.c
Notice that I added: "$(shell mysql_config --cflags)" and "$(shell mysql_config --libs)" instead of the line "choup_libs = -lmysqlclient".

It'll work the same as the current Makefile, but the system will tell gcc where the headerfiles are, instead of that gcc assumes where they are.
t
teecee
Voice
Posts: 4
Joined: Wed Apr 27, 2005 5:16 am

Post by teecee »

Is it possible for you to send me the pre compiled mod or will that not work? I still can't seem to compile it
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

what is your system type? You can't really use any compiled module, it depends on the processor...
c
choupette
Voice
Posts: 1
Joined: Thu May 12, 2005 7:43 am
Location: east of france
Contact:

Re: choupette.mod problems

Post by choupette »

teecee wrote:Hey guys I have a few problems compiling this script. I have tried to contact the writer but he has yet to reply.
tee hee, you asked for a precompiled binary, I tend to ignore these requests, sorry =/
http://choupette.bloup.net/index_en.php
choupette.mod is a magnificent module for eggdrop, aiming at looking after an hlds server from irc, it allows rconing of the server from irc, and tracking of players by keeping their wonids in a mysql database.
Basicly I need to run multiple server commands via IRC. I have 10 + game servers and if I could get this module to work it would be great.
I had a lot of fun at the great time of servers abondance =)
but note that I took off wonids support in favor of steam_ids.
Maybe you pro's could give me a hand. Here is the error:

In file included from /usr/include/mysql/mysql.h:62,
from ../choupette.mod/sql_choup.c:25,
from ../choupette.mod/choupette.c:77:
/usr/include/mysql/my_list.h:32: error: syntax error before "int"
../choupette.mod/choupette.c: In function `aff_server':
../choupette.mod/choupette.c:1096: warning: unused variable `fp'
make[2]: *** [../choupette.o] Error 1
make[1]: *** [choupette.mod_so] Error 2
make: *** [modules] Error 2
make[2]: Leaving directory `/home/clock/eggy/eggdrop1.6.172/src/mod/choupette.mod'
make[1]: Leaving directory `/home/clock/eggy/eggdrop1.6.172/src/mod'
"FILE *fp;" is a stupid debug thing I forgot to remove from the release, nothing important.
your error is related to libmysqclient, did you try to upgrade your libmysqlclient package ?
Post Reply