+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
- <HEAD>
- <TITLE> [IRCServices Coding] coding... (svcs 5)
- </TITLE>
- <LINK REL="Index" HREF="index.html" >
- <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20coding...%20%28svcs%205%29&In-Reply-To=">
- <META NAME="robots" CONTENT="index,nofollow">
- <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
- <LINK REL="Previous" HREF="000019.html">
- <LINK REL="Next" HREF="000026.html">
- </HEAD>
- <BODY BGCOLOR="#ffffff">
- <H1>[IRCServices Coding] coding... (svcs 5)</H1>
- <B>Andrew Church</B>
- <A HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20coding...%20%28svcs%205%29&In-Reply-To="
- TITLE="[IRCServices Coding] coding... (svcs 5)">achurch at achurch.org
- </A><BR>
- <I>Sat Dec 15 10:45:50 PST 2001</I>
- <P><UL>
- <LI>Previous message: <A HREF="000019.html">[IRCServices Coding] Version 5 (feature request)
-</A></li>
- <LI>Next message: <A HREF="000026.html">[IRCServices Coding] coding... (svcs 5)
-</A></li>
- <LI> <B>Messages sorted by:</B>
- <a href="date.html#25">[ date ]</a>
- <a href="thread.html#25">[ thread ]</a>
- <a href="subject.html#25">[ subject ]</a>
- <a href="author.html#25">[ author ]</a>
- </LI>
- </UL>
- <HR>
-<!--beginarticle-->
-<PRE> Not worth it.
-
-><i>For services 5:
-</I>><i>
-</I>><i>I believe code like this (from operserv/main.c: do_killclones() )
-</I>><i>
-</I>><i> if (match_usermask(clonemask, user) != 0) {
-</I>><i> char killreason[32];
-</I>><i> count++;
-</I>><i> snprintf(killreason, sizeof(killreason),
-</I>><i> "Cloning [%d]", count);
-</I>><i> kill_user(NULL, user->nick, killreason);
-</I>><i> }
-</I>><i>
-</I>><i>should exist in seperate functions like:
-</I>><i>
-</I>><i>int kill_mask(const char *mask, const char *reason)
-</I>><i>{
-</I>><i> int count=0;
-</I>><i> User *user;
-</I>><i>
-</I>><i> for (user = first_user(); user; user = next_user())
-</I>><i> {
-</I>><i> if (match_usermask(mask, user) != 0)
-</I>><i> {
-</I>><i> char killreason[512];
-</I>><i>
-</I>><i> count++;
-</I>><i> snprintf(killreason, sizeof(killreason),
-</I>><i> (reason == NULL ? "Cloning [%d]" : reason),
-</I>><i> count);
-</I>><i> kill_user(NULL, user->nick, killreason);
-</I>><i> }
-</I>><i> }
-</I>><i>
-</I>><i> return(count);
-</I>><i>}
-</I>><i>
-</I>><i>3rd party modules should not use their own code for things like this, sin
-</I>><i>ce
-</I>><i>it exists allready.
-</I>><i>
-</I>><i><<V13>>
-</I>><i>------------------------------------------------------------------
-</I>><i>To unsubscribe or change your subscription options, visit:
-</I>><i><A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">http://www.ircservices.za.net/mailman/listinfo/ircservices-coding</A>
-</I>
- --Andrew Church
- <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org</A>
- <A HREF="http://achurch.org/">http://achurch.org/</A>
-
-</PRE>
-
-<!--endarticle-->
- <HR>
- <P><UL>
- <!--threads-->
- <LI>Previous message: <A HREF="000019.html">[IRCServices Coding] Version 5 (feature request)
-</A></li>
- <LI>Next message: <A HREF="000026.html">[IRCServices Coding] coding... (svcs 5)
-</A></li>
- <LI> <B>Messages sorted by:</B>
- <a href="date.html#25">[ date ]</a>
- <a href="thread.html#25">[ thread ]</a>
- <a href="subject.html#25">[ subject ]</a>
- <a href="author.html#25">[ author ]</a>
- </LI>
- </UL>
-
-</body></html>