]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices/1999/000186.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices / 1999 / 000186.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=">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="000185.html">
11 <LINK REL="Next" HREF="000187.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] what do they think ?</H1>
15 <B>root of all evil</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20what%20do%20they%20think%20%3F&In-Reply-To="
17 TITLE="[IRCServices] what do they think ?">climber at rionet.com.br
18 </A><BR>
19 <I>Thu Oct 7 13:46:37 PDT 1999</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="000185.html">[IRCServices] New IRC protocol revised
22 </A></li>
23 <LI>Next message: <A HREF="000187.html">[IRCServices] what do they think ?
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#186">[ date ]</a>
27 <a href="thread.html#186">[ thread ]</a>
28 <a href="subject.html#186">[ subject ]</a>
29 <a href="author.html#186">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>i had wrote this function on my services, it is working well, but i wold like
35 to hear coments and sugestions on it
36
37 it send password information to the nick email (ni-&gt;email) and i changed the
38 do_register, so users must give a mail
39
40 the function is it :
41
42 static void do_sendpass(User *u)
43 {
44 #ifndef USE_ENCRYPTION
45 char *nick = strtok(NULL, &quot; &quot;);
46 NickInfo *ni;
47 FILE *tosend;
48 FILE *lock;
49 #endif
50
51 #ifdef USE_ENCRYPTION
52 notice(s_NickServ, u-&gt;nick, &quot;SENDPASS not avaliable&quot;);
53 #else
54 lock = fopen(&quot;.senpass.nick&quot;, &quot;r&quot;);
55 if (lock) {
56 notice(s_NickServ, u-&gt;nick, &quot;Sendpass is busy, try again later&quot;);
57 fclose(lock);
58 return ;
59 }else if (!nick) {
60 notice(s_NickServ, u-&gt;nick, &quot;Sintax: /msg NickServ SENDPASS nick&quot;);
61 return ;
62 } else if (!(ni = findnick(nick))) {
63 notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, nick);
64 return ;
65 } else if (nick_is_services_admin(ni) &amp;&amp; !is_services_root(u)) {
66 notice_lang(s_NickServ, u, PERMISSION_DENIED);
67 return ;
68 } else if (!ni-&gt;email) {
69 notice(s_NickServ, u-&gt;nick, &quot;No email set&quot;);
70 return ;
71 } else if (!strchr(ni-&gt;email, '@')) {
72 notice(s_NickServ, u-&gt;nick, &quot;bad email&quot;);
73 return ;
74 } else if(strlen(ni-&gt;email)&gt;50) {
75 notice(s_NickServ, u-&gt;nick, &quot;bad email&quot;);
76 return ;
77 } else {
78
79 char illsend[256];
80 strcpy(illsend,&quot;/usr/sbin/sendmail &quot;);
81 strcat(illsend, ni-&gt;email);
82 strcat(illsend,&quot; &lt; .sendpass.nick&quot;);
83
84 tosend = fopen(&quot;.sendpass.nick&quot;, &quot;w&quot;);
85 if (tosend) {
86 fprintf(tosend, &quot;From: <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">brasirc at brasirc.com.br</A>\n&quot;);
87 fprintf(tosend, &quot;Subject: [%s] Password\n&quot;, ni-&gt;nick);
88 fprintf(tosend, &quot;\n&quot;);
89 fprintf(tosend, &quot;Dear user\n&quot;);
90 fprintf(tosend, &quot;yor nick %s password is:%s\n&quot;, ni-&gt;nick, ni-&gt;pass);
91 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;);
92 fprintf(tosend, &quot;or join #BrasIRCOP\n&quot;);
93 fprintf(tosend, &quot;\n&quot;);
94 fprintf(tosend, &quot;BrasIRC.com.br network&quot;);
95 fprintf(tosend,&quot;.\n&quot;); /* this get us out on sendmail */
96 fclose(tosend);
97
98 system(illsend);
99 system(&quot;rm -f .sendpass.nick&quot;);
100
101 log(&quot;%s: %s!%s@%s used SENDPASS on %s email: %s&quot;, s_NickServ, u-&gt;nick,
102 u -&gt;username, u-&gt;host, nick, ni-&gt;email);
103 if (WallGetpass)
104 wallops(s_NickServ, &quot;\2%s\2 used SENDPASS on \2%s\2, mail: %s&quot;,
105 u-&gt;nick, nick, ni-&gt;email);
106 } else { notice(s_NickServ, u-&gt;nick, &quot;Ooops, Something gone
107 wrong on SendPass&quot;);
108 } }
109 }
110 #endif
111
112 Fighter ircadmin irc.rionet.com.br
113 Brasirc.com.br Network
114 ---------------------------------------------------------------
115 To unsubscribe, send email to <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">majordomo at ender.shadowfire.org</A>
116 with &quot;unsubscribe ircservices&quot; in the body, without the quotes.
117
118 </PRE>
119
120 <!--endarticle-->
121 <HR>
122 <P><UL>
123 <!--threads-->
124 <LI>Previous message: <A HREF="000185.html">[IRCServices] New IRC protocol revised
125 </A></li>
126 <LI>Next message: <A HREF="000187.html">[IRCServices] what do they think ?
127 </A></li>
128 <LI> <B>Messages sorted by:</B>
129 <a href="date.html#186">[ date ]</a>
130 <a href="thread.html#186">[ thread ]</a>
131 <a href="subject.html#186">[ subject ]</a>
132 <a href="author.html#186">[ author ]</a>
133 </LI>
134 </UL>
135
136 </body></html>