]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices/2000/000576.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices / 2000 / 000576.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices] New NickServ Command...
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20New%20NickServ%20Command...&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="000575.html">
11 <LINK REL="Next" HREF="000577.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] New NickServ Command...</H1>
15 <B>Jason at GCN</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20New%20NickServ%20Command...&In-Reply-To="
17 TITLE="[IRCServices] New NickServ Command...">jasonatgcn at hotmail.com
18 </A><BR>
19 <I>Wed Jun 21 14:34:17 PDT 2000</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="000575.html">[IRCServices] version 2.2.6, still available?
22 </A></li>
23 <LI>Next message: <A HREF="000577.html">[IRCServices] New NickServ Command...
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#576">[ date ]</a>
27 <a href="thread.html#576">[ thread ]</a>
28 <a href="subject.html#576">[ subject ]</a>
29 <a href="author.html#576">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>I am suggesting a new command like /NickServ TAKE &lt;nick&gt; &lt;passoword&gt;
35
36 Services, after making sure that no one is on that nick and that the nick
37 and password are correct will do a SVSNICK and identify the the user for
38 that nick. I have the following code, but I want to ask everyone if thay
39 know of any potential side effects that the command would cause on services
40 if it were to be implemented. I have tested it and it seems to work fine,
41 the follow code is below:
42
43 static void do_take(User *u)
44 {
45 char *nick = strtok(NULL, &quot; &quot;);
46 char *pass = strtok(NULL, &quot; &quot;);
47 NickInfo *ni;
48 User *u2;
49
50 if (!nick) {
51 syntax_error(s_NickServ, u, &quot;TAKE&quot;, NICK_TAKE_SYNTAX);
52 } else if ((u2 = finduser(nick))) {
53 notice_lang(s_NickServ, u, NICK_X_IN_USE, nick);
54 } else if (!(ni = findnick(nick))) {
55 notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, nick);
56 } else if (stricmp(nick, u-&gt;nick) == 0) {
57 notice_lang(s_NickServ, u, NICK_NO_GHOST_SELF);
58 } else if (pass) {
59 int res = check_password(pass, ni-&gt;pass);
60 if (res == 1) {
61 send_cmd(NULL, &quot;SVSNICK %s %s :%ld&quot;, u-&gt;nick, ni-&gt;nick,
62 time(NULL));
63 ni-&gt;status |= NS_IDENTIFIED;
64 ni-&gt;id_timestamp = u-&gt;signon;
65 if (!(ni-&gt;status &amp; NS_RECOGNIZED)) {
66 ni-&gt;last_seen = time(NULL);
67 if (ni-&gt;last_usermask)
68 free(ni-&gt;last_usermask);
69 ni-&gt;last_usermask =
70 smalloc(strlen(u-&gt;username)+strlen(u-&gt;host)+2);
71 sprintf(ni-&gt;last_usermask, &quot;%s@%s&quot;, u-&gt;username, u-&gt;host);
72 if (ni-&gt;last_realname)
73 free(ni-&gt;last_realname);
74 ni-&gt;last_realname = sstrdup(u-&gt;realname);
75 }
76 } else {
77 if (res == 0) {
78 log(&quot;%s: RELEASE: invalid password for %s by %s!%s@%s&quot;,
79 s_NickServ, nick, u-&gt;nick, u-&gt;username, u-&gt;host);
80 bad_password(u);
81 }
82 }
83 } else {
84 if (!(ni-&gt;flags &amp; NI_SECURE) &amp;&amp; is_on_access(u, ni)) {
85 char buf[NICKMAX+32];
86 snprintf(buf, sizeof(buf), &quot;TAKE command used by %s&quot;, u-&gt;nick);
87 kill_user(s_NickServ, nick, buf);
88 notice_lang(s_NickServ, u, NICK_TAKE_KILLED, nick);
89 } else {
90 }
91 }
92 }
93
94 Please tell me what you think, and if you like it, perhaps it will be
95 implemented in future versions of services.
96 ________________________________________________________________________
97 Get Your Private, Free E-mail from MSN Hotmail at <A HREF="http://www.hotmail.com">http://www.hotmail.com</A>
98
99
100 ---------------------------------------------------------------
101 To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
102 with &quot;unsubscribe ircservices&quot; in the body, without the quotes.
103
104
105 </PRE>
106
107 <!--endarticle-->
108 <HR>
109 <P><UL>
110 <!--threads-->
111 <LI>Previous message: <A HREF="000575.html">[IRCServices] version 2.2.6, still available?
112 </A></li>
113 <LI>Next message: <A HREF="000577.html">[IRCServices] New NickServ Command...
114 </A></li>
115 <LI> <B>Messages sorted by:</B>
116 <a href="date.html#576">[ date ]</a>
117 <a href="thread.html#576">[ thread ]</a>
118 <a href="subject.html#576">[ subject ]</a>
119 <a href="author.html#576">[ author ]</a>
120 </LI>
121 </UL>
122
123 </body></html>