]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2003/001963.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2003 / 001963.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] Chanserv patch for reg chans only
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20Chanserv%20patch%20for%20reg%20chans%20only&In-Reply-To=">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="001962.html">
11 <LINK REL="Next" HREF="002032.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices Coding] Chanserv patch for reg chans only</H1>
15 <B>Stefan Hudson</B>
16 <A HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20Chanserv%20patch%20for%20reg%20chans%20only&In-Reply-To="
17 TITLE="[IRCServices Coding] Chanserv patch for reg chans only">hudson at mbay.net
18 </A><BR>
19 <I>Wed Mar 12 15:04:41 PST 2003</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="001962.html">[IRCServices Coding] JUPE and bahamut-1.4(35)
22 </A></li>
23 <LI>Next message: <A HREF="002032.html">[IRCServices Coding] Chanserv patch for reg chans only
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#1963">[ date ]</a>
27 <a href="thread.html#1963">[ thread ]</a>
28 <a href="subject.html#1963">[ subject ]</a>
29 <a href="author.html#1963">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>Here's a patch to add an option for forbiding use unregistered channels
35 by normal users. Yeah, it's a bit fascist, but sometimes this much control
36 is needed - on IRC servers that are used for commercial support, where it
37 would not be appropriate to have someone create #hotgaysex, for example.
38
39 This is the first hack I've done on ircservices, so someone please check
40 to make sure I didn't miss something. I tried to cover all bases.
41
42 diff -c -r ircservices-5.0.13/data/example-modules.conf ircservices-5.0.13-local/data/example-modules.conf
43 *** ircservices-5.0.13/data/example-modules.conf Mon Mar 3 01:54:47 2003
44 --- ircservices-5.0.13-local/data/example-modules.conf Wed Mar 12 16:41:23 2003
45 ***************
46 *** 919,924 ****
47 --- 919,932 ----
48
49 #CSForbidShortChannel
50
51 + # CSRegisteredOnly [OPTIONAL]
52 + # When enabled, treats unregistered channels as forbidden, not
53 + # allowing normal users to join. If enabled, services opers will
54 + # need to create any new channels on the network. For this option
55 + # to be effective, CSEnableRegister should generally NOT be enabled.
56 +
57 + #CSRegisteredOnly
58 +
59 EndModule
60
61 ################################ SENDPASS module
62 diff -c -r ircservices-5.0.13/docs/a.html ircservices-5.0.13-local/docs/a.html
63 *** ircservices-5.0.13/docs/a.html Sun Mar 2 21:18:48 2003
64 --- ircservices-5.0.13-local/docs/a.html Wed Mar 12 16:50:04 2003
65 ***************
66 *** 1722,1727 ****
67 --- 1722,1739 ----
68
69 &lt;p&gt;Example: &lt;tt&gt;CSForbidShortChannel&lt;/tt&gt;
70 &lt;/ul&gt;
71 +
72 + &lt;a name=&quot;chanserv/main.CSRegisteredOnly&quot;&gt;&lt;/a&gt;
73 + &lt;p&gt;&lt;ul&gt;&lt;li&gt;
74 + &lt;tt&gt;&lt;b&gt;CSRegisteredOnly&lt;/b&gt;&lt;/tt&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[OPTIONAL]
75 + &lt;p&gt;When enabled, treats unregistered channels as forbidden, not
76 + allowing normal users to join. If enabled, services opers will
77 + need to create any new channels on the network. For this option
78 + to be effective, CSEnableRegister should generally NOT be enabled.
79 +
80 + &lt;p&gt;Example: &lt;tt&gt;CSRegisteredOnly&lt;/tt&gt;
81 + &lt;/ul&gt;
82 +
83 &lt;a name=&quot;chanserv/sendpass&quot;&gt;&lt;/a&gt;
84 &lt;p&gt;&lt;font size=&quot;+1&quot;&gt;&lt;b&gt;chanserv/sendpass&lt;/b&gt; (SENDPASS module)&lt;/font&gt;
85
86 diff -c -r ircservices-5.0.13/modules/chanserv/check.c ircservices-5.0.13-local/modules/chanserv/check.c
87 *** ircservices-5.0.13/modules/chanserv/check.c Mon Mar 3 01:54:48 2003
88 --- ircservices-5.0.13-local/modules/chanserv/check.c Wed Mar 12 04:55:35 2003
89 ***************
90 *** 274,281 ****
91 goto kick;
92 }
93
94 ! if (!ci)
95 ! return 0;
96
97 if (is_services_admin(user))
98 return 0;
99 --- 274,288 ----
100 goto kick;
101 }
102
103 ! if (!ci) {
104 ! if(CSRegisteredOnly &amp;&amp; !is_oper(user)) {
105 ! mask = sstrdup(&quot;*!*@*&quot;);
106 ! reason = getstring(user-&gt;ngi, CHAN_MAY_NOT_BE_USED);
107 ! goto kick;
108 ! } else {
109 ! return 0;
110 ! }
111 ! }
112
113 if (is_services_admin(user))
114 return 0;
115 diff -c -r ircservices-5.0.13/modules/chanserv/cs-local.h ircservices-5.0.13-local/modules/chanserv/cs-local.h
116 *** ircservices-5.0.13/modules/chanserv/cs-local.h Mon Mar 3 01:54:48 2003
117 --- ircservices-5.0.13-local/modules/chanserv/cs-local.h Wed Mar 12 04:45:02 2003
118 ***************
119 *** 93,98 ****
120 --- 93,99 ----
121 E time_t CSSuspendExpire;
122 E time_t CSSuspendGrace;
123 E int CSForbidShortChannel;
124 + E int CSRegisteredOnly;
125 E ChanOpt chanopts[];
126
127
128 diff -c -r ircservices-5.0.13/modules/chanserv/main.c ircservices-5.0.13-local/modules/chanserv/main.c
129 *** ircservices-5.0.13/modules/chanserv/main.c Mon Mar 3 01:54:48 2003
130 --- ircservices-5.0.13-local/modules/chanserv/main.c Wed Mar 12 03:47:23 2003
131 ***************
132 *** 57,62 ****
133 --- 57,63 ----
134 time_t CSSuspendExpire;
135 time_t CSSuspendGrace;
136 int CSForbidShortChannel;
137 + int CSRegisteredOnly;
138 EXPORT_VAR(int32,CSMaxReg)
139
140 /*************************************************************************/
141 ***************
142 *** 1606,1611 ****
143 --- 1607,1613 ----
144 { &quot;CSEnableRegister&quot;, { { CD_SET, 0, &amp;CSEnableRegister } } },
145 { &quot;CSExpire&quot;, { { CD_TIME, 0, &amp;CSExpire } } },
146 { &quot;CSForbidShortChannel&quot;,{{CD_SET, 0, &amp;CSForbidShortChannel } } },
147 + { &quot;CSRegisteredOnly&quot;, { { CD_SET, 0, &amp;CSRegisteredOnly } } },
148 { &quot;CSInhabit&quot;, { { CD_TIME, CF_DIRREQ, &amp;CSInhabit } } },
149 { &quot;CSListMax&quot;, { { CD_POSINT, CF_DIRREQ, &amp;CSListMax } } },
150 { &quot;CSListOpersOnly&quot;, { { CD_SET, 0, &amp;CSListOpersOnly } } },
151 </PRE>
152
153 <!--endarticle-->
154 <HR>
155 <P><UL>
156 <!--threads-->
157 <LI>Previous message: <A HREF="001962.html">[IRCServices Coding] JUPE and bahamut-1.4(35)
158 </A></li>
159 <LI>Next message: <A HREF="002032.html">[IRCServices Coding] Chanserv patch for reg chans only
160 </A></li>
161 <LI> <B>Messages sorted by:</B>
162 <a href="date.html#1963">[ date ]</a>
163 <a href="thread.html#1963">[ thread ]</a>
164 <a href="subject.html#1963">[ subject ]</a>
165 <a href="author.html#1963">[ author ]</a>
166 </LI>
167 </UL>
168
169 </body></html>