diff -urN anope-1.6.3/Changes anope-1.6.4/Changes --- anope-1.6.3/Changes 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/Changes 2005-09-08 15:56:07.000000000 +0200 @@ -1,3 +1,11 @@ +Anope Version 1.6.4 +------------------- +Provided by Anope Dev. - 2005 +08/29 F Various compiler warnings when compiling with gcc4. [ #00] +08/29 F Memory leak when using mysql to save data. [ #00] +05/25 F Wrong option output with listnicks. [#380] +03/02 F /ns alist output. [#288] + Anope Version 1.6.3 ------------------- Provided by Anope Dev. - 2004 @@ -116,7 +124,7 @@ 2004/01/07 Fixed modunload crash with disabled services (0000370) 2004/01/17 Fixed missing HostServ on HelpServ help list (0000377) -Provided by GeniousDex +Provided by GeniusDex 2004/01/04 Updated nl.l (Dutch language File) 2004/01/11 Updated documentation @@ -134,7 +142,7 @@ Provided by DrStein 2003/12/12 Updated es.l (Spanish language File). -Provided by GeniousDex +Provided by GeniusDex 2003/12/12 Updated nl.l (Dutch language File). Provided by Stuff diff -urN anope-1.6.3/Changes.conf anope-1.6.4/Changes.conf --- anope-1.6.3/Changes.conf 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/Changes.conf 2005-09-08 15:56:07.000000000 +0200 @@ -1,3 +1,7 @@ +Anope Version 1.6.4 +-------------------- +No Changes. + Anope Version 1.6.3 -------------------- No Changes. diff -urN anope-1.6.3/Changes.lang anope-1.6.4/Changes.lang --- anope-1.6.3/Changes.lang 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/Changes.lang 2005-09-08 15:56:07.000000000 +0200 @@ -1,3 +1,7 @@ +Anope Version 1.6.4 +-------------------- +No Changes. + Anope Version 1.6.3 -------------------- diff -urN anope-1.6.3/chanserv.c anope-1.6.4/chanserv.c --- anope-1.6.3/chanserv.c 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/chanserv.c 2005-09-08 15:56:07.000000000 +0200 @@ -8,7 +8,7 @@ * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. * - * $Id: chanserv.c 422 2004-10-25 00:39:39Z trystan $ + * $Id: chanserv.c 863 2005-08-29 14:19:39Z geniusdex $ * */ @@ -766,7 +766,7 @@ SAFE(read_buffer(ci->last_topic_setter, f)); SAFE(read_int32(&tmp32, f)); ci->last_topic_time = tmp32; - SAFE(read_int32(&ci->flags, f)); + SAFE(read_uint32(&ci->flags, f)); #ifdef USE_ENCRYPTION if (!(ci->flags & (CI_ENCRYPTEDPW | CI_VERBOTEN))) { if (debug) @@ -941,15 +941,15 @@ } if (ver >= 10) { - SAFE(read_int32(&ci->mlock_on, f)); - SAFE(read_int32(&ci->mlock_off, f)); + SAFE(read_uint32(&ci->mlock_on, f)); + SAFE(read_uint32(&ci->mlock_off, f)); } else { SAFE(read_int16(&tmp16, f)); ci->mlock_on = tmp16; SAFE(read_int16(&tmp16, f)); ci->mlock_off = tmp16; } - SAFE(read_int32(&ci->mlock_limit, f)); + SAFE(read_uint32(&ci->mlock_limit, f)); SAFE(read_string(&ci->mlock_key, f)); if (ver >= 10) { #ifdef HAS_FMODE @@ -975,7 +975,7 @@ memos = scalloc(sizeof(Memo) * ci->memos.memocount, 1); ci->memos.memos = memos; for (j = 0; j < ci->memos.memocount; j++, memos++) { - SAFE(read_int32(&memos->number, f)); + SAFE(read_uint32(&memos->number, f)); SAFE(read_int16(&memos->flags, f)); SAFE(read_int32(&tmp32, f)); memos->time = tmp32; @@ -2514,10 +2514,7 @@ access = &ci->access[num]; - if (!access->in_use) - return 0; - - if (access->nc == na->nc) { + if (access->nc && access->nc == na->nc && access->in_use) { return access->level; } diff -urN anope-1.6.3/datafiles.c anope-1.6.4/datafiles.c --- anope-1.6.3/datafiles.c 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/datafiles.c 2005-09-08 15:56:07.000000000 +0200 @@ -8,7 +8,7 @@ * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. * - * $Id: datafiles.c 5 2004-03-29 01:29:50Z dane $ + * $Id: datafiles.c 863 2005-08-29 14:19:39Z geniusdex $ * */ @@ -302,7 +302,19 @@ */ -int read_int16(uint16 * ret, dbFILE * f) +int read_int16(int16 * ret, dbFILE * f) +{ + int c1, c2; + + c1 = fgetc(f->fp); + c2 = fgetc(f->fp); + if (c1 == EOF || c2 == EOF) + return -1; + *ret = c1 << 8 | c2; + return 0; +} + +int read_uint16(uint16 * ret, dbFILE * f) { int c1, c2; @@ -323,7 +335,21 @@ } -int read_int32(uint32 * ret, dbFILE * f) +int read_int32(int32 * ret, dbFILE * f) +{ + int c1, c2, c3, c4; + + c1 = fgetc(f->fp); + c2 = fgetc(f->fp); + c3 = fgetc(f->fp); + c4 = fgetc(f->fp); + if (c1 == EOF || c2 == EOF || c3 == EOF || c4 == EOF) + return -1; + *ret = c1 << 24 | c2 << 16 | c3 << 8 | c4; + return 0; +} + +int read_uint32(uint32 * ret, dbFILE * f) { int c1, c2, c3, c4; @@ -375,7 +401,7 @@ char *s; uint16 len; - if (read_int16(&len, f) < 0) + if (read_uint16(&len, f) < 0) return -1; if (len == 0) { *ret = NULL; diff -urN anope-1.6.3/datafiles.h anope-1.6.4/datafiles.h --- anope-1.6.3/datafiles.h 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/datafiles.h 2005-09-08 15:56:07.000000000 +0200 @@ -8,7 +8,7 @@ * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. * - * $Id: datafiles.h 1 2004-03-28 21:59:56Z svn $ + * $Id: datafiles.h 863 2005-08-29 14:19:39Z geniusdex $ * */ @@ -44,9 +44,11 @@ #define write_db(f,buf,len) (fwrite((buf),1,(len),(f)->fp)) #define getc_db(f) (fgetc((f)->fp)) -E int read_int16(uint16 *ret, dbFILE *f); +E int read_int16(int16 *ret, dbFILE *f); +E int read_uint16(uint16 *ret, dbFILE *f); E int write_int16(uint16 val, dbFILE *f); -E int read_int32(uint32 *ret, dbFILE *f); +E int read_int32(int32 *ret, dbFILE *f); +E int read_uint32(uint32 *ret, dbFILE *f); E int write_int32(uint32 val, dbFILE *f); E int read_ptr(void **ret, dbFILE *f); E int write_ptr(const void *ptr, dbFILE *f); diff -urN anope-1.6.3/lang/langcomp.c anope-1.6.4/lang/langcomp.c --- anope-1.6.3/lang/langcomp.c 2005-09-08 15:55:33.000000000 +0200 +++ anope-1.6.4/lang/langcomp.c 2005-09-08 15:56:01.000000000 +0200 @@ -146,7 +146,7 @@ int main(int ac, char **av) { - unsigned char *filename = NULL, *s; + char *filename = NULL, *s; char langname[254], outfile[256]; FILE *in, *out; int warn = 0; diff -urN anope-1.6.3/mysql.c anope-1.6.4/mysql.c --- anope-1.6.3/mysql.c 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/mysql.c 2005-09-08 15:56:07.000000000 +0200 @@ -8,7 +8,7 @@ * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. * - * $Id: mysql.c 387 2004-10-10 15:21:08Z geniusdex $ + * $Id: mysql.c 863 2005-08-29 14:19:39Z geniusdex $ * */ #include "services.h" @@ -391,10 +391,16 @@ *cbadwords, *efounderpass; ciname = db_mysql_quote(ci->name); - cifoundernick = - ci->founder ? db_mysql_quote(ci->founder->display) : ""; - cisuccessornick = - ci->successor ? db_mysql_quote(ci->successor->display) : ""; + if (ci->founder) { + cifoundernick = db_mysql_quote(ci->founder->display); + } else { + cifoundernick = db_mysql_quote(""); + } + if (ci->successor) { + cisuccessornick = db_mysql_quote(ci->successor->display); + } else { + cisuccessornick = db_mysql_quote(""); + } cifounderpass = db_mysql_quote(ci->founderpass); cidesc = db_mysql_quote(ci->desc); ciurl = db_mysql_quote(ci->url); @@ -415,7 +421,11 @@ cimlock_redirect = NULL; #endif cientrymsg = db_mysql_quote(ci->entry_message); - cibotnick = ci->bi ? db_mysql_quote(ci->bi->nick) : ""; + if (ci->bi) { + cibotnick = db_mysql_quote(ci->bi->nick); + } else { + cibotnick = db_mysql_quote(""); + } efounderpass = db_mysql_secure(cifounderpass); free(cifounderpass); @@ -607,26 +617,21 @@ } free(ciname); - if (!(ci->flags & CI_VERBOTEN)) { - free(cifoundernick); - if (strlen(cisuccessornick) > 0) - free(cisuccessornick); - free(efounderpass); - free(cidesc); - free(ciurl); - free(ciemail); - free(cilasttopic); - free(cilasttopicsetter); - free(cimlock_key); - free(cimlock_flood); - free(cimlock_redirect); - free(cientrymsg); - if (ci->bi) - free(cibotnick); - } else { - free(ciforbidby); - free(ciforbidreason); - } + free(cifoundernick); + free(cisuccessornick); + free(efounderpass); + free(cidesc); + free(ciurl); + free(ciemail); + free(cilasttopic); + free(cilasttopicsetter); + free(cimlock_key); + free(cimlock_flood); + free(cimlock_redirect); + free(cientrymsg); + free(cibotnick); + free(ciforbidby); + free(ciforbidreason); return; } diff -urN anope-1.6.3/nickserv.c anope-1.6.4/nickserv.c --- anope-1.6.3/nickserv.c 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/nickserv.c 2005-09-08 15:56:07.000000000 +0200 @@ -8,7 +8,7 @@ * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. * - * $Id: nickserv.c 419 2004-10-23 17:59:28Z trystan $ + * $Id: nickserv.c 863 2005-08-29 14:19:39Z geniusdex $ * */ @@ -205,17 +205,17 @@ need_comma = 1; } if (na->nc->flags & NI_SECURE) { - end += snprintf(buf, sizeof(buf) - (end - buf), "%sSecurity", + end += snprintf(end, sizeof(buf) - (end - buf), "%sSecurity", need_comma ? commastr : ""); need_comma = 1; } if (na->nc->flags & NI_PRIVATE) { - end += snprintf(buf, sizeof(buf) - (end - buf), "%sPrivate", + end += snprintf(end, sizeof(buf) - (end - buf), "%sPrivate", need_comma ? commastr : ""); need_comma = 1; } if (na->status & NS_NO_EXPIRE) { - end += snprintf(buf, sizeof(buf) - (end - buf), "%sNo Expire", + end += snprintf(end, sizeof(buf) - (end - buf), "%sNo Expire", need_comma ? commastr : ""); need_comma = 1; } @@ -405,7 +405,7 @@ SAFE(read_string(&url, f)); SAFE(read_string(&email, f)); if (ver >= 10) - SAFE(read_int32(&icq, f)); + SAFE(read_uint32(&icq, f)); else icq = 0; if (ver >= 9) @@ -552,7 +552,7 @@ nc->memos.memos = memos; for (j = 0; j < nc->memos.memocount; j++, memos++) { - SAFE(read_int32(&memos->number, f)); + SAFE(read_uint32(&memos->number, f)); SAFE(read_int16(&memos->flags, f)); SAFE(read_int32(&tmp32, f)); memos->time = tmp32; @@ -564,11 +564,11 @@ /* We read the channel count, but don't take care of it. load_cs_dbase will regenerate it correctly. */ SAFE(read_int16(&tmp16, f)); - SAFE(read_int16(&nc->channelmax, f)); + SAFE(read_uint16(&nc->channelmax, f)); if (ver == 5) nc->channelmax = CSMaxReg; - SAFE(read_int16(&nc->language, f)); + SAFE(read_uint16(&nc->language, f)); if (ver >= 11 && ver < 13) { char *s; @@ -699,7 +699,7 @@ SAFE(read_string(&nc->email, f)); SAFE(read_string(&nc->greet, f)); - SAFE(read_int32(&nc->icq, f)); + SAFE(read_uint32(&nc->icq, f)); SAFE(read_string(&nc->url, f)); SAFE(read_int32(&nc->flags, f)); @@ -724,7 +724,7 @@ s_NickServ, nc->display); } #endif - SAFE(read_int16(&nc->language, f)); + SAFE(read_uint16(&nc->language, f)); /* Add services opers and admins to the appropriate list, but only if the database version is more than 10. */ @@ -749,7 +749,7 @@ memos = scalloc(sizeof(Memo) * nc->memos.memocount, 1); nc->memos.memos = memos; for (j = 0; j < nc->memos.memocount; j++, memos++) { - SAFE(read_int32(&memos->number, f)); + SAFE(read_uint32(&memos->number, f)); SAFE(read_int16(&memos->flags, f)); SAFE(read_int32(&tmp32, f)); memos->time = tmp32; @@ -758,7 +758,7 @@ } } - SAFE(read_int16(&nc->channelcount, f)); + SAFE(read_uint16(&nc->channelcount, f)); SAFE(read_int16(&tmp16, f)); nc->channelmax = CSMaxReg; diff -urN anope-1.6.3/proxy.c anope-1.6.4/proxy.c --- anope-1.6.3/proxy.c 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/proxy.c 2005-09-08 15:56:07.000000000 +0200 @@ -8,7 +8,7 @@ * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. * - * $Id: proxy.c 5 2004-03-29 01:29:50Z dane $ + * $Id: proxy.c 863 2005-08-29 14:19:39Z geniusdex $ * */ @@ -261,7 +261,8 @@ fd_set fds; struct timeval tv; - int error, errlen; + int error; + socklen_t errlen; if ((s = socket(PF_INET, SOCK_STREAM, 0)) == -1) return -1; diff -urN anope-1.6.3/version.log anope-1.6.4/version.log --- anope-1.6.3/version.log 2005-09-08 15:55:39.000000000 +0200 +++ anope-1.6.4/version.log 2005-09-08 15:56:07.000000000 +0200 @@ -3,16 +3,44 @@ # # Please read COPYING and README for furhter details. # -# $Id: version.log 427 2004-10-29 13:57:50Z dane $ +# $Id: version.log 874 2005-09-08 13:49:40Z geniusdex $ VERSION_MAJOR="1" VERSION_MINOR="6" -VERSION_PATCH="3" -VERSION_BUILD="427" +VERSION_PATCH="4" +VERSION_BUILD="874" VERSION_EXTRA="" # $Log$ # +# BUILD : 1.6.4 (874) +# BUGS : +# NOTES : Anope 1.6.4 release +# +# BUILD : 1.6.3 (867) +# BUGS : +# NOTES : Fixed spelling of my name in Changes +# +# BUILD : 1.6.3 (863) +# BUGS : +# NOTES : Fixed various warnings when compiling with gcc4 +# +# BUILD : 1.6.3 (859) +# BUGS : +# NOTES : Small fix in Changes which stated 2004 instead of 2005 +# +# BUILD : 1.6.3 (812) +# BUGS : 380 +# NOTES : Fixed a bug with listnicks option displaying +# +# BUILD : 1.6.3 (597) +# BUGS : N/A +# NOTES : Fixed typo :/ +# +# BUILD : 1.6.3 (591) +# BUGS : 288 +# NOTES : Fixed /ns alist output. +# # BUILD : 1.6.3 (427) # NOTES : Anope 1.6.3 Release #