]> jfr.im git - irc.git/blame - software/RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2001/000025.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2001 / 000025.html
CommitLineData
3bd189cb
JR
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2<HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] coding... (svcs 5)
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20coding...%20%28svcs%205%29&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="000019.html">
11 <LINK REL="Next" HREF="000026.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices Coding] coding... (svcs 5)</H1>
15 <B>Andrew Church</B>
16 <A HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20coding...%20%28svcs%205%29&In-Reply-To="
17 TITLE="[IRCServices Coding] coding... (svcs 5)">achurch at achurch.org
18 </A><BR>
19 <I>Sat Dec 15 10:45:50 PST 2001</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="000019.html">[IRCServices Coding] Version 5 (feature request)
22</A></li>
23 <LI>Next message: <A HREF="000026.html">[IRCServices Coding] coding... (svcs 5)
24</A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#25">[ date ]</a>
27 <a href="thread.html#25">[ thread ]</a>
28 <a href="subject.html#25">[ subject ]</a>
29 <a href="author.html#25">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33<!--beginarticle-->
34<PRE> Not worth it.
35
36&gt;<i>For services 5:
37</I>&gt;<i>
38</I>&gt;<i>I believe code like this (from operserv/main.c: do_killclones() )
39</I>&gt;<i>
40</I>&gt;<i> if (match_usermask(clonemask, user) != 0) {
41</I>&gt;<i> char killreason[32];
42</I>&gt;<i> count++;
43</I>&gt;<i> snprintf(killreason, sizeof(killreason),
44</I>&gt;<i> &quot;Cloning [%d]&quot;, count);
45</I>&gt;<i> kill_user(NULL, user-&gt;nick, killreason);
46</I>&gt;<i> }
47</I>&gt;<i>
48</I>&gt;<i>should exist in seperate functions like:
49</I>&gt;<i>
50</I>&gt;<i>int kill_mask(const char *mask, const char *reason)
51</I>&gt;<i>{
52</I>&gt;<i> int count=0;
53</I>&gt;<i> User *user;
54</I>&gt;<i>
55</I>&gt;<i> for (user = first_user(); user; user = next_user())
56</I>&gt;<i> {
57</I>&gt;<i> if (match_usermask(mask, user) != 0)
58</I>&gt;<i> {
59</I>&gt;<i> char killreason[512];
60</I>&gt;<i>
61</I>&gt;<i> count++;
62</I>&gt;<i> snprintf(killreason, sizeof(killreason),
63</I>&gt;<i> (reason == NULL ? &quot;Cloning [%d]&quot; : reason),
64</I>&gt;<i> count);
65</I>&gt;<i> kill_user(NULL, user-&gt;nick, killreason);
66</I>&gt;<i> }
67</I>&gt;<i> }
68</I>&gt;<i>
69</I>&gt;<i> return(count);
70</I>&gt;<i>}
71</I>&gt;<i>
72</I>&gt;<i>3rd party modules should not use their own code for things like this, sin
73</I>&gt;<i>ce
74</I>&gt;<i>it exists allready.
75</I>&gt;<i>
76</I>&gt;<i>&lt;&lt;V13&gt;&gt;
77</I>&gt;<i>------------------------------------------------------------------
78</I>&gt;<i>To unsubscribe or change your subscription options, visit:
79</I>&gt;<i><A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">http://www.ircservices.za.net/mailman/listinfo/ircservices-coding</A>
80</I>
81 --Andrew Church
82 <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org</A>
83 <A HREF="http://achurch.org/">http://achurch.org/</A>
84
85</PRE>
86
87<!--endarticle-->
88 <HR>
89 <P><UL>
90 <!--threads-->
91 <LI>Previous message: <A HREF="000019.html">[IRCServices Coding] Version 5 (feature request)
92</A></li>
93 <LI>Next message: <A HREF="000026.html">[IRCServices Coding] coding... (svcs 5)
94</A></li>
95 <LI> <B>Messages sorted by:</B>
96 <a href="date.html#25">[ date ]</a>
97 <a href="thread.html#25">[ thread ]</a>
98 <a href="subject.html#25">[ subject ]</a>
99 <a href="author.html#25">[ author ]</a>
100 </LI>
101 </UL>
102
103</body></html>