[IRCServices] akick not setting channel ban

Aragon Gouveia aragon at phat.za.net
Mon Sep 12 14:21:05 PDT 2005


Agreed it could be a network desync.  Thanks for the patch.  Will apply it
and let you know the results.



| By Andrew Church <achurch at achurch.org>
|                                          [ 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.)
> 
>   --Andrew Church
>     achurch at achurch.org
>     http://achurch.org/
> 
> ---------------------------------------------------------------------------
> 
> 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