[IRCServices] [kfiresun@ix.netcom.com: Re: Services Root(s)]

Sean Kelly smkelly at zombie.org
Mon May 22 21:38:46 PDT 2000


This might answer the multiple services root question.  I digged it out of my
archive of the mailing list.

----- Forwarded message from "Kelmar K. Firesun" <kfiresun at ix.netcom.com> -----

Date: Sat, 24 Apr 1999 15:55:33 -0500
From: "Kelmar K. Firesun" <kfiresun at ix.netcom.com>
To: <services at dragonfire.net>
Subject: Re: Services Root(s)


-----Original Message-----
From: Michael Form <mikef at ot.com>
To: services at dragonfire.net <services at dragonfire.net>
Date: Saturday, April 24, 1999 3:04 PM
Subject: Services Root(s)


>How can I modify the code to allow more than 1 Services Root?
>
>

One way you can do this is to add a kludge to
the is_services_root() in the file operserv.c
function like so:



/*************************************************************************/

/* Does the given user have Services root privileges? */

int is_services_root(User *u)
{
    char s[512], *p, *c;

    /* Make a temp copy to work with */
    strcpy(s, ServicesRoot);

    c = s;

    while(*c)
    {
        p = strpbrk(c, " ");

        if (p != NULL)
        {
            *p++ = 0;
            while(isspace(*p)) p++;
        }
        else
            p = c + strlen(c);

        if (stricmp(u->nick, c) == 0)
            return 1;

        c = p;
    }

    return 0;
}

/* End of modification */

This will allow you to sperate the root users
by a space in the config file like so:

ServicesRoot "User1 User2 ... UserN"

Hope this helps!

Kelmar K. Firesun
IRCop EsperNet (kelmar at esper.net)
dream.esper.net port 5555

----- End forwarded message -----

-- 
Sean Kelly <smkelly at zombie.org> or <smkelly at slashnet.org>
       PGP KeyID: 4AC781C7        ICQ UIN: 27955995
       EFAX: (603) 372-1638       IRC: drdink at SlashNET

---------------------------------------------------------------
To unsubscribe, send email to majordomo at ender.shadowfire.org
with "unsubscribe ircservices" in the body, without the quotes.