Tekil Mesaj gösterimi
Alt 04 Ağustos 2015, 23:33   #1
Entrance
タネル
 
Entrance - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: 23 Ocak 2003
Bulunduğu yer: istanbul
Mesajlar: 540
WEB Sitesi: *
IRC Sunucusu: *
İlgi Alanı: Unreal
Alınan Beğeni: 361
Standart ROOT Admin Rütbesi Oluşturma..

Merhaba arkadaşlar,

Öncelikle bu bir vhost veya benzeri bir host oluşturma işlemi değildir. Tamamen UnrealIRCd'in protokollerine yeni bir admin rütbesi oluşturmaktır. Uzunca bir düzenleme olacağından, yedeklerinizi almanızı tavsiye ediyorum.

Klasör: -> Unreal3.2/src/
Dosya: -> (umodes.c)

BULUN,
Kod:
long UMODE_NETADMIN = 0L;      /* Network Admin */

ÜSTÜNE,
Kod:
long UMODE_ROOTADMIN = 0L;      /* Root Admin */

EKLEYIN,

-

BULUN,
Kod:
    UmodeAdd(NULL, 'N', UMODE_GLOBAL, umode_allow_opers, &UMODE_NETADMIN);

ÜSTÜNE,
Kod:
    UmodeAdd(NULL, 'U', UMODE_GLOBAL, umode_allow_opers, &UMODE_ROOTADMIN);

EKLEYIN,

-

Klasör: -> Unreal3.2/src/
Dosya: -> (updconf.c)

BULUN,
Kod:
    { 'N', "netadmin"},

ÜSTÜNE,
Kod:
    { 'U', "rootadmin"},

EKLEYIN,

-


Klasör: -> Unreal3.2/src/
Dosya: -> (s_svs.c)

BULUN,
Kod:
#define STAR1 OFLAG_SADMIN|OFLAG_ADMIN|OFLAG_NETADMIN|OFLAG_COADMIN

DEGISTIRIN,
Kod:
#define STAR1 OFLAG_SADMIN|OFLAG_ADMIN|OFLAG_NETADMIN|OFLAG_ROOTADMIN|OFLAG_COADMIN


-

BULUN,
Kod:
    OFLAG_NETADMIN, 'N',

ÜSTÜNE,
Kod:
    OFLAG_ROOTADMIN, 'U',

EKLEYIN,

-

Klasör: -> Unreal3.2/src/
Dosya: -> (s_conf.c)

BULUN,
Kod:
    OFLAG_NADMIN, 'N',

ÜSTÜNE,
Kod:
    OFLAG_SROOT, 'U',

EKLEYIN,

-

BULUN,
Kod:
  { OFLAG_NADMIN,        "netadmin"},
ÜSTÜNE,
Kod:
    { OFLAG_SROOT,        "rootadmin"},

EKLEYIN,

-

BULUN,
Kod:
    ircfree(i->network.x_netadmin_host);

ÜSTÜNE,
Kod:
                  ircfree(i->network.x_rootadmin_host);

EKLEYIN,

-

BULUN,
Kod:
if (!settings.has_hosts_netadmin)
        Error("set::hosts::netadmin is missing");

ÜSTÜNE,
Kod:
                   if (!settings.has_hosts_rootadmin)
        Error("set::hosts::rootadmin is missing");

EKLEYIN,

-

BULUN,
Kod:
    else if (!strcmp(cepp->ce_varname, "netadmin")) {
                    ircstrdup(tempiConf.network.x_netadmin_host, cepp->ce_vardata);
                }

ÜSTÜNE,
Kod:
    else if (!strcmp(cepp->ce_varname, "rootadmin")) {
                    ircstrdup(tempiConf.network.x_rootadmin_host, cepp->ce_vardata);
                }

EKLEYIN,

-

BULUN,
Kod:
else if (!strcmp(cepp->ce_varname, "netadmin")) {
                    CheckDuplicate(cepp, hosts_netadmin, "hosts::netadmin");
                }

ÜSTÜNE,
Kod:
else if (!strcmp(cepp->ce_varname, "rootadmin")) {
                    CheckDuplicate(cepp, hosts_rootadmin, "hosts::rootadmin");
                }

EKLEYIN,

Klasör: -> Unreal3.2/include/
Dosya: -> (h.h)

