Page 1 of 1

Hiding the services(Anope) from Operators Online

Posted: Wed May 11, 2005 8:24 am
by renafuse
-->This Is Not An Offical Anope Mod, Use at own risk<--
-----------------------------------------------------------------------------------------
I kept having people say i have 8 ircops online because it says "Operators Online ( 8 )" and it was only the services so i went hunting and i found a form that says to edit the source of anope, so i looked through the files and finaly found it so heres what u do. you gota edit the source of anope im using version 1.3.6.
For Unreal Only
ok
Step 1: open init.c in a editor ie. "ee init.c"
Step 2: look for this

Code: Select all

if (!user || stricmp(user, s_NickServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_NickServ, desc_NickServ, "+S");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_NickServ, desc_NickServ, "+oS");
#else
        NICK(s_NickServ, desc_NickServ, "+o");
#endif
    if (!user || stricmp(user, s_ChanServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_ChanServ, desc_ChanServ, "+S");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_ChanServ, desc_ChanServ, "+oS");
#else
        NICK(s_ChanServ, desc_ChanServ, "+o");
#endif

#ifdef HAS_VHOST
    if (s_HostServ && (!user || stricmp(user, s_HostServ) == 0))
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_HostServ, desc_HostServ, "+oS");
#else
        NICK(s_HostServ, desc_HostServ, "+o");
#endif
#endif

    if (!user || stricmp(user, s_MemoServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_MemoServ, desc_MemoServ, "+S");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_MemoServ, desc_MemoServ, "+oS");
#else
        NICK(s_MemoServ, desc_MemoServ, "+o");
#endif
    if (s_BotServ && (!user || stricmp(user, s_BotServ) == 0))
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_BotServ, desc_BotServ, "+S");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_BotServ, desc_BotServ, "+oS");
#else
        NICK(s_BotServ, desc_BotServ, "+o");
#endif
    if (!user || stricmp(user, s_HelpServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_HelpServ, desc_HelpServ, "+Sh");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_HelpServ, desc_HelpServ, "+oS");
#else
        NICK(s_HelpServ, desc_HelpServ, "+h");
#endif
    if (!user || stricmp(user, s_OperServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_OperServ, desc_OperServ, "+iS");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_OperServ, desc_OperServ, "+ioS");
#else
        NICK(s_OperServ, desc_OperServ, "+io");
#endif
    if (s_DevNull && (!user || stricmp(user, s_DevNull) == 0))
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3)
        NICK(s_DevNull, desc_DevNull, "+iS");
#else
        NICK(s_DevNull, desc_DevNull, "+i");
#endif
    if (!user || stricmp(user, s_GlobalNoticer) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_GlobalNoticer, desc_GlobalNoticer, "+iS");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_GlobalNoticer, desc_GlobalNoticer, "+ioS");
#else
        NICK(s_GlobalNoticer, desc_GlobalNoticer, "+io");
#endif


step 3: replace it with this

Code: Select all

if (!user || stricmp(user, s_NickServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_NickServ, desc_NickServ, "+S");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_NickServ, desc_NickServ, "+oHS");
#else
        NICK(s_NickServ, desc_NickServ, "+o");
#endif
    if (!user || stricmp(user, s_ChanServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_ChanServ, desc_ChanServ, "+S");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_ChanServ, desc_ChanServ, "+oHS");
#else
        NICK(s_ChanServ, desc_ChanServ, "+o");
#endif

#ifdef HAS_VHOST
    if (s_HostServ && (!user || stricmp(user, s_HostServ) == 0))
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_HostServ, desc_HostServ, "+oHS");
#else
        NICK(s_HostServ, desc_HostServ, "+o");
#endif
#endif

    if (!user || stricmp(user, s_MemoServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_MemoServ, desc_MemoServ, "+S");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_MemoServ, desc_MemoServ, "+oHS");
#else
        NICK(s_MemoServ, desc_MemoServ, "+o");
#endif
    if (s_BotServ && (!user || stricmp(user, s_BotServ) == 0))
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_BotServ, desc_BotServ, "+S");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_BotServ, desc_BotServ, "+oHS");
#else
        NICK(s_BotServ, desc_BotServ, "+o");
#endif
    if (!user || stricmp(user, s_HelpServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_HelpServ, desc_HelpServ, "+Sh");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_HelpServ, desc_HelpServ, "+oHS");
#else
        NICK(s_HelpServ, desc_HelpServ, "+h");
#endif
    if (!user || stricmp(user, s_OperServ) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_OperServ, desc_OperServ, "+iS");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_OperServ, desc_OperServ, "+ioHS");
#else
        NICK(s_OperServ, desc_OperServ, "+io");
#endif
    if (s_DevNull && (!user || stricmp(user, s_DevNull) == 0))
#if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_ULTIMATE3)
        NICK(s_DevNull, desc_DevNull, "+iS");
#else
        NICK(s_DevNull, desc_DevNull, "+i");
#endif
    if (!user || stricmp(user, s_GlobalNoticer) == 0)
#if defined(IRC_ULTIMATE) || defined(IRC_ULTIMATE3)
        NICK(s_GlobalNoticer, desc_GlobalNoticer, "+iS");
