1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices] what do they think ?
6 <LINK REL=
"Index" HREF=
"index.html" >
7 <LINK REL=
"made" HREF=
"mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20what%20do%20they%20think%20%3F&In-Reply-To=99100716582300.00678%40rcmoraes.intranet">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"000186.html">
11 <LINK REL=
"Next" HREF=
"000188.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices] what do they think ?
</H1>
16 <A HREF=
"mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20what%20do%20they%20think%20%3F&In-Reply-To=99100716582300.00678%40rcmoraes.intranet"
17 TITLE=
"[IRCServices] what do they think ?">andrewk at icon.co.za
19 <I>Fri Oct
8 02:
42:
27 PDT
1999</I>
21 <LI>Previous message:
<A HREF=
"000186.html">[IRCServices] what do they think ?
23 <LI>Next message:
<A HREF=
"000188.html">[IRCServices] what do they think ?
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#187">[ date ]
</a>
27 <a href=
"thread.html#187">[ thread ]
</a>
28 <a href=
"subject.html#187">[ subject ]
</a>
29 <a href=
"author.html#187">[ author ]
</a>
34 <PRE>I have little experience with system(), but from what I've heard, it's not
35 such a good command to use. execve() being a more preferred method. Am I
38 This type of functionality is already being build into the next version of
43 On Thu,
7 Oct
1999, root of all evil wrote:
45 ><i> i had wrote this function on my services, it is working well, but i wold like
46 </I>><i> to hear coments and sugestions on it
48 </I>><i> it send password information to the nick email (ni-
>email) and i changed the
49 </I>><i> do_register, so users must give a mail
51 </I>><i> the function is it :
53 </I>><i> static void do_sendpass(User *u)
55 </I>><i> #ifndef USE_ENCRYPTION
56 </I>><i> char *nick = strtok(NULL,
" ");
57 </I>><i> NickInfo *ni;
58 </I>><i> FILE *tosend;
59 </I>><i> FILE *lock;
62 </I>><i> #ifdef USE_ENCRYPTION
63 </I>><i> notice(s_NickServ, u-
>nick,
"SENDPASS not avaliable
");
65 </I>><i> lock = fopen(
".senpass.nick
",
"r
");
66 </I>><i> if (lock) {
67 </I>><i> notice(s_NickServ, u-
>nick,
"Sendpass is busy, try again later
");
68 </I>><i> fclose(lock);
70 </I>><i> }else if (!nick) {
71 </I>><i> notice(s_NickServ, u-
>nick,
"Sintax: /msg NickServ SENDPASS nick
");
73 </I>><i> } else if (!(ni = findnick(nick))) {
74 </I>><i> notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, nick);
76 </I>><i> } else if (nick_is_services_admin(ni)
&& !is_services_root(u)) {
77 </I>><i> notice_lang(s_NickServ, u, PERMISSION_DENIED);
79 </I>><i> } else if (!ni-
>email) {
80 </I>><i> notice(s_NickServ, u-
>nick,
"No email set
");
82 </I>><i> } else if (!strchr(ni-
>email, '@')) {
83 </I>><i> notice(s_NickServ, u-
>nick,
"bad email
");
85 </I>><i> } else if(strlen(ni-
>email)
>50) {
86 </I>><i> notice(s_NickServ, u-
>nick,
"bad email
");
90 </I>><i> char illsend[
256];
91 </I>><i> strcpy(illsend,
"/usr/sbin/sendmail
");
92 </I>><i> strcat(illsend, ni-
>email);
93 </I>><i> strcat(illsend,
" < .sendpass.nick
");
95 </I>><i> tosend = fopen(
".sendpass.nick
",
"w
");
96 </I>><i> if (tosend) {
97 </I>><i> fprintf(tosend,
"From:
<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">brasirc at brasirc.com.br
</A>\n
");
98 </I>><i> fprintf(tosend,
"Subject: [%s] Password\n
", ni-
>nick);
99 </I>><i> fprintf(tosend,
"\n
");
100 </I>><i> fprintf(tosend,
"Dear user\n
");
101 </I>><i> fprintf(tosend,
"yor nick %s password is:%s\n
", ni-
>nick, ni-
>pass);
102 </I>><i> fprintf(tosend,
"if u need help write to
<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">ajuda at brasirc.com.br
</A>\n
");
103 </I>><i> fprintf(tosend,
"or join #BrasIRCOP\n
");
104 </I>><i> fprintf(tosend,
"\n
");
105 </I>><i> fprintf(tosend,
"BrasIRC.com.br network
");
106 </I>><i> fprintf(tosend,
".\n
"); /* this get us out on sendmail */
107 </I>><i> fclose(tosend);
109 </I>><i> system(illsend);
110 </I>><i> system(
"rm -f .sendpass.nick
");
112 </I>><i> log(
"%s: %s!%s@%s used SENDPASS on %s email: %s
", s_NickServ, u-
>nick,
113 </I>><i> u -
>username, u-
>host, nick, ni-
>email);
114 </I>><i> if (WallGetpass)
115 </I>><i> wallops(s_NickServ,
"\
2%s\
2 used SENDPASS on \
2%s\
2, mail: %s
",
116 </I>><i> u-
>nick, nick, ni-
>email);
117 </I>><i> } else { notice(s_NickServ, u-
>nick,
"Ooops, Something gone
118 </I>><i> wrong on SendPass
");
123 </I>><i> Fighter ircadmin irc.rionet.com.br
124 </I>><i> Brasirc.com.br Network
125 </I>><i> ---------------------------------------------------------------
126 </I>><i> To unsubscribe, send email to
<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org
</A>
127 </I>><i> with
"unsubscribe ircservices
" in the body, without the quotes.
130 ---------------------------------------------------------------
131 To unsubscribe, send email to
<A HREF=
"http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org
</A>
132 with
"unsubscribe ircservices
" in the body, without the quotes.
140 <LI>Previous message:
<A HREF=
"000186.html">[IRCServices] what do they think ?
142 <LI>Next message:
<A HREF=
"000188.html">[IRCServices] what do they think ?
144 <LI> <B>Messages sorted by:
</B>
145 <a href=
"date.html#187">[ date ]
</a>
146 <a href=
"thread.html#187">[ thread ]
</a>
147 <a href=
"subject.html#187">[ subject ]
</a>
148 <a href=
"author.html#187">[ author ]
</a>