]> jfr.im git - irc.git/blame - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices/2001/001940.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices / 2001 / 001940.html
CommitLineData
3bd189cb
JR
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2<HTML>
3 <HEAD>
4 <TITLE> [IRCServices] Linked nicks and Operserv
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Linked%20nicks%20and%20Operserv&In-Reply-To=F189Y4Mbjtvc9bOeGiq000085e5%40hotmail.com">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="001939.html">
11 <LINK REL="Next" HREF="001941.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] Linked nicks and Operserv</H1>
15 <B>Yusuf Iskenderoglu</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Linked%20nicks%20and%20Operserv&In-Reply-To=F189Y4Mbjtvc9bOeGiq000085e5%40hotmail.com"
17 TITLE="[IRCServices] Linked nicks and Operserv">uhc0 at rz.uni-karlsruhe.de
18 </A><BR>
19 <I>Tue May 29 17:35:05 PDT 2001</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="001939.html">[IRCServices] Linked nicks and Operserv
22</A></li>
23 <LI>Next message: <A HREF="001941.html">[IRCServices] Linked nicks and Operserv
24</A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#1940">[ date ]</a>
27 <a href="thread.html#1940">[ thread ]</a>
28 <a href="subject.html#1940">[ subject ]</a>
29 <a href="author.html#1940">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33<!--beginarticle-->
34<PRE>Here is the place in the code, checking who is
35services admin.
36
37/* Does the given user have Services admin privileges? */
38
39int is_services_admin(User *u)
40{
41 int i;
42
43 if (!is_oper_u(u))
44 return 0;
45 if (is_services_root(u))
46 return 1;
47 if (skeleton)
48 return 1;
49 for (i = 0; i &lt; MAX_SERVADMINS; i++) {
50 if (services_admins[i] &amp;&amp; u-&gt;ni == getlink(services_admins[i])) {
51 if (nick_identified(u))
52 return 1;
53 return 0;
54 }
55 }
56 return 0;
57}
58
59
60I am absolutely sure that I did not modify this section.
61
62The correct code could be:
63if (services_admins[i] &amp;&amp; services_admins[i] == getlink(u-&gt;ni)) {
64
65And this is working, because the nick change changes the value
66of u-&gt;ni to getlink(u-&gt;real_ni)
67
68In my case, u-&gt;ni points to TimeMr14C, because getlink(Enygma)
69return TimeMr14C.
70
71That means, because TimeMr14C as a Services Admin exists,
72AND TimeMr14C (value of u-&gt;ni) equals to TimeMr14C (value of
73getlink(TimeMr14C))
74AND I have identified to NickServ, I get recognised as a
75services admin.
76
77Regards;
78yusuf
79
80
81Yusuf Iskenderoglu *** eMail <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices">uhc0 at rz.uni-karlsruhe.de</A>
82
83
84
85</PRE>
86
87<!--endarticle-->
88 <HR>
89 <P><UL>
90 <!--threads-->
91 <LI>Previous message: <A HREF="001939.html">[IRCServices] Linked nicks and Operserv
92</A></li>
93 <LI>Next message: <A HREF="001941.html">[IRCServices] Linked nicks and Operserv
94</A></li>
95 <LI> <B>Messages sorted by:</B>
96 <a href="date.html#1940">[ date ]</a>
97 <a href="thread.html#1940">[ thread ]</a>
98 <a href="subject.html#1940">[ subject ]</a>
99 <a href="author.html#1940">[ author ]</a>
100 </LI>
101 </UL>
102
103</body></html>