]> jfr.im git - irc.git/blame - software/RELEASES/ircservices/achurch.org/services/lists/ircservices/2006/005183.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices / 2006 / 005183.html
CommitLineData
3bd189cb
JR
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2<HTML>
3 <HEAD>
4 <TITLE> [IRCServices] ircservices dev
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20ircservices%20dev&In-Reply-To=20061102125603.88C5FD3B722%40sakura.ian-justman.com">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="005182.html">
11 <LINK REL="Next" HREF="005184.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] ircservices dev</H1>
15 <B>Andrew Church</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20ircservices%20dev&In-Reply-To=20061102125603.88C5FD3B722%40sakura.ian-justman.com"
17 TITLE="[IRCServices] ircservices dev">achurch at achurch.org
18 </A><BR>
19 <I>Fri Nov 3 15:49:54 PST 2006</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="005182.html">[IRCServices] ircservices dev
22</A></li>
23 <LI>Next message: <A HREF="005184.html">[IRCServices] search feature not working on web site for
24 ircservices and no documentation
25</A></li>
26 <LI> <B>Messages sorted by:</B>
27 <a href="date.html#5183">[ date ]</a>
28 <a href="thread.html#5183">[ thread ]</a>
29 <a href="subject.html#5183">[ subject ]</a>
30 <a href="author.html#5183">[ author ]</a>
31 </LI>
32 </UL>
33 <HR>
34<!--beginarticle-->
35<PRE>&gt;<i>(gdb) bt
36</I>&gt;<i>#0 0x0805551e in sstrdup (s=0x0) at memory.c:89
37</I>&gt;<i>#1 0x0805e4a1 in match_usermask (mask=0x0, user=0x85a15a0) at users.c:696
38</I>&gt;<i>#2 0x007156f1 in check_kick (user=0x85a15a0, chan=0xbffe16d1 &quot;#latinchat&quot;,
39</I>
40 That's odd; there shouldn't be any NULL entries in the autokick list.
41I don't know why you'd have such, but try the patch below which works
42around the problem.
43
44 --Andrew Church
45 <A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices">achurch at achurch.org</A>
46 <A HREF="http://achurch.org/">http://achurch.org/</A>
47
48---------------------------------------------------------------------------
49
50Index: users.c
51===================================================================
52RCS file: /var/local/cvsroot/ircservices/users.c,v
53retrieving revision 2.71
54diff -u -r2.71 users.c
55--- users.c 6 Jun 2006 04:45:29 -0000 2.71
56+++ users.c 3 Nov 2006 06:48:33 -0000
57@@ -693,10 +693,15 @@
58
59 int match_usermask(const char *mask, const User *user)
60 {
61- char *mask2 = sstrdup(mask);
62+ char *mask2;
63 char *nick, *username, *host;
64 int match_user, match_host, result;
65
66+ if (!mask || !user) {
67+ log_debug(1, &quot;match_usermask: NULL %s!&quot;, !mask ? &quot;mask&quot; : &quot;user&quot;);
68+ return 0;
69+ }
70+ mask2 = sstrdup(mask);
71 if (strchr(mask2, '!')) {
72 nick = strtok(mask2, &quot;!&quot;);
73 username = strtok(NULL, &quot;@&quot;);
74Index: modules/chanserv/check.c
75===================================================================
76RCS file: /var/local/cvsroot/ircservices/modules/chanserv/check.c,v
77retrieving revision 2.84
78diff -u -r2.84 check.c
79--- modules/chanserv/check.c 5 Oct 2006 18:00:53 -0000 2.84
80+++ modules/chanserv/check.c 3 Nov 2006 06:48:33 -0000
81@@ -371,6 +371,12 @@
82 }
83
84 ARRAY_FOREACH (i, ci-&gt;akick) {
85+ if (!ci-&gt;akick[i].mask) {
86+ log_debug(1, &quot;%s autokick %d has NULL mask, deleting&quot;, ci-&gt;name,i);
87+ ARRAY_REMOVE(ci-&gt;akick, i);
88+ i--;
89+ continue;
90+ }
91 if (match_usermask(ci-&gt;akick[i].mask, user)) {
92 module_log_debug(2, &quot;%s matched akick %s&quot;,
93 user-&gt;nick, ci-&gt;akick[i].mask);
94</PRE>
95
96
97
98
99<!--endarticle-->
100 <HR>
101 <P><UL>
102 <!--threads-->
103 <LI>Previous message: <A HREF="005182.html">[IRCServices] ircservices dev
104</A></li>
105 <LI>Next message: <A HREF="005184.html">[IRCServices] search feature not working on web site for
106 ircservices and no documentation
107</A></li>
108 <LI> <B>Messages sorted by:</B>
109 <a href="date.html#5183">[ date ]</a>
110 <a href="thread.html#5183">[ thread ]</a>
111 <a href="subject.html#5183">[ subject ]</a>
112 <a href="author.html#5183">[ author ]</a>
113 </LI>
114 </UL>
115
116</body></html>