Giriş

Orijinalini görmek için tıklayınız : ROOT Admin Rütbesi Oluşturma..


Entrance
04 Ağustos 2015, 23:33
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,
long UMODE_NETADMIN = 0L; /* Network Admin */

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

EKLEYIN,

-

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

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

EKLEYIN,

-

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

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

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

EKLEYIN,

-


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

BULUN,
#define STAR1 OFLAG_SADMIN|OFLAG_ADMIN|OFLAG_NETADMIN|OFLAG_COAD MIN

DEGISTIRIN,
#define STAR1 OFLAG_SADMIN|OFLAG_ADMIN|OFLAG_NETADMIN|OFLAG_ROOT ADMIN|OFLAG_COADMIN


-

BULUN,
OFLAG_NETADMIN, 'N',

ÜSTÜNE,
OFLAG_ROOTADMIN, 'U',

EKLEYIN,

-

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

BULUN,
OFLAG_NADMIN, 'N',

ÜSTÜNE,
OFLAG_SROOT, 'U',

EKLEYIN,

-

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

EKLEYIN,

-

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

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

EKLEYIN,

-

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

if (!settings.has_hosts_rootadmin)
Error("set::hosts::rootadmin is missing");
EKLEYIN,

-

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

-

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

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

EKLEYIN,

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

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

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

-

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

BULUN,
char *x_netadmin_host;

ÜSTÜNE,
char *x_rootadmin_host;

EKLEYIN,

-

BULUN,
#define netadmin_host iConf.network.x_netadmin_host

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

EKLEYIN,

-

BULUN,
unsigned has_hosts_netadmin:1;

ÜSTÜNE,
unsigned has_hosts_rootadmin:1;

EKLEYIN,

-

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

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

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

EKLEYIN,

-

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

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

EKLEYIN,

-

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

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

EKLEYIN,

-

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

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

EKLEYIN,

-

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

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

EKLEYIN,

-

BULUN,
#define OPSSetNetAdmin(x) ((x)->oflag |= OFLAG_NETADMIN)

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

EKLEYIN,

-

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

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

EKLEYIN,

-

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

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

DEGISTIRIN,
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,
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,
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,
sendto_one(sptr, ":%s %i %s :hosts::netadmin: %s", me.name, RPL_TEXT,
sptr->name, netadmin_host);
ÜSTÜNE,
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,
#define STAR1 OFLAG_SADMIN|OFLAG_ADMIN|OFLAG_NETADMIN|OFLAG_COAD MIN

DEGISTIRIN,
#define STAR1 OFLAG_SADMIN|OFLAG_ADMIN|OFLAG_NETADMIN|OFLAG_COAD MIN|OFLAG_ROOTADMIN


-

BULUN,
OFLAG_NETADMIN, 'N',

ÜSTÜNE,
OFLAG_ROOTADMIN, 'U',

EKLEYIN,

-

BULUN,
~(UMODE_NETADMIN | UMODE_WHOIS);

DEGISTIRIN,
~(UMODE_NETADMIN | UMODE_ROOTADMIN | UMODE_WHOIS);


-

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

BULUN,
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,
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,
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,
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,
UMODE_NETADMIN | UMODE_WHOIS | UMODE_KIX |

DEGISTIRIN,
UMODE_ROOTADMIN | UMODE_NETADMIN | UMODE_WHOIS | UMODE_KIX |
-

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

BULUN,
*umodes = *umodes & (UMODE_OPER | UMODE_LOCOP | UMODE_SADMIN | UMODE_ADMIN | UMODE_COADMIN | UMODE_NETADMIN | UMODE_BOT);
DEGISTIRIN,
*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,
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,


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,
netadmin "netadmin.lookjapan.com";

ÜSTÜNE,
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.. ^^

Toprak
04 Ağustos 2015, 23:34
Eline sağlık kanka işte aranılan root eklentisi :))

Vesaire
04 Ağustos 2015, 23:48
Ellerine sağlık uzunca süredir aranılan bir konuya fazlası ile açıklama yaparak bizlere sunduğun için teşekkürler.Başarılarının devamını temenni eder yapamaz edemez diyenlere sağlam bir kapak oldu...

Entrance
05 Ağustos 2015, 21:30
Güle güle kullanın arkadaşlar, tekrardan kodlar üzerinde bazı düzenlemeler yaptım. Foruma eklerken sıkıntılar olabiliyor. İlgili kodlarda uzun olunca gözden çok şey kaçabiliyor.

İyi forumlar dilerim.. ^^

Code
09 Kasım 2015, 22:49
Eline saglik, 10 numarasın :)

Toprak
18 Eylül 2016, 17:10
Birde +J yapsan taner Teknik admin flagı olur :D

dEathLeSs
18 Eylül 2016, 17:39
Aynı mantıkla kopyala yapıştır yaparak yapabilirsin :D

AdmiraL
21 Aralık 2016, 03:00
merhaba şimdi ben bir kac rütbe olusturuyorum fakat flaglarımı yapamadım bılemıyrum

long UMODE_NETADMIN = 0L; /* Network Admin */


ÜSTÜNE,
Kod:

long UMODE_ROOTADMIN = 0L; /* Root Admin */


bu kısımlar gibi rootadminin üstüne ekledım hersey guzel eklendı belirledigim flaglarıda opers.confa ekledım ama hangı flagı yaptıysam olmadı rütbeler görünmedi sadece bu root admın ve teknik admin dısında bir rütbe görülmüyor rütbeler eklendigi halde

YouMyCure
23 Kasım 2018, 17:18
Cannot join channel #Karantina (Admin only)
Cannot join channel #xLine (Admin only)
Cannot join channel #Opers (Admin only)

Gibi oper girince kanala girememe hatası alanlar, sanırım kodları paste ederken dalgınlık olmuş çözüm için;

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

#define IsSkoAdmin(sptr) IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr) || IsRootAdmin(sptr)
olarak eklediğiniz satırı şu şekilde değiştirin;
#define IsSkoAdmin(sptr) (IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr) || IsRootAdmin(sptr))

make ve restart atın