1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices] New NickServ Command...
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">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices] New NickServ Command...
</H1>
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
19 <I>Wed Jun
21 14:
34:
17 PDT
2000</I>
21 <LI>Previous message:
<A HREF=
"000575.html">[IRCServices] version
2.2.6, still available?
23 <LI>Next message:
<A HREF=
"000577.html">[IRCServices] New NickServ Command...
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>
34 <PRE>I am suggesting a new command like /NickServ TAKE
<nick
> <passoword
>
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:
43 static void do_take(User *u)
45 char *nick = strtok(NULL,
" ");
46 char *pass = strtok(NULL,
" ");
51 syntax_error(s_NickServ, u,
"TAKE
", 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-
>nick) ==
0) {
57 notice_lang(s_NickServ, u, NICK_NO_GHOST_SELF);
59 int res = check_password(pass, ni-
>pass);
61 send_cmd(NULL,
"SVSNICK %s %s :%ld
", u-
>nick, ni-
>nick,
63 ni-
>status |= NS_IDENTIFIED;
64 ni-
>id_timestamp = u-
>signon;
65 if (!(ni-
>status
& NS_RECOGNIZED)) {
66 ni-
>last_seen = time(NULL);
67 if (ni-
>last_usermask)
68 free(ni-
>last_usermask);
69 ni-
>last_usermask =
70 smalloc(strlen(u-
>username)+strlen(u-
>host)+
2);
71 sprintf(ni-
>last_usermask,
"%s@%s
", u-
>username, u-
>host);
72 if (ni-
>last_realname)
73 free(ni-
>last_realname);
74 ni-
>last_realname = sstrdup(u-
>realname);
78 log(
"%s: RELEASE: invalid password for %s by %s!%s@%s
",
79 s_NickServ, nick, u-
>nick, u-
>username, u-
>host);
84 if (!(ni-
>flags
& NI_SECURE)
&& is_on_access(u, ni)) {
86 snprintf(buf, sizeof(buf),
"TAKE command used by %s
", u-
>nick);
87 kill_user(s_NickServ, nick, buf);
88 notice_lang(s_NickServ, u, NICK_TAKE_KILLED, nick);
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>
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
"unsubscribe ircservices
" in the body, without the quotes.
111 <LI>Previous message:
<A HREF=
"000575.html">[IRCServices] version
2.2.6, still available?
113 <LI>Next message:
<A HREF=
"000577.html">[IRCServices] New NickServ Command...
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>