]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices/1999/000187.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices / 1999 / 000187.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices] what do they think ?
5 </TITLE>
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">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] what do they think ?</H1>
15 <B>Andrew Kempe</B>
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
18 </A><BR>
19 <I>Fri Oct 8 02:42:27 PDT 1999</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="000186.html">[IRCServices] what do they think ?
22 </A></li>
23 <LI>Next message: <A HREF="000188.html">[IRCServices] what do they think ?
24 </A></li>
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>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
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
36 correct?
37
38 This type of functionality is already being build into the next version of
39 IRC Services.
40
41 Andrew
42
43 On Thu, 7 Oct 1999, root of all evil wrote:
44
45 &gt;<i> i had wrote this function on my services, it is working well, but i wold like
46 </I>&gt;<i> to hear coments and sugestions on it
47 </I>&gt;<i>
48 </I>&gt;<i> it send password information to the nick email (ni-&gt;email) and i changed the
49 </I>&gt;<i> do_register, so users must give a mail
50 </I>&gt;<i>
51 </I>&gt;<i> the function is it :
52 </I>&gt;<i>
53 </I>&gt;<i> static void do_sendpass(User *u)
54 </I>&gt;<i> {
55 </I>&gt;<i> #ifndef USE_ENCRYPTION
56 </I>&gt;<i> char *nick = strtok(NULL, &quot; &quot;);
57 </I>&gt;<i> NickInfo *ni;
58 </I>&gt;<i> FILE *tosend;
59 </I>&gt;<i> FILE *lock;
60 </I>&gt;<i> #endif
61 </I>&gt;<i>
62 </I>&gt;<i> #ifdef USE_ENCRYPTION
63 </I>&gt;<i> notice(s_NickServ, u-&gt;nick, &quot;SENDPASS not avaliable&quot;);
64 </I>&gt;<i> #else
65 </I>&gt;<i> lock = fopen(&quot;.senpass.nick&quot;, &quot;r&quot;);
66 </I>&gt;<i> if (lock) {
67 </I>&gt;<i> notice(s_NickServ, u-&gt;nick, &quot;Sendpass is busy, try again later&quot;);
68 </I>&gt;<i> fclose(lock);
69 </I>&gt;<i> return ;
70 </I>&gt;<i> }else if (!nick) {
71 </I>&gt;<i> notice(s_NickServ, u-&gt;nick, &quot;Sintax: /msg NickServ SENDPASS nick&quot;);
72 </I>&gt;<i> return ;
73 </I>&gt;<i> } else if (!(ni = findnick(nick))) {
74 </I>&gt;<i> notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, nick);
75 </I>&gt;<i> return ;
76 </I>&gt;<i> } else if (nick_is_services_admin(ni) &amp;&amp; !is_services_root(u)) {
77 </I>&gt;<i> notice_lang(s_NickServ, u, PERMISSION_DENIED);
78 </I>&gt;<i> return ;
79 </I>&gt;<i> } else if (!ni-&gt;email) {
80 </I>&gt;<i> notice(s_NickServ, u-&gt;nick, &quot;No email set&quot;);
81 </I>&gt;<i> return ;
82 </I>&gt;<i> } else if (!strchr(ni-&gt;email, '@')) {
83 </I>&gt;<i> notice(s_NickServ, u-&gt;nick, &quot;bad email&quot;);
84 </I>&gt;<i> return ;
85 </I>&gt;<i> } else if(strlen(ni-&gt;email)&gt;50) {
86 </I>&gt;<i> notice(s_NickServ, u-&gt;nick, &quot;bad email&quot;);
87 </I>&gt;<i> return ;
88 </I>&gt;<i> } else {
89 </I>&gt;<i>
90 </I>&gt;<i> char illsend[256];
91 </I>&gt;<i> strcpy(illsend,&quot;/usr/sbin/sendmail &quot;);
92 </I>&gt;<i> strcat(illsend, ni-&gt;email);
93 </I>&gt;<i> strcat(illsend,&quot; &lt; .sendpass.nick&quot;);
94 </I>&gt;<i>
95 </I>&gt;<i> tosend = fopen(&quot;.sendpass.nick&quot;, &quot;w&quot;);
96 </I>&gt;<i> if (tosend) {
97 </I>&gt;<i> fprintf(tosend, &quot;From: <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">brasirc at brasirc.com.br</A>\n&quot;);
98 </I>&gt;<i> fprintf(tosend, &quot;Subject: [%s] Password\n&quot;, ni-&gt;nick);
99 </I>&gt;<i> fprintf(tosend, &quot;\n&quot;);
100 </I>&gt;<i> fprintf(tosend, &quot;Dear user\n&quot;);
101 </I>&gt;<i> fprintf(tosend, &quot;yor nick %s password is:%s\n&quot;, ni-&gt;nick, ni-&gt;pass);
102 </I>&gt;<i> fprintf(tosend, &quot;if u need help write to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">ajuda at brasirc.com.br</A>\n&quot;);
103 </I>&gt;<i> fprintf(tosend, &quot;or join #BrasIRCOP\n&quot;);
104 </I>&gt;<i> fprintf(tosend, &quot;\n&quot;);
105 </I>&gt;<i> fprintf(tosend, &quot;BrasIRC.com.br network&quot;);
106 </I>&gt;<i> fprintf(tosend,&quot;.\n&quot;); /* this get us out on sendmail */
107 </I>&gt;<i> fclose(tosend);
108 </I>&gt;<i>
109 </I>&gt;<i> system(illsend);
110 </I>&gt;<i> system(&quot;rm -f .sendpass.nick&quot;);
111 </I>&gt;<i>
112 </I>&gt;<i> log(&quot;%s: %s!%s@%s used SENDPASS on %s email: %s&quot;, s_NickServ, u-&gt;nick,
113 </I>&gt;<i> u -&gt;username, u-&gt;host, nick, ni-&gt;email);
114 </I>&gt;<i> if (WallGetpass)
115 </I>&gt;<i> wallops(s_NickServ, &quot;\2%s\2 used SENDPASS on \2%s\2, mail: %s&quot;,
116 </I>&gt;<i> u-&gt;nick, nick, ni-&gt;email);
117 </I>&gt;<i> } else { notice(s_NickServ, u-&gt;nick, &quot;Ooops, Something gone
118 </I>&gt;<i> wrong on SendPass&quot;);
119 </I>&gt;<i> } }
120 </I>&gt;<i> }
121 </I>&gt;<i> #endif
122 </I>&gt;<i>
123 </I>&gt;<i> Fighter ircadmin irc.rionet.com.br
124 </I>&gt;<i> Brasirc.com.br Network
125 </I>&gt;<i> ---------------------------------------------------------------
126 </I>&gt;<i> To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
127 </I>&gt;<i> with &quot;unsubscribe ircservices&quot; in the body, without the quotes.
128 </I>&gt;<i>
129 </I>
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 &quot;unsubscribe ircservices&quot; in the body, without the quotes.
133
134 </PRE>
135
136 <!--endarticle-->
137 <HR>
138 <P><UL>
139 <!--threads-->
140 <LI>Previous message: <A HREF="000186.html">[IRCServices] what do they think ?
141 </A></li>
142 <LI>Next message: <A HREF="000188.html">[IRCServices] what do they think ?
143 </A></li>
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>
149 </LI>
150 </UL>
151
152 </body></html>