]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2006/003211.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2006 / 003211.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=43D3594E.5050308%40frostycoolslug.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="003210.html">
11 <LINK REL="Next" HREF="003212.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices Coding] 5.1 Suggestion: Aliases.</H1>
15 <B>Andrew Church</B>
16 <A HREF="mailto:ircservices-coding%40ircservices.esper.net?Subject=%5BIRCServices%20Coding%5D%205.1%20Suggestion%3A%20Aliases.&In-Reply-To=43D3594E.5050308%40frostycoolslug.com"
17 TITLE="[IRCServices Coding] 5.1 Suggestion: Aliases.">achurch at achurch.org
18 </A><BR>
19 <I>Sun Jan 22 20:21:01 PST 2006</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="003210.html">[IRCServices Coding] 5.1 Suggestion: Aliases.
22 </A></li>
23 <LI>Next message: <A HREF="003212.html">[IRCServices Coding] 5.1 Suggestion: Aliases.
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#3211">[ date ]</a>
27 <a href="thread.html#3211">[ thread ]</a>
28 <a href="subject.html#3211">[ subject ]</a>
29 <a href="author.html#3211">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>&gt;<i>On chatspike, i've modified a few files for 'convieniance' purposes,
35 </I>&gt;<i>adding things like id -&gt; handle_identify and what not, what would be
36 </I>&gt;<i>nice, if it were possible to configure some of these in the
37 </I>&gt;<i>configuration file, rather than having to modifying the core :)
38 </I>
39 You could just make a module with something like
40
41 extern char *s_NickServ;
42 int do_privmsg(const char *source, const char *target, char *buf)
43 {
44 if (irc_stricmp(target, s_NickServ) == 0
45 &amp;&amp; stricmp(buf, &quot;ID&quot;, 2)
46 &amp;&amp; isspace(buf[2]
47 ) {
48 memmove(buf+8, buf+2, strlen(buf+8));
49 memcpy(buf, &quot;IDENTIFY&quot;, 8);
50 }
51 return 0;
52 }
53 int init_module()
54 {
55 // ...
56 add_callback_pri(NULL, &quot;m_privmsg&quot;, do_privmsg, CBPRI_MAX); // called first
57 // ...
58 }
59
60 which is rather kludgey in that it relies on `buf' being writeable and
61 having room for 6 more bytes (which should always be true), but it doesn't
62 require modifying the core. I'll think about a more general solution,
63 though.
64
65 --Andrew Church
66 <A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org</A>
67 <A HREF="http://achurch.org/">http://achurch.org/</A>
68 </PRE>
69
70
71 <!--endarticle-->
72 <HR>
73 <P><UL>
74 <!--threads-->
75 <LI>Previous message: <A HREF="003210.html">[IRCServices Coding] 5.1 Suggestion: Aliases.
76 </A></li>
77 <LI>Next message: <A HREF="003212.html">[IRCServices Coding] 5.1 Suggestion: Aliases.
78 </A></li>
79 <LI> <B>Messages sorted by:</B>
80 <a href="date.html#3211">[ date ]</a>
81 <a href="thread.html#3211">[ thread ]</a>
82 <a href="subject.html#3211">[ subject ]</a>
83 <a href="author.html#3211">[ author ]</a>
84 </LI>
85 </UL>
86
87 </body></html>