#elif defined(IRC_UNREAL) || defined(IRC_VIAGRA)
        NICK(s_GlobalNoticer, desc_GlobalNoticer, "+ioHS");
#else
        NICK(s_GlobalNoticer, desc_GlobalNoticer, "+io");
#endif
Step 4: save and recompile ie: gmake
Step 5: reinstall ie: gmake install
Step 6: restart the services ie: /msg operserv restart

now if you did it correctly the services (Chanserv, Nickserv,Hostserv,Memoserv,Helpserv,Botserv,Operserv and Global) will automaticly add +H to them self and they will all be hidden as ircops and they shouldnt be in the Operators Online (#) anymore if you need anymore help just email me at [email protected] :D
---------------------------------------------------------------------------------------
-->This Is Not An Offical Anope Mod, Use at own risk<--

Posted: Wed May 11, 2005 11:23 am
by dotslasher
it would be nice if Unrealircd would just hide Ulined servers from the /lusers Oper count and maybe hide them totally from /lusers

Maybe in the next release, including an option to hide or not hide them.

Posted: Wed May 11, 2005 6:32 pm
by renafuse
ya i agree

Posted: Wed May 11, 2005 7:54 pm
by Stealth
I don't think you need to do so much code modification. You should be able to just change the services usermodes in the #define in the source. If you remove the "o", the services clients will not be counted. IIRC U:Lines don't need oper status with Unreal.

Posted: Thu May 12, 2005 12:26 am
by renafuse
Stealth wrote:I don't think you need to do so much code modification. You should be able to just change the services usermodes in the #define in the source. If you remove the "o", the services clients will not be counted. IIRC U:Lines don't need oper status with Unreal.
true but if u do that it will cause probs for when the services are compiled... and will result in a stop code

Posted: Thu May 12, 2005 2:48 am
by Syzop
I don't suggest removing +o, adding +H is the way to go -- just in case for some cmds.
Too bad anope doesn't have a simple option or something... If I'm not mistaken it's only changing 1 line in ircservices (still, not a config option). That said, in anope 1.7* all lines are below each other in src/unreal32.c, so that's easy to edit ;).

Our current hideoper code is already a mess (but it's working), so don't expect this "hide opers on ulines" feature in 3.2*. Actually, several people asked to also hide it from the (normal) usercount as well (understandibly). But I don't want to introduce possible bugs just for this "cosmetic" feature(s) in 3.2*, in 3.3* I presume it will be present however since I agree it's a good idea/useful feature.

Posted: Thu May 12, 2005 6:53 am
by renafuse
Syzop wrote:I don't suggest removing +o, adding +H is the way to go -- just in case for some cmds.
Too bad anope doesn't have a simple option or something... If I'm not mistaken it's only changing 1 line in ircservices (still, not a config option). That said, in anope 1.7* all lines are below each other in src/unreal32.c, so that's easy to edit ;).

Our current hideoper code is already a mess (but it's working), so don't expect this "hide opers on ulines" feature in 3.2*. Actually, several people asked to also hide it from the (normal) usercount as well (understandibly). But I don't want to introduce possible bugs just for this "cosmetic" feature(s) in 3.2*, in 3.3* I presume it will be present however since I agree it's a good idea/useful feature.
wow ur alot nicer then the people on anope here's what the main guy said
and just to remind people, _anyone_ who does this, will get no support at all from anyone at anope - if you modify the source your on your own, whatever goes wrong.
and
no we shouldnt, if your ircd dosnt want to include ulineed clients in the lusers output, your _ircd_ should not include ulined clients in the lusers output. On top of which, you assume that viagra has a +H umode, and that it does the same thing as unreal in the above code.
and u can view that post here http://www.anope.org/postt2094.html and i think that guy was/is verry rude but all and all i think it would be a good idea to hide the ulines if posable because it causes probs when people think u have 8 ircops and those are just the services....

Posted: Thu May 12, 2005 11:17 pm
by w00t
He raises a good point though. If that modification (however unlikely) causes problems in general, and stops things working - then can you imagine how frustrating it would be to spend hours trying to fix those problems only to find it was the result of modified software - and the bug was in those modifications? Unreal has the same rule - if you modify Unreal, you aren't supported.

Yes, it does cause problems - but then IRC wasn't originally designed with u:lines so this was never originally considered. Now it's quite a sticky issue, especially if you get some whacky services which introduces more than one server (and pseudoclients on it). There's a lot to consider here.

Posted: Thu May 12, 2005 11:30 pm
by Shelluser
First of all I don't understand what the fuss is all about. Quantity != quality, if people whine about you having too many opers online just tell them to "/whois chanserv" and be done with it, most experienced IRC'ers will already know very well that some services also have oper status. The moment an IRC network presents services you know that not every o:line is per definition an actual oper.

Which brings me to my first issue; who would have a problem with this ? If you run a server which has 20 users and 40 opers and your users are satisfied I really fail to see the problem.

Anyway, according to the thread it probably wouldn't work for me since I'm using 1.7.9 on which the module would have no effect.