]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2006/003212.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2006 / 003212.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] 5.1 Suggestion: Aliases.
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.esper.net?Subject=%5BIRCServices%20Coding%5D%205.1%20Suggestion%3A%20Aliases.&In-Reply-To=43d36cb8.21015%40msgid.achurch.org">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="003211.html">
11 <LINK REL="Next" HREF="003209.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices Coding] 5.1 Suggestion: Aliases.</H1>
15 <B>Craig McLure</B>
16 <A HREF="mailto:ircservices-coding%40ircservices.esper.net?Subject=%5BIRCServices%20Coding%5D%205.1%20Suggestion%3A%20Aliases.&In-Reply-To=43d36cb8.21015%40msgid.achurch.org"
17 TITLE="[IRCServices Coding] 5.1 Suggestion: Aliases.">Craig at frostycoolslug.com
18 </A><BR>
19 <I>Sun Jan 22 03:40:42 PST 2006</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="003211.html">[IRCServices Coding] 5.1 Suggestion: Aliases.
22 </A></li>
23 <LI>Next message: <A HREF="003209.html">[IRCServices Coding] Services 5.1a4 released
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#3212">[ date ]</a>
27 <a href="thread.html#3212">[ thread ]</a>
28 <a href="subject.html#3212">[ subject ]</a>
29 <a href="author.html#3212">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>I understand that it could be done as a module, and it was in
35 consideration when i added it in, but in all fairness, it was a choice
36 between coding, testing, debugging, etc of a module, vs. a one liner
37 into the nickserv command table. Time was an issue as well, which was
38 why i made the core choice.
39
40 Glad you're thinking about it though :)
41
42 Andrew Church wrote:
43 &gt;&gt;<i> On chatspike, i've modified a few files for 'convieniance' purposes,
44 </I>&gt;&gt;<i> adding things like id -&gt; handle_identify and what not, what would be
45 </I>&gt;&gt;<i> nice, if it were possible to configure some of these in the
46 </I>&gt;&gt;<i> configuration file, rather than having to modifying the core :)
47 </I>&gt;<i>
48 </I>&gt;<i> You could just make a module with something like
49 </I>&gt;<i>
50 </I>&gt;<i> extern char *s_NickServ;
51 </I>&gt;<i> int do_privmsg(const char *source, const char *target, char *buf)
52 </I>&gt;<i> {
53 </I>&gt;<i> if (irc_stricmp(target, s_NickServ) == 0
54 </I>&gt;<i> &amp;&amp; stricmp(buf, &quot;ID&quot;, 2)
55 </I>&gt;<i> &amp;&amp; isspace(buf[2]
56 </I>&gt;<i> ) {
57 </I>&gt;<i> memmove(buf+8, buf+2, strlen(buf+8));
58 </I>&gt;<i> memcpy(buf, &quot;IDENTIFY&quot;, 8);
59 </I>&gt;<i> }
60 </I>&gt;<i> return 0;
61 </I>&gt;<i> }
62 </I>&gt;<i> int init_module()
63 </I>&gt;<i> {
64 </I>&gt;<i> // ...
65 </I>&gt;<i> add_callback_pri(NULL, &quot;m_privmsg&quot;, do_privmsg, CBPRI_MAX); // called first
66 </I>&gt;<i> // ...
67 </I>&gt;<i> }
68 </I>&gt;<i>
69 </I>&gt;<i> which is rather kludgey in that it relies on `buf' being writeable and
70 </I>&gt;<i> having room for 6 more bytes (which should always be true), but it doesn't
71 </I>&gt;<i> require modifying the core. I'll think about a more general solution,
72 </I>&gt;<i> though.
73 </I>&gt;<i>
74 </I>&gt;<i> --Andrew Church
75 </I>&gt;<i> <A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org</A>
76 </I>&gt;<i> <A HREF="http://achurch.org/">http://achurch.org/</A>
77 </I>&gt;<i> ------------------------------------------------------------------
78 </I>&gt;<i> To unsubscribe or change your subscription options, visit:
79 </I>&gt;<i> <A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding</A>
80 </I>&gt;<i>
81 </I>&gt;<i>
82 </I>
83 </PRE>
84
85 <!--endarticle-->
86 <HR>
87 <P><UL>
88 <!--threads-->
89 <LI>Previous message: <A HREF="003211.html">[IRCServices Coding] 5.1 Suggestion: Aliases.
90 </A></li>
91 <LI>Next message: <A HREF="003209.html">[IRCServices Coding] Services 5.1a4 released
92 </A></li>
93 <LI> <B>Messages sorted by:</B>
94 <a href="date.html#3212">[ date ]</a>
95 <a href="thread.html#3212">[ thread ]</a>
96 <a href="subject.html#3212">[ subject ]</a>
97 <a href="author.html#3212">[ author ]</a>
98 </LI>
99 </UL>
100
101 </body></html>