problems compiling stats.mod on eggdrop1.7

Old posts that have not been replied to for several years.
Locked
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

problems compiling stats.mod on eggdrop1.7

Post by De Kus »

after gettnig along with the moved parts cmdt.h for botnetop it stuck at this:
make[2]: Entering directory `/home/De Kus/eggdrop1.7/src/mod/stats.mod'
gcc -pipe -mwin32 -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHA
VE_CONFIG_H -DSTATIC -DMAKING_MODS -c stats.c
In file included from stats.c:144:
user.c: In function `stats_autoadd':
user.c:58: error: too few arguments to function
make[2]: *** [../stats.o] Error 1
make[2]: Leaving directory `/home/De Kus/eggdrop1.7/src/mod/stats.mod'
make[1]: *** [stats.mod_o] Error 2
I compiled exact the same mod (its simply a copy from the folder of eggdrop1.6/...) without such an error.

Ah, I just figured out some more:
user.c:58: maskhost(s, host);
function maskhost is declared in misc.c in 1.7, but i can find only a _maskhost (void _maskhost(const char *s, char *nw, int host)) in the 1.6 version (but it must be somewhere, since it would have given an error about a non declared function :P).
This function needs 3 arguments (void maskhost(const char *s, char *new, int host)), LOL. what shall I add in user.c? ^^
Just adding "", seems to satisfy the compiler, but it gives me a warning that leaves the question to me, if it is really a good idea ^^.
make[2]: Entering directory `/home/De Kus/eggdrop1.7/src/mod/stats.mod'
gcc -pipe -mwin32 -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHA
VE_CONFIG_H -DSTATIC -DMAKING_MODS -c stats.c
In file included from stats.c:144:
user.c: In function `stats_autoadd':
user.c:58: warning: passing arg 3 of pointer to function makes integer from poin
ter without a cast
rm -f ../stats.o
mv stats.o ../
make[2]: Leaving directory `/home/De Kus/eggdrop1.7/src/mod/stats.mod'
OS: CYGWIN_NT-5.1 1.5.12(0.116/4/2)
stats version: 1.3.3.dev1 (edited MAKEFILE with .so -> .$(MOD_EXT) and added $(XLIBS) in $(LD) line of course)
last know success eggdrop version: latest 1.6 cvs nightly snapshot aka v1.6.18+asuka
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

Change it to:
maskhost(s, host, 1);
Que?
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

thx, at least it compiles without warnings in stats.mod now, but itll take some more time till I can test it live :D (DNS Modul doesn't want to compile, but looks more like a Cygwin enviroment problem, so doesn't belong to here ^^).

Update: couldnt test it yet, because bot crashes on load, bugzilla ticket submitted ^^.
Last edited by De Kus on Tue Dec 21, 2004 12:57 pm, edited 1 time in total.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

in 1.6, maskhost() is merely a macro:

Code: Select all

src/mod/module.h:#define maskhost(a,b) _maskhost((a),(b),1)
src/mod/module.h:#define maskban(a,b) _maskhost((a),(b),0)
now, the meaning of the third parameter is that when it's 1, the username is not prepended with '*', when it's 0, it is (however, if you have strict-host set to 1, it will always be prepended with '?'); of course, that takes place only if the username begins with [~+-^=]

you decide what suits you, 0 or 1
Locked