Giriş

Orijinalini görmek için tıklayınız : Oper giriş bildirimleri..


dEathLeSs
26 Haziran 2017, 09:37
Burada ([Only Registered Users Can See Links]) Unreal3.2.x versionları için yapılmış olan bildirimlerinin, Unreal4 için düzenlenmiş hâlidir.

Düzenlemeleri gösterecek olursak..

CMD_FUNC(m_oper);

satırının altına

#define KANAL "#opers"
aChannel *chptr;

Ekleyelim..


sendto_snomask_global(SNO_OPER,
"%s (%s@%s) [%s] is now an operator",
sptr->name, sptr->user->username, sptr->local->sockhost,
parv[1]);

satırının altına;

if ((chptr = find_channel(KANAL, NULL)))
sendto_channel_butserv(chptr, &me, ":Monitor PRIVMSG %s :%s (%s@%s) [%s] is now an operator", chptr->name, sptr->user->username, sptr->local->sockhost,
parv[1]);

Ekleyelim..

(SNO_OPER, "Failed OPER attempt by %s (%s@%s) [unknown oper]",
sptr->name, sptr->user->username, sptr->local->sockhost);

altına..



if ((chptr = find_channel(KANAL, NULL)))
sendto_channel_butserv(chptr, &me, ":Monitor PRIVMSG %s :Failed OPER attempt by %s (%s@%s) [unknown oper]",
chptr->chname, sptr->name, sptr->user->username, sptr->local->sockhost);

Ekleyelim..

(SNO_OPER, "Failed OPER attempt by %s (%s@%s) using UID %s [host doesnt match]",
sptr->name, sptr->user->username, sptr->local->sockhost, name);

satırının altına..

if ((chptr = find_channel(KANAL, NULL)))
sendto_channel_butserv(chptr, &me, ":Monitor PRIVMSG %s : Failed OPER attempt by %s (%s@%s) using UID %s [host doesnt match] ",
chptr->chname, sptr->name, sptr->user->username, sptr->local->sockhost, name);

ekleyelim..

sendto_snomask_global
(SNO_OPER, "Failed OPER attempt by %s (%s@%s) using UID %s [FAILEDAUTH]",
sptr->name, sptr->user->username, sptr->local->sockhost, name);

Satırının altına..

if ((chptr = find_channel(KANAL, NULL)))
sendto_channel_butserv(chptr, &me, ":Monitor PRIVMSG %s :Failed OPER attempt by %s (%s@%s) using UID %s [FAILEDAUTH]",
chptr->chname, sptr->name, sptr->user->username, sptr->local->sockhost, name);

Ekleyelim..

(SNO_OPER, "Failed OPER attempt by %s (%s@%s) [lacking modes '%s' in oper::require-modes]",
sptr->name, sptr->user->username, sptr->local->sockhost, get_modestr(operblock->require_modes & ~sptr->umodes));

satırının altına...

if ((chptr = find_channel(KANAL, NULL)))
sendto_channel_butserv(chptr, &me, ":Monitor PRIVMSG %s : Failed OPER attempt by %s (%s@%s) [lacking modes '%s' in oper::require-modes] ",
chptr->chname, sptr->name, sptr->user->username, sptr->local->sockhost, get_modestr(operblock->require_modes & ~sptr->umodes));

Ekleyelim..

(SNO_OPER, "Failed OPER attempt by %s (%s@%s) [oper::operclass does not exist: '%s']",
sptr->name, sptr->user->username, sptr->local->sockhost, operblock->operclass);

Satırının altına...

if ((chptr = find_channel(KANAL, NULL)))
sendto_channel_butserv(chptr, &me, ":Monitor PRIVMSG %s : Failed OPER attempt by %s (%s@%s) [oper::operclass does not exist: '%s']",
chptr->chname, sptr->name, sptr->user->username, sptr->local->sockhost, operblock->operclass);

ekleyelim...(SNO_OPER, "Failed OPER attempt by %s (%s@%s) using UID %s [maxlogins reached]",
sptr->name, sptr->user->username, sptr->local->sockhost, name);

satırının altına...

if ((chptr = find_channel(KANAL, NULL)))
sendto_channel_butserv(chptr, &me, ":Monitor PRIVMSG %s : Failed OPER attempt by %s (%s@%s) using UID %s [maxlogins reached]",
chptr->chname, sptr->name, sptr->user->username, sptr->local->sockhost, name);

ekleyelim...



Extra olarak;

if (do_cmd(cptr, sptr, "JOIN", 3, chans) == FLUSH_BUFFER)
return FLUSH_BUFFER;

satırının altına

#define OKU "../conf/oper.motd"
FILE *dosya;
char buf[BUFSIZE];
dosya = fopen(OKU, "r");
if (dosya != NULL) {
while (fgets(buf, sizeof(buf), dosya)) {
buf[strlen(buf)-1] = 0;
sendto_one(sptr, ":OPERMOTD PRIVMSG %s :%s", sptr->name, buf);
}
}

Ekleyiniz..
unrealircd/conf/ klasörünün içeriğine oper.motd şeklinde belge oluşturarak, operlere bildirim mesajı yollayabilirsiniz.

unrealircd-4.0.x ana dizininde make ve make install komutunu uyguladıktan sonra,
sunucumuza ./unrealircd rehash yapıyoruz.

<Monitor> KelebekvSohbet33338 (LaZ@xx) [dEathLeSs] is now an operator

<Monitor> Failed OPER attempt by KelebekvSohbet33336 (LaZ@xx) using UID dEathLeSs [FAILEDAUTH]

<Monitor> Failed OPER attempt by KelebekvSohbet33316 (LaZ@xx) [unknown oper]

<Monitor> Failed OPER attempt by KelebekvSohbet33362 (LaZ@xx) using UID dEathLeSs [maxlogins reached]

Entrance
26 Haziran 2017, 11:47
Eline sağlık canım.)

Bu arada o aChannel *shptr; her kodun içerisinde kullanmana gerek yok, global olarak tanımlama yaparsan o değişkeni kodun her bölgesinde kullanmış olursun. Bu da aklının bir köşesinde bulunsun.)

dEathLeSs
02 Temmuz 2017, 09:49
Güncellenmiştir.

dEathLeSs
25 Ağustos 2017, 23:09
Tekrar güncelleme yapılmıştır..