From razvan.savu at gmail.com Sat Feb 2 05:46:00 2008 From: razvan.savu at gmail.com (Razvan Savu) Date: Sat, 2 Feb 2008 15:46:00 +0200 Subject: [IRCServices Coding] Panic 11 Segv Fault error Message-ID: Hello. I'm receiving this error sometimes in ircservices.log. PANIC! signal 11 (no buffer) [Feb 02 15:30:09 2008] Services terminating: Segmentation fault [Feb 02 15:30:09 2008] modules: Module `operserv/main' forgot to remove callback `save data complete' from module `core' I'm using inspircd1.1. Also, if i add an access to a channel, after a reset (even if i perform an operserv update), the access list for that channel is gone. Any ideeas on how to fix this? From achurch at achurch.org Sat Feb 2 23:03:18 2008 From: achurch at achurch.org (Andrew Church) Date: Sat, 02 Feb 2008 23:03:18 JST Subject: [IRCServices Coding] Panic 11 Segv Fault error In-Reply-To: Message-ID: <47a47895.65642@msgid.achurch.org> >Hello. I'm receiving this error sometimes in ircservices.log. > >PANIC! signal 11 (no buffer) >[Feb 02 15:30:09 2008] Services terminating: Segmentation fault >[Feb 02 15:30:09 2008] modules: Module `operserv/main' forgot to >remove callback `save data complete' from module `core' See FAQ Z.3. >I'm using inspircd1.1. Also, if i add an access to a channel, after a >reset (even if i perform an operserv update), the access list for that >channel is gone. Any ideeas on how to fix this? Are your database files being saved correctly? (There should be several *.db or *.sdb files in the directory you specified as the Services data directory when you installed Services.) --Andrew Church achurch at achurch.org http://achurch.org/ From razvan.savu at gmail.com Sat Feb 2 06:39:38 2008 From: razvan.savu at gmail.com (Razvan Savu) Date: Sat, 2 Feb 2008 16:39:38 +0200 Subject: [IRCServices Coding] Panic 11 Segv Fault error In-Reply-To: <47a47895.65642@msgid.achurch.org> References: <47a47895.65642@msgid.achurch.org> Message-ID: Yes. Here is a complete listing. Sometimes however i get something like database updaate failed. akill.sdb exception.sdb memo-ignore.sdb nick.sdb chan-access.sdb exclude.sdb memo.sdb oper.sdb chan-akick.sdb helpfiles modules sgline.sdb chan.sdb ircservices.conf modules.conf sqline.sdb convert-db ircservices.log news.sdb stat-servers.sdb example-ircservices.conf ircservices.pid nick-access.sdb szline.sdb example-modules.conf languages nickgroup.sdb 2008/2/2 Andrew Church : > >Hello. I'm receiving this error sometimes in ircservices.log. > > > >PANIC! signal 11 (no buffer) > >[Feb 02 15:30:09 2008] Services terminating: Segmentation fault > >[Feb 02 15:30:09 2008] modules: Module `operserv/main' forgot to > >remove callback `save data complete' from module `core' > > See FAQ Z.3. > > >I'm using inspircd1.1. Also, if i add an access to a channel, after a > >reset (even if i perform an operserv update), the access list for that > >channel is gone. Any ideeas on how to fix this? > > Are your database files being saved correctly? (There should be several > *.db or *.sdb files in the directory you specified as the Services data > directory when you installed Services.) > > --Andrew Church > achurch at achurch.org > http://achurch.org/ > > ------------------------------------------------------------------ > To unsubscribe or change your subscription options, visit: > http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding > From rpope904 at comcast.net Fri Feb 15 20:20:30 2008 From: rpope904 at comcast.net (Russell) Date: Fri, 15 Feb 2008 23:20:30 -0500 Subject: [IRCServices Coding] How would I do this (NickServ) Message-ID: <000001c87053$454c1670$cfe44350$@net> Basically, I have made a website to for users to interact with irc from.. The site generates them a page with a custom chat applet for their channel, but I want to be able to delete inactive users, how can I get ircservices to go to a url when a nickname is removed from the database? i.e. http://www.somesite.com/admin/remove.php?nick=$nickname -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20080215/00c951f9/attachment.htm From phil1974 at taylorassociate.com Wed Jun 25 20:07:49 2008 From: phil1974 at taylorassociate.com (phil1974 at taylorassociate.com) Date: Wed, 25 Jun 2008 23:07:49 -0400 Subject: [IRCServices Coding] Disable getpass Message-ID: <016101c8d739$d0ae7120$0300a8c0@Laptop> Is there any way to change the getpass so only the service root can use that command? I do not know how to read c code. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20080625/642fe742/attachment.html From Craig at frostycoolslug.com Thu Jun 26 08:32:49 2008 From: Craig at frostycoolslug.com (Craig McLure) Date: Thu, 26 Jun 2008 16:32:49 +0100 Subject: [IRCServices Coding] Disable getpass In-Reply-To: <016101c8d739$d0ae7120$0300a8c0@Laptop> References: <016101c8d739$d0ae7120$0300a8c0@Laptop> Message-ID: <8a79f15a0806260832l658ad102i701a53dfee168108@mail.gmail.com> in modules/chanserv/main.c, find: { "GETPASS", do_getpass, is_services_admin, -1, -1, CHAN_OPER_HELP_GETPASS }, and change is_services_admin to is_services_root and do the same in module/nickserv/main.c Should do it for you, (Someone correct me if i'm wrong, it's been a while ;)). 2008/6/26 : > Is there any way to change the getpass so only the service root can use that > command? I do not know how to read c code. > > Thanks > ------------------------------------------------------------------ > To unsubscribe or change your subscription options, visit: > http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding > -- /********************************************** * Craig "FrostyCoolSlug" McLure * ChatSpike - http://www.chatspike.net * InspIRCd - http://www.inspircd.org **********************************************/ From administrator at webspace.ms Mon Aug 18 16:59:20 2008 From: administrator at webspace.ms (WILMES Andreas) Date: Tue, 19 Aug 2008 01:59:20 +0200 Subject: [IRCServices Coding] Migrating Modules to 5.1... Message-ID: <48AA0CD8.4070503@webspace.ms> Hy, I'm migrating my old modules for ircservices-5.1.11, but I've seen that there were many changes in the nickgroupinfo_ struct. "char pass[PASSMAX];" were replaced by "Password pass;", so my module won't compile anymore: modules/nickserv/dbsynch.c: In function `copy_data': modules/nickserv/dbsynch.c:83: error: incompatible type for argument 1 of `__builtin_strncpy' Line of this code: static void copy_data(MYSQL_ROW row, unsigned long *lengths, NickInfo *ni, NickGroupInfo *ngi) { char temp[100]; strncpy(ngi->pass, row[field(MYSQL_FIELD_USERINFO_PASSWORD)], PASSMAX < lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] ? PASSMAX : lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] + 1); .... When I replace "ngi->pass" by "&ngi->pass" there's only a warning left, but by running this function copy_data my services crashes. Any Ideas? Regards. From achurch at achurch.org Tue Aug 19 18:52:46 2008 From: achurch at achurch.org (Andrew Church) Date: Tue, 19 Aug 2008 18:52:46 JST Subject: [IRCServices Coding] Migrating Modules to 5.1... In-Reply-To: <48AA0CD8.4070503@webspace.ms> Message-ID: <48aa994b.11673@msgid.achurch.org> Passwords are no longer stored as simple strings, since each password can be encrypted with a different method (cipher). To save data from a Password structure, you need to save both the contents of Password.password (as a binary buffer, not a string) and the string pointed to by Password.cipher (which may be NULL). To restore a Password structure, fill in the password and cipher fields in a temporary variable, then use copy_password() to copy the data to the destination Password structure. --Andrew Church achurch at achurch.org http://achurch.org/ >Hy, > >I'm migrating my old modules for ircservices-5.1.11, but I've seen that >there were many changes in the nickgroupinfo_ struct. >"char pass[PASSMAX];" were replaced by "Password pass;", so my module >won't compile anymore: > >modules/nickserv/dbsynch.c: In function `copy_data': >modules/nickserv/dbsynch.c:83: error: incompatible type for argument 1 >of `__builtin_strncpy' > > >Line of this code: > >static void copy_data(MYSQL_ROW row, unsigned long *lengths, NickInfo >*ni, NickGroupInfo *ngi) { > char temp[100]; >strncpy(ngi->pass, row[field(MYSQL_FIELD_USERINFO_PASSWORD)], PASSMAX < >lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] ? PASSMAX : >lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] + 1); >.... > >When I replace "ngi->pass" by "&ngi->pass" there's only a warning left, >but by running this function copy_data my services crashes. > >Any Ideas? >Regards. >------------------------------------------------------------------ >To unsubscribe or change your subscription options, visit: >http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding From achurch at achurch.org Wed Aug 20 11:20:26 2008 From: achurch at achurch.org (Andrew Church) Date: Wed, 20 Aug 2008 11:20:26 JST Subject: [IRCServices Coding] Migrating Modules to 5.1... In-Reply-To: <48AB0288.7060600@webspace.ms> Message-ID: <48ab8480.67703@msgid.achurch.org> To extract from a Password structure (assuming the source password buffer is declared as "Password source_password"): char password_buffer[PASSMAX]; char *cipher; memcpy(password_buffer, source_password.password, PASSMAX); cipher = strdup(source_password.cipher); To copy into a Password structure (assuming the target password buffer is declared as "Password target_password" and the data to be copied is in "password_buffer" and "cipher" variables as above): Password temp_password; init_password(&temp_password); memcpy(temp_password.password, password_buffer, PASSMAX); temp_password.cipher = cipher; copy_password(&target_password, &temp_password); // Don't leave a copy of the password in memory memset(&temp_password, 0, sizeof(temp_password)); memset(password_buffer, 0, PASSMAX); I actually think I'll add a set_password() function to simplify this, so the above would then become simply: set_password(&target_password, password_buffer, cipher); // Don't leave a copy of the password in memory memset(password_buffer, 0, PASSMAX); See the "encrypt.h" header file and section 2-9-1 of the technical manual for further details. --Andrew Church achurch at achurch.org http://achurch.org/ >Hy, > >Would that be the right way?: > >copy_password(&ngi->pass, &passbuf); >strncpy(&passbuf, row[field(MYSQL_FIELD_USERINFO_PASSWORD) ... > >Are there sample codes to use copy_password in the right way? > >Regards. > > >Andrew Church schrieb: >> Passwords are no longer stored as simple strings, since each password >> can be encrypted with a different method (cipher). To save data from >> a Password structure, you need to save both the contents of >> Password.password (as a binary buffer, not a string) and the string >> pointed to by Password.cipher (which may be NULL). To restore a >> Password structure, fill in the password and cipher fields in a >> temporary variable, then use copy_password() to copy the data to the >> destination Password structure. >> >> --Andrew Church >> achurch at achurch.org >> http://achurch.org/ >> >> >>> Hy, >>> >>> I'm migrating my old modules for ircservices-5.1.11, but I've seen that >>> there were many changes in the nickgroupinfo_ struct. >>> "char pass[PASSMAX];" were replaced by "Password pass;", so my module >>> won't compile anymore: >>> >>> modules/nickserv/dbsynch.c: In function `copy_data': >>> modules/nickserv/dbsynch.c:83: error: incompatible type for argument 1 >>> of `__builtin_strncpy' >>> >>> >>> Line of this code: >>> >>> static void copy_data(MYSQL_ROW row, unsigned long *lengths, NickInfo >>> *ni, NickGroupInfo *ngi) { >>> char temp[100]; >>> strncpy(ngi->pass, row[field(MYSQL_FIELD_USERINFO_PASSWORD)], PASSMAX < >>> lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] ? PASSMAX : >>> lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] + 1); >>> .... >>> >>> When I replace "ngi->pass" by "&ngi->pass" there's only a warning left, >>> but by running this function copy_data my services crashes. >>> >>> Any Ideas? >>> Regards. >>> ------------------------------------------------------------------ >>> To unsubscribe or change your subscription options, visit: >>> http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding >>> >>> ------------------------------------------------------------------------ >>> >>> ------------------------------------------------------------------ >>> To unsubscribe or change your subscription options, visit: >>> http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding > From aragon at phat.za.net Tue Nov 25 03:52:53 2008 From: aragon at phat.za.net (Aragon Gouveia) Date: Tue, 25 Nov 2008 13:52:53 +0200 Subject: [IRCServices Coding] [IRCServices] akick not setting channel ban Message-ID: <20081125115253.GB2825@phat.za.net> Hi, First of all, pardon my serious case of thread necro. I decided to rather resurrect this so that some history is at hand. :) | By Andrew Church | [ 2005-09-12 05:02 +0200 ] > >I suspect that some of the irc servers in the network drop a ban > >silently, resulting in services having this ban on their list, which > >is desynched from the rest of the network in this case. I've seen > >similar situations with old hybrid servers and other services, but who > >knows.. > > That's an interesting possibility. To the original poster: try > applying the following patch to Services, then recompiling and restarting > in debug mode (ircservices -debug). When you see the bug happening, check > the logfile and see if the ban in question is listed. (Also, if you could > privately send me the full debug logfile for further analysis I'd > appreciate it.) I applied your patch (2 years ago), thank you. However, it didn't help locate the problem and I never really got the time to focus enough energy on it again until recently. Been living with this bug since then. So it's been a while. I extended your patch a bit by adding logging points into do_cmode() to see when bans get set too. The interesting bits: case 'b': if (add) { ARRAY_EXTEND(chan->bans); chan->bans[chan->bans_count-1] = sstrdup(av[0]); log("addban([%s],[%s],[%d])", chan->name, chan->bans[chan->bans_count-1], chan->bans_count-1); } else { int i = find_ban(chan, av[0]); if (i >= 0) { log("find_ban() true, free([%s])", chan->bans[i]); free(chan->bans[i]); ARRAY_REMOVE(chan->bans, i); } else { And when the last server relinked a few times: [Nov 23 16:57:33 2008] find_ban([#5fm],[shand0ra*!*@*]) [Nov 23 16:57:33 2008] ... NOT found [Nov 23 16:57:33 2008] addban([#5fm],[shand0ra*!*@*],[0]) [Nov 23 21:09:56 2008] addban([#5fm],[shand0ra*!*@*],[1]) [Nov 23 21:25:20 2008] addban([#5fm],[shand0ra*!*@*],[2]) And the next find_ban after that: [Nov 24 10:55:01 2008] find_ban([#5fm],[killer!*@*]) [Nov 24 10:55:01 2008] ... checking [shand0ra*!*@*] [Nov 24 10:55:01 2008] ... checking [shand0ra*!*@*] [Nov 24 10:55:01 2008] ... checking [shand0ra*!*@*] [Nov 24 10:55:01 2008] ... checking [killer!*@*] [Nov 24 10:55:01 2008] ... found[1]! [Nov 24 10:55:01 2008] find_ban() true, free([killer!*@*]) So I've changed do_cmode: case 'b': if (add) { int i = find_ban(chan, av[0]); if (i == -1) { ARRAY_EXTEND(chan->bans); chan->bans[chan->bans_count-1] = sstrdup(av[0]); } Which I've tested with some oper assisted relinking and things look much better now. I believe 5.1's do_cmode will cause the same problems (it looks the same as 5.0's). Better late than never they say. :) Regards, Aragon > > Index: channels.c > =================================================================== > RCS file: /var/local/cvsroot/ircservices/channels.c,v > retrieving revision 2.43.2.1 > diff -u -r2.43.2.1 channels.c > --- channels.c 6 Jan 2005 17:15:11 -0000 2.43.2.1 > +++ channels.c 12 Sep 2005 03:01:04 -0000 > @@ -192,22 +192,33 @@ > > t = strchr(ban, '!'); > i = 0; > + if (debug) > + log("find_ban([%s],[%s])", chan->name, ban); > ARRAY_FOREACH (i, chan->bans) { > + if (debug) > + log("... checking [%s]", chan->bans[i]); > s = strchr(chan->bans[i], '!'); > if (s && t) { > if (s-(chan->bans[i]) == t-ban > && irc_strnicmp(chan->bans[i], ban, s-(chan->bans[i])) == 0 > && stricmp(s+1, t+1) == 0 > ) { > + if (debug) > + log("... found!"); > return i; > } > } else if (!s && !t) { > /* Bans without '!' should be impossible; just > * do a case-insensitive compare */ > - if (stricmp(chan->bans[i], ban) == 0) > + if (stricmp(chan->bans[i], ban) == 0) { > + if (debug) > + log("... found!"); > return i; > + } > } > } > + if (debug) > + log("... NOT found"); > return -1; > } From aragon at phat.za.net Tue Nov 25 12:59:27 2008 From: aragon at phat.za.net (Aragon Gouveia) Date: Tue, 25 Nov 2008 22:59:27 +0200 Subject: [IRCServices Coding] [IRCServices] akick not setting channel ban In-Reply-To: <20081125115253.GB2825@phat.za.net> References: <20081125115253.GB2825@phat.za.net> Message-ID: <20081125205927.GA43971@phat.za.net> | By Aragon Gouveia | [ 2008-11-25 14:10 +0200 ] > So I've changed do_cmode: > > case 'b': > if (add) { > int i = find_ban(chan, av[0]); > if (i == -1) { > ARRAY_EXTEND(chan->bans); > chan->bans[chan->bans_count-1] = sstrdup(av[0]); > } > > > Which I've tested with some oper assisted relinking and things look much > better now. I believe 5.1's do_cmode will cause the same problems (it looks > the same as 5.0's). Below is a diff against 5.1.13 that I reworked a little better than above. Not sure if the extra logging is desirable, and I'm assuming do_cmode() and find_ban() work the same in 5.1. :) Regards, Aragon --- channels.c.orig Tue Nov 25 22:48:24 2008 +++ channels.c Tue Nov 25 22:53:56 2008 @@ -360,11 +360,16 @@ break; case 'b': + int i = find_ban(chan, av[0]); if (add) { - ARRAY_EXTEND(chan->bans); - chan->bans[chan->bans_count-1] = sstrdup(av[0]); + if (i == -1) { + ARRAY_EXTEND(chan->bans); + chan->bans[chan->bans_count-1] = sstrdup(av[0]); + } else { + log("channel: MODE %s +b %s: ban already exists", + chan->name, *av); + } } else { - int i = find_ban(chan, av[0]); if (i >= 0) { free(chan->bans[i]); ARRAY_REMOVE(chan->bans, i); From achurch at achurch.org Thu Nov 27 20:08:40 2008 From: achurch at achurch.org (Andrew Church) Date: Thu, 27 Nov 2008 20:08:40 JST Subject: [IRCServices Coding] [IRCServices] akick not setting channel ban In-Reply-To: <20081125115253.GB2825@phat.za.net> Message-ID: <492e802e.56730@msgid.achurch.org> I won't have a chance to look at this for a bit due to work obligations, but thanks in advance. (: At first glance, yes, this looks like the Right Thing To Do. --Andrew Church achurch at achurch.org http://achurch.org/ >Hi, > >First of all, pardon my serious case of thread necro. I decided to rather >resurrect this so that some history is at hand. :) > >| By Andrew Church >| [ 2005-09-12 05:02 +0200 ] >> >I suspect that some of the irc servers in the network drop a ban >> >silently, resulting in services having this ban on their list, which >> >is desynched from the rest of the network in this case. I've seen >> >similar situations with old hybrid servers and other services, but who >> >knows.. >> >> That's an interesting possibility. To the original poster: try >> applying the following patch to Services, then recompiling and restarting >> in debug mode (ircservices -debug). When you see the bug happening, check >> the logfile and see if the ban in question is listed. (Also, if you could >> privately send me the full debug logfile for further analysis I'd >> appreciate it.) > >I applied your patch (2 years ago), thank you. However, it didn't help >locate the problem and I never really got the time to focus enough energy on >it again until recently. Been living with this bug since then. > >So it's been a while. I extended your patch a bit by adding logging points >into do_cmode() to see when bans get set too. The interesting bits: > >case 'b': >if (add) { > ARRAY_EXTEND(chan->bans); > chan->bans[chan->bans_count-1] = sstrdup(av[0]); > log("addban([%s],[%s],[%d])", chan->name, > chan->bans[chan->bans_count-1], chan->bans_count-1); >} else { > int i = find_ban(chan, av[0]); > if (i >= 0) { > log("find_ban() true, free([%s])", chan->bans[i]); > free(chan->bans[i]); > ARRAY_REMOVE(chan->bans, i); > } else { > > >And when the last server relinked a few times: > >[Nov 23 16:57:33 2008] find_ban([#5fm],[shand0ra*!*@*]) >[Nov 23 16:57:33 2008] ... NOT found >[Nov 23 16:57:33 2008] addban([#5fm],[shand0ra*!*@*],[0]) >[Nov 23 21:09:56 2008] addban([#5fm],[shand0ra*!*@*],[1]) >[Nov 23 21:25:20 2008] addban([#5fm],[shand0ra*!*@*],[2]) > >And the next find_ban after that: > >[Nov 24 10:55:01 2008] find_ban([#5fm],[killer!*@*]) >[Nov 24 10:55:01 2008] ... checking [shand0ra*!*@*] >[Nov 24 10:55:01 2008] ... checking [shand0ra*!*@*] >[Nov 24 10:55:01 2008] ... checking [shand0ra*!*@*] >[Nov 24 10:55:01 2008] ... checking [killer!*@*] >[Nov 24 10:55:01 2008] ... found[1]! >[Nov 24 10:55:01 2008] find_ban() true, free([killer!*@*]) > > >So I've changed do_cmode: > >case 'b': >if (add) { > int i = find_ban(chan, av[0]); > if (i == -1) { > ARRAY_EXTEND(chan->bans); > chan->bans[chan->bans_count-1] = sstrdup(av[0]); > } > > >Which I've tested with some oper assisted relinking and things look much >better now. I believe 5.1's do_cmode will cause the same problems (it looks >the same as 5.0's). > >Better late than never they say. :) > > >Regards, >Aragon > > >> >> Index: channels.c >> =================================================================== >> RCS file: /var/local/cvsroot/ircservices/channels.c,v >> retrieving revision 2.43.2.1 >> diff -u -r2.43.2.1 channels.c >> --- channels.c 6 Jan 2005 17:15:11 -0000 2.43.2.1 >> +++ channels.c 12 Sep 2005 03:01:04 -0000 >> @@ -192,22 +192,33 @@ >> >> t = strchr(ban, '!'); >> i = 0; >> + if (debug) >> + log("find_ban([%s],[%s])", chan->name, ban); >> ARRAY_FOREACH (i, chan->bans) { >> + if (debug) >> + log("... checking [%s]", chan->bans[i]); >> s = strchr(chan->bans[i], '!'); >> if (s && t) { >> if (s-(chan->bans[i]) == t-ban >> && irc_strnicmp(chan->bans[i], ban, s-(chan->bans[i])) == 0 >> && stricmp(s+1, t+1) == 0 >> ) { >> + if (debug) >> + log("... found!"); >> return i; >> } >> } else if (!s && !t) { >> /* Bans without '!' should be impossible; just >> * do a case-insensitive compare */ >> - if (stricmp(chan->bans[i], ban) == 0) >> + if (stricmp(chan->bans[i], ban) == 0) { >> + if (debug) >> + log("... found!"); >> return i; >> + } >> } >> } >> + if (debug) >> + log("... NOT found"); >> return -1; >> } > >------------------------------------------------------------------ >To unsubscribe or change your subscription options, visit: >http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding From achurch at achurch.org Sun Dec 7 19:44:33 2008 From: achurch at achurch.org (Andrew Church) Date: Sun, 07 Dec 2008 19:44:33 JST Subject: [IRCServices Coding] [IRCServices] akick not setting channel ban In-Reply-To: <20081125205927.GA43971@phat.za.net> Message-ID: <493ba9af.75450@msgid.achurch.org> It does indeed look like the lack of a check can lead to desyncs, causing the failure to set a ban you originally reported. I'll make a release soon with the fix included. Thanks for figuring this out! --Andrew Church achurch at achurch.org http://achurch.org/ >| By Aragon Gouveia >| [ 2008-11-25 14:10 +0200 ] >> So I've changed do_cmode: >> >> case 'b': >> if (add) { >> int i = find_ban(chan, av[0]); >> if (i == -1) { >> ARRAY_EXTEND(chan->bans); >> chan->bans[chan->bans_count-1] = sstrdup(av[0]); >> } >> >> >> Which I've tested with some oper assisted relinking and things look much >> better now. I believe 5.1's do_cmode will cause the same problems (it looks >> the same as 5.0's). > >Below is a diff against 5.1.13 that I reworked a little better than above. >Not sure if the extra logging is desirable, and I'm assuming do_cmode() and >find_ban() work the same in 5.1. :) > > >Regards, >Aragon > > > >--- channels.c.orig Tue Nov 25 22:48:24 2008 >+++ channels.c Tue Nov 25 22:53:56 2008 >@@ -360,11 +360,16 @@ > break; > > case 'b': >+ int i = find_ban(chan, av[0]); > if (add) { >- ARRAY_EXTEND(chan->bans); >- chan->bans[chan->bans_count-1] = sstrdup(av[0]); >+ if (i == -1) { >+ ARRAY_EXTEND(chan->bans); >+ chan->bans[chan->bans_count-1] = sstrdup(av[0]); >+ } else { >+ log("channel: MODE %s +b %s: ban already exists", >+ chan->name, *av); >+ } > } else { >- int i = find_ban(chan, av[0]); > if (i >= 0) { > free(chan->bans[i]); > ARRAY_REMOVE(chan->bans, i); >------------------------------------------------------------------ >To unsubscribe or change your subscription options, visit: >http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding