--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [IRCServices] what do they think ?
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <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">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="000186.html">
+ <LINK REL="Next" HREF="000188.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[IRCServices] what do they think ?</H1>
+ <B>Andrew Kempe</B>
+ <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20what%20do%20they%20think%20%3F&In-Reply-To=99100716582300.00678%40rcmoraes.intranet"
+ TITLE="[IRCServices] what do they think ?">andrewk at icon.co.za
+ </A><BR>
+ <I>Fri Oct 8 02:42:27 PDT 1999</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="000186.html">[IRCServices] what do they think ?
+</A></li>
+ <LI>Next message: <A HREF="000188.html">[IRCServices] what do they think ?
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#187">[ date ]</a>
+ <a href="thread.html#187">[ thread ]</a>
+ <a href="subject.html#187">[ subject ]</a>
+ <a href="author.html#187">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>I have little experience with system(), but from what I've heard, it's not
+such a good command to use. execve() being a more preferred method. Am I
+correct?
+
+This type of functionality is already being build into the next version of
+IRC Services.
+
+Andrew
+
+On Thu, 7 Oct 1999, root of all evil wrote:
+
+><i> i had wrote this function on my services, it is working well, but i wold like
+</I>><i> to hear coments and sugestions on it
+</I>><i>
+</I>><i> it send password information to the nick email (ni->email) and i changed the
+</I>><i> do_register, so users must give a mail
+</I>><i>
+</I>><i> the function is it :
+</I>><i>
+</I>><i> static void do_sendpass(User *u)
+</I>><i> {
+</I>><i> #ifndef USE_ENCRYPTION
+</I>><i> char *nick = strtok(NULL, " ");
+</I>><i> NickInfo *ni;
+</I>><i> FILE *tosend;
+</I>><i> FILE *lock;
+</I>><i> #endif
+</I>><i>
+</I>><i> #ifdef USE_ENCRYPTION
+</I>><i> notice(s_NickServ, u->nick, "SENDPASS not avaliable");
+</I>><i> #else
+</I>><i> lock = fopen(".senpass.nick", "r");
+</I>><i> if (lock) {
+</I>><i> notice(s_NickServ, u->nick, "Sendpass is busy, try again later");
+</I>><i> fclose(lock);
+</I>><i> return ;
+</I>><i> }else if (!nick) {
+</I>><i> notice(s_NickServ, u->nick, "Sintax: /msg NickServ SENDPASS nick");
+</I>><i> return ;
+</I>><i> } else if (!(ni = findnick(nick))) {
+</I>><i> notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, nick);
+</I>><i> return ;
+</I>><i> } else if (nick_is_services_admin(ni) && !is_services_root(u)) {
+</I>><i> notice_lang(s_NickServ, u, PERMISSION_DENIED);
+</I>><i> return ;
+</I>><i> } else if (!ni->email) {
+</I>><i> notice(s_NickServ, u->nick, "No email set");
+</I>><i> return ;
+</I>><i> } else if (!strchr(ni->email, '@')) {
+</I>><i> notice(s_NickServ, u->nick, "bad email");
+</I>><i> return ;
+</I>><i> } else if(strlen(ni->email)>50) {
+</I>><i> notice(s_NickServ, u->nick, "bad email");
+</I>><i> return ;
+</I>><i> } else {
+</I>><i>
+</I>><i> char illsend[256];
+</I>><i> strcpy(illsend,"/usr/sbin/sendmail ");
+</I>><i> strcat(illsend, ni->email);
+</I>><i> strcat(illsend," < .sendpass.nick");
+</I>><i>
+</I>><i> tosend = fopen(".sendpass.nick", "w");
+</I>><i> if (tosend) {
+</I>><i> fprintf(tosend, "From: <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">brasirc at brasirc.com.br</A>\n");
+</I>><i> fprintf(tosend, "Subject: [%s] Password\n", ni->nick);
+</I>><i> fprintf(tosend, "\n");
+</I>><i> fprintf(tosend, "Dear user\n");
+</I>><i> fprintf(tosend, "yor nick %s password is:%s\n", ni->nick, ni->pass);
+</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");
+</I>><i> fprintf(tosend, "or join #BrasIRCOP\n");
+</I>><i> fprintf(tosend, "\n");
+</I>><i> fprintf(tosend, "BrasIRC.com.br network");
+</I>><i> fprintf(tosend,".\n"); /* this get us out on sendmail */
+</I>><i> fclose(tosend);
+</I>><i>
+</I>><i> system(illsend);
+</I>><i> system("rm -f .sendpass.nick");
+</I>><i>
+</I>><i> log("%s: %s!%s@%s used SENDPASS on %s email: %s", s_NickServ, u->nick,
+</I>><i> u ->username, u->host, nick, ni->email);
+</I>><i> if (WallGetpass)
+</I>><i> wallops(s_NickServ, "\2%s\2 used SENDPASS on \2%s\2, mail: %s",
+</I>><i> u->nick, nick, ni->email);
+</I>><i> } else { notice(s_NickServ, u->nick, "Ooops, Something gone
+</I>><i> wrong on SendPass");
+</I>><i> } }
+</I>><i> }
+</I>><i> #endif
+</I>><i>
+</I>><i> Fighter ircadmin irc.rionet.com.br
+</I>><i> Brasirc.com.br Network
+</I>><i> ---------------------------------------------------------------
+</I>><i> To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
+</I>><i> with "unsubscribe ircservices" in the body, without the quotes.
+</I>><i>
+</I>
+---------------------------------------------------------------
+To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
+with "unsubscribe ircservices" in the body, without the quotes.
+
+</PRE>
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="000186.html">[IRCServices] what do they think ?
+</A></li>
+ <LI>Next message: <A HREF="000188.html">[IRCServices] what do they think ?
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#187">[ date ]</a>
+ <a href="thread.html#187">[ thread ]</a>
+ <a href="subject.html#187">[ subject ]</a>
+ <a href="author.html#187">[ author ]</a>
+ </LI>
+ </UL>
+
+</body></html>