1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices Coding]
5.1 Suggestion: Aliases.
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">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices Coding]
5.1 Suggestion: Aliases.
</H1>
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
19 <I>Sun Jan
22 03:
40:
42 PST
2006</I>
21 <LI>Previous message:
<A HREF=
"003211.html">[IRCServices Coding]
5.1 Suggestion: Aliases.
23 <LI>Next message:
<A HREF=
"003209.html">[IRCServices Coding] Services
5.1a4 released
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>
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.
40 Glad you're thinking about it though :)
43 >><i> On chatspike, i've modified a few files for 'convieniance' purposes,
44 </I>>><i> adding things like id -
> handle_identify and what not, what would be
45 </I>>><i> nice, if it were possible to configure some of these in the
46 </I>>><i> configuration file, rather than having to modifying the core :)
48 </I>><i> You could just make a module with something like
50 </I>><i> extern char *s_NickServ;
51 </I>><i> int do_privmsg(const char *source, const char *target, char *buf)
53 </I>><i> if (irc_stricmp(target, s_NickServ) ==
0
54 </I>><i> && stricmp(buf,
"ID
",
2)
55 </I>><i> && isspace(buf[
2]
57 </I>><i> memmove(buf+
8, buf+
2, strlen(buf+
8));
58 </I>><i> memcpy(buf,
"IDENTIFY
",
8);
62 </I>><i> int init_module()
65 </I>><i> add_callback_pri(NULL,
"m_privmsg
", do_privmsg, CBPRI_MAX); // called first
69 </I>><i> which is rather kludgey in that it relies on `buf' being writeable and
70 </I>><i> having room for
6 more bytes (which should always be true), but it doesn't
71 </I>><i> require modifying the core. I'll think about a more general solution,
74 </I>><i> --Andrew Church
75 </I>><i> <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org
</A>
76 </I>><i> <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
77 </I>><i> ------------------------------------------------------------------
78 </I>><i> To unsubscribe or change your subscription options, visit:
79 </I>><i> <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
</A>
89 <LI>Previous message:
<A HREF=
"003211.html">[IRCServices Coding]
5.1 Suggestion: Aliases.
91 <LI>Next message:
<A HREF=
"003209.html">[IRCServices Coding] Services
5.1a4 released
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>