BULUN,
Kod:
extern MODVAR long UMODE_NETADMIN;  /* 0x10000     Network Admin */

ÜSTÜNE,
Kod:
extern MODVAR long UMODE_ROOTADMIN;  /* 0x20000  Root Admin */
EKLEYIN,

-

Klasör: -> Unreal3.2/include/
Dosya: -> (dynconf.h)

BULUN,
Kod:
    char *x_netadmin_host;

ÜSTÜNE,
Kod:
    char *x_rootadmin_host;

EKLEYIN,

-

BULUN,
Kod:
#define netadmin_host        iConf.network.x_netadmin_host

ÜSTÜNE,
Kod:
#define rootadmin_host        iConf.network.x_rootadmin_host

EKLEYIN,

-

BULUN,
Kod:
    unsigned has_hosts_netadmin:1;

ÜSTÜNE,
Kod:
    unsigned has_hosts_rootadmin:1;

EKLEYIN,

-

Klasör: -> Unreal3.2/include/
Dosya: -> (struct.h)

BULUN,
Kod:
#define IsNetAdmin(x)        ((x)->umodes & UMODE_NETADMIN)

ÜSTÜNE,
Kod:
#define IsRootAdmin(x)        ((x)->umodes & UMODE_ROOTADMIN)

EKLEYIN,

-

BULUN,
Kod:
#define ClearNetAdmin(x)    ((x)->umodes &= ~UMODE_NETADMIN)

ÜSTÜNE,
Kod:
#define ClearRootAdmin(x)    ((x)->umodes &= ~UMODE_ROOTADMIN)

EKLEYIN,

-

BULUN,
Kod:
#define OFLAG_NETADMIN    0x00200000    /* netadmin gets +N */

ÜSTÜNE,
Kod:
#define OFLAG_ROOTADMIN    0x00100000    /* root admin +U */

EKLEYIN,

-

BULUN,
Kod:
#define OFLAG_NADMIN    (OFLAG_NETADMIN | OFLAG_SADMIN | OFLAG_ADMIN | OFLAG_GLOBAL | OFLAG_UMODEQ | OFLAG_DCCDENY)

ÜSTÜNE,
Kod:
#define OFLAG_SROOT     (OFLAG_ROOTADMIN | OFLAG_GLOBAL | OFLAG_UMODEQ | OFLAG_DCCDENY)

EKLEYIN,

-

BULUN,
Kod:
#define OPIsNetAdmin(x) ((x)->oflag & OFLAG_NETADMIN)

ÜSTÜNE,
Kod:
#define OPIsRootAdmin(x) ((x)->oflag & OFLAG_ROOTADMIN)

EKLEYIN,

-

BULUN,

Kod:
#define OPSSetNetAdmin(x) ((x)->oflag |= OFLAG_NETADMIN)

ÜSTÜNE,
Kod:
#define OPSSetRootAdmin(x) ((x)->oflag |= OFLAG_ROOTADMIN)

EKLEYIN,

-

BULUN,
Kod:
#define OPClearNetAdmin(x)    ((x)->oflag &= ~OFLAG_NETADMIN)

ÜSTÜNE,
Kod:
#define OPClearRootAdmin(x)    ((x)->oflag &= ~OFLAG_ROOTADMIN)

EKLEYIN,

-

BULUN,
Kod:
#define IsSkoAdmin(sptr) (IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr))
DEGISTIRIN,
Kod:
#define IsSkoAdmin(sptr)  (IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr) || IsRootAdmin(sptr))
Klasör: -> Unreal3.2/src/modules/
Dosya: -> (m_mode.c)

BULUN,
Kod:
if (!IsAnOper(sptr) && !IsServer(cptr))
    {
        sptr->umodes &= ~UMODE_WHOIS;
        ClearAdmin(sptr);
        ClearSAdmin(sptr);
        ClearNetAdmin(sptr);
        ClearHideOper(sptr);
        ClearCoAdmin(sptr);
        ClearHelpOp(sptr);
        ClearFailops(sptr);
    }

DEGISTIRIN,
Kod:
if (!IsAnOper(sptr) && !IsServer(cptr))
    {
        sptr->umodes &= ~UMODE_WHOIS;
        ClearAdmin(sptr);
        ClearSAdmin(sptr);
        ClearNetAdmin(sptr);
            ClearRootAdmin(sptr);
        ClearHideOper(sptr);
        ClearCoAdmin(sptr);
        ClearHelpOp(sptr);
        ClearFailops(sptr);
    }


-

BULUN,
Kod:
if (MyClient(sptr)) {
        if (IsAnOper(sptr)) {
            if (IsAdmin(sptr) && !OPIsAdmin(sptr))
                ClearAdmin(sptr);
            if (IsSAdmin(sptr) && !OPIsSAdmin(sptr))
                ClearSAdmin(sptr);
            if (IsNetAdmin(sptr) && !OPIsNetAdmin(sptr))
                ClearNetAdmin(sptr);
            if (IsCoAdmin(sptr) && !OPIsCoAdmin(sptr))
                ClearCoAdmin(sptr);
            if (MyClient(sptr) && (sptr->umodes & UMODE_SECURE)
                && !IsSecure(sptr))
                sptr->umodes &= ~UMODE_SECURE;
        }

DEGISTIRIN,
Kod:
if (MyClient(sptr)) {
        if (IsAnOper(sptr)) {
            if (IsAdmin(sptr) && !OPIsAdmin(sptr))
                ClearAdmin(sptr);
            if (IsSAdmin(sptr) && !OPIsSAdmin(sptr))
                ClearSAdmin(sptr);
            if (IsNetAdmin(sptr) && !OPIsNetAdmin(sptr))
                ClearNetAdmin(sptr);
                  if (IsRootAdmin(sptr) && !OPIsRootAdmin(sptr))
                ClearRootAdmin(sptr);
            if (IsCoAdmin(sptr) && !OPIsCoAdmin(sptr))
                ClearCoAdmin(sptr);
            if (MyClient(sptr) && (sptr->umodes & UMODE_SECURE)
                && !IsSecure(sptr))
                sptr->umodes &= ~UMODE_SECURE;
        }


-

Klasör: -> Unreal3.2/src/modules/
Dosya: -> (m_stats.c)

BULUN,
Kod:
sendto_one(sptr, ":%s %i %s :hosts::netadmin: %s", me.name, RPL_TEXT,
        sptr->name, netadmin_host);

ÜSTÜNE,
Kod:
sendto_one(sptr, ":%s %i %s :hosts::rootadmin: %s", me.name, RPL_TEXT,
        sptr->name, rootadmin_host);
EKLEYIN,

-

Klasör: -> Unreal3.2/src/modules/
Dosya: -> (m_svso.c)

BULUN,
Kod:
#define STAR1 OFLAG_SADMIN|OFLAG_ADMIN|OFLAG_NETADMIN|OFLAG_COADMIN

DEGISTIRIN,
Kod:
#define STAR1 OFLAG_SADMIN|OFLAG_ADMIN|OFLAG_NETADMIN|OFLAG_COADMIN|OFLAG_ROOTADMIN


-

BULUN,
Kod:
        OFLAG_NETADMIN, 'N',

ÜSTÜNE,
Kod:
        OFLAG_ROOTADMIN, 'U',

EKLEYIN,

-

BULUN,
Kod:
                    ~(UMODE_NETADMIN | UMODE_WHOIS);

DEGISTIRIN,
Kod:
                    ~(UMODE_NETADMIN | UMODE_ROOTADMIN | UMODE_WHOIS);


-

Klasör: -> Unreal3.2/src/modules/
Dosya: -> (m_whois.c)

BULUN,
Kod:
      if (IsNetAdmin(acptr))
                                        strlcat(buf, "is a Network Administrator", sizeof buf);
                                else if (IsSAdmin(acptr))
                                        strlcat(buf, "is a Services Administrator", sizeof buf);
                                else if (IsAdmin(acptr) && !IsCoAdmin(acptr))
                                        strlcat(buf, "is a Server Administrator", sizeof buf);
                                else if (IsCoAdmin(acptr))
                                        strlcat(buf, "is a Co Administrator", sizeof buf);
                                else if (IsServices(acptr))
                                        strlcat(buf, "is a Network Service", sizeof buf);
                                else if (IsOper(acptr))
                                        strlcat(buf, "an IRC Operator", sizeof buf);

DEGISTIRIN,
Kod:
 if (IsRootAdmin(acptr))
                                        strlcat(buf, "is a Root Administrator", sizeof buf);
                                else if (IsNetAdmin(acptr))
                                        strlcat(buf, "is a Network Administrator", sizeof buf);
                                else if (IsSAdmin(acptr))
                                        strlcat(buf, "is a Services Administrator", sizeof buf);
                                else if (IsAdmin(acptr) && !IsCoAdmin(acptr))
                                        strlcat(buf, "is a Server Administrator", sizeof buf);
                                else if (IsCoAdmin(acptr))
                                        strlcat(buf, "is a Co Administrator", sizeof buf);
                                else if (IsServices(acptr))
                                        strlcat(buf, "is a Network Service", sizeof buf);
                                else if (IsOper(acptr))
                                        strlcat(buf, "an IRC Operator", sizeof buf);


-

Klasör: -> Unreal3.2/src/modules/
Dosya: -> (webtv.c)

BULUN,
Kod:
 if (IsNetAdmin(acptr))
                    strcat(buf, "a Network Administrator");
                else if (IsSAdmin(acptr))
                    strcat(buf, "a Services Administrator");
                else if (IsAdmin(acptr) && !IsCoAdmin(acptr))
                    strcat(buf, "a Server Administrator");
                else if (IsCoAdmin(acptr))
                    strcat(buf, "a Co Administrator");
                else if (IsServices(acptr))
                    strcat(buf, "a Network Service");
                else if (IsOper(acptr))
                    strcat(buf, "an IRC Operator");

DEGISTIRIN,
Kod:
if (IsRootAdmin(acptr))
                    strcat(buf, "a Root Administrator");
                              else if (IsNetAdmin(acptr))
                    strcat(buf, "a Network Administrator");
                else if (IsSAdmin(acptr))
                    strcat(buf, "a Services Administrator");
                else if (IsAdmin(acptr) && !IsCoAdmin(acptr))
                    strcat(buf, "a Server Administrator");
                else if (IsCoAdmin(acptr))
                    strcat(buf, "a Co Administrator");
                else if (IsServices(acptr))
                    strcat(buf, "a Network Service");
                else if (IsOper(acptr))
                    strcat(buf, "an IRC Operator");


-


Klasör: -> Unreal3.2/src/modules/
Dosya: -> (m_svsnoop.c)
BULUN,
Kod:
 UMODE_NETADMIN | UMODE_WHOIS | UMODE_KIX |

DEGISTIRIN,
Kod:
UMODE_ROOTADMIN | UMODE_NETADMIN | UMODE_WHOIS | UMODE_KIX |
-

Klasör: -> Unreal3.2/src/modules/
Dosya: -> (m_who.c)

BULUN,
Kod:
*umodes = *umodes & (UMODE_OPER | UMODE_LOCOP | UMODE_SADMIN | UMODE_ADMIN | UMODE_COADMIN | UMODE_NETADMIN | UMODE_BOT);
DEGISTIRIN,
Kod:
*umodes = *umodes & (UMODE_OPER | UMODE_LOCOP | UMODE_SADMIN | UMODE_ADMIN | UMODE_COADMIN | UMODE_NETADMIN | UMODE_ROOTADMIN | UMODE_BOT);

-

Klasör: -> Unreal3.2/src/modules/
Dosya: -> (m_oper.c)

BULUN,
Kod:
oper_oflags[0].oflag = OFLAG_NETADMIN;
    oper_oflags[0].umode = &UMODE_NETADMIN;
    oper_oflags[0].host = &netadmin_host;
    oper_oflags[0].announce = "is now a network administrator (N)";
    oper_oflags[1].oflag = OFLAG_SADMIN;
    oper_oflags[1].umode = &UMODE_SADMIN;
    oper_oflags[1].host = &sadmin_host;
    oper_oflags[1].announce = "is now a services administrator (a)";
    oper_oflags[2].oflag = OFLAG_ADMIN;
    oper_oflags[2].umode = &UMODE_ADMIN;
    oper_oflags[2].host = &admin_host;
    oper_oflags[2].announce = "is now a server admin (A)";
    oper_oflags[3].oflag = OFLAG_COADMIN;
    oper_oflags[3].umode = &UMODE_COADMIN;
    oper_oflags[3].host = &coadmin_host;
    oper_oflags[3].announce = "is now a co administrator (C)";
    oper_oflags[4].oflag = OFLAG_ISGLOBAL;
    oper_oflags[4].umode = &UMODE_OPER;
    oper_oflags[4].host = &oper_host;
    oper_oflags[4].announce = "is now an operator (O)";
    oper_oflags[5].oflag = OFLAG_HELPOP;
    oper_oflags[5].umode = &UMODE_HELPOP;
    oper_oflags[5].host = NULL;
    oper_oflags[5].announce = NULL;
    oper_oflags[6].oflag= OFLAG_GLOBOP;
    oper_oflags[6].umode = &UMODE_FAILOP;
    oper_oflags[6].host = NULL;
    oper_oflags[6].announce = NULL;
    oper_oflags[7].oflag = OFLAG_WALLOP;
    oper_oflags[7].umode = &UMODE_WALLOP;
    oper_oflags[7].host = NULL;
    oper_oflags[7].announce = NULL;
    oper_oflags[8].oflag = OFLAG_WHOIS;
    oper_oflags[8].umode = &UMODE_WHOIS;
    oper_oflags[8].host = NULL;
    oper_oflags[8].announce = NULL;
    oper_oflags[9].oflag = 0;
    oper_oflags[9].umode = NULL;
    oper_oflags[9].host = NULL;
    oper_oflags[9].announce = NULL;

DEGISTIRIN,
Kod:
  
oper_oflags[0].oflag = OFLAG_ROOTADMIN;
oper_oflags[0].umode = &UMODE_ROOTADMIN;
oper_oflags[0].host = &rootadmin_host;
oper_oflags[0].announce = "is now a Root Administrator (U)";
oper_oflags[1].oflag = OFLAG_NETADMIN;
oper_oflags[1].umode = &UMODE_NETADMIN;
oper_oflags[1].host = &netadmin_host;
oper_oflags[1].announce = "is now a Network Administrator (N)";
oper_oflags[2].oflag = OFLAG_SADMIN;
oper_oflags[2].umode = &UMODE_SADMIN;
oper_oflags[2].host = &sadmin_host;
oper_oflags[2].announce = "is now a Services Administrator (a)";
oper_oflags[3].oflag = OFLAG_ADMIN;
oper_oflags[3].umode = &UMODE_ADMIN;
oper_oflags[3].host = &admin_host;
oper_oflags[3].announce = "is now a Server Administrator (A)";
oper_oflags[4].oflag = OFLAG_COADMIN;
oper_oflags[4].umode = &UMODE_COADMIN;
oper_oflags[4].host = &coadmin_host;
oper_oflags[4].announce = "is now a Co Administrator (C)";
oper_oflags[5].oflag = OFLAG_ISGLOBAL;
oper_oflags[5].umode = &UMODE_OPER;
oper_oflags[5].host = &oper_host;
oper_oflags[5].announce = "is now An Operator (O)";
oper_oflags[6].oflag = OFLAG_HELPOP;
oper_oflags[6].umode = &UMODE_HELPOP;
oper_oflags[6].host = NULL;
oper_oflags[6].announce = NULL;
oper_oflags[7].oflag= OFLAG_GLOBOP;
oper_oflags[7].umode = &UMODE_FAILOP;
oper_oflags[7].host = NULL;
oper_oflags[7].announce = NULL;
oper_oflags[8].oflag = OFLAG_WALLOP;
oper_oflags[8].umode = &UMODE_WALLOP;
oper_oflags[8].host = NULL;
oper_oflags[8].announce = NULL;
oper_oflags[9].oflag = OFLAG_WHOIS;
oper_oflags[9].umode = &UMODE_WHOIS;
oper_oflags[9].host = NULL;
oper_oflags[9].announce = NULL;
oper_oflags[10].oflag = 0;
oper_oflags[10].umode = NULL;
oper_oflags[10].host = NULL;
oper_oflags[10].announce = NULL;
Son olarak,

Klasör: -> Unreal3.2/
Dosya: -> (unrealircd.conf)

BULUN,
Kod:
                netadmin        "netadmin.lookjapan.com";

ÜSTÜNE,
Kod:
                rootadmin        "rootadmin.lookjapan.com";


EKLEYIN,
ilgili alanda make ve ./unreal restart komutlarını uygulayın.

NOT: RootAdmin flağı (-> U <-) olup, N flağınıda beraberinde kullanabilirsiniz..

İyi forumlar.. ^^

Konu Entrance tarafından (05 Aralık 2015 Saat 09:34 ) değiştirilmiştir.
 Entrance isimli Üye şimdilik offline konumundadır   Alıntı