fatal | 14 Nisan 2025 23:24 | UnrealIRCd-6 // @OP Bildirim Sistemi Merhaba,
Kullanıcılar kanal genelinde @op yazdığında, tüm kanal operatörlerine veya #ops gibi özel bir kanala bildirim gönderir. @ - oper, admin, helper gibi çoğaltabilirsiniz. 1) TCL
unrealircd.conf içine ekleyin. Kod:
set {
tcl {
file "/path/to/bildirim.tcl";
};
}; bildirim.tcl Kod:
bind pubm - "*" handle_op_request
proc handle_op_request {nick uhost handle channel text} {
# Eğer mesaj "@op" içeriyorsa
if {[string match -nocase "*@op*" $text]} {
# Kanal OP'larini listele
set ops [chanlist $channel o]
# Her OP'a özelden mesaj gönder
foreach op $ops {
putserv "NOTICE $op :\002$nick\002 (#$channel) size seslendi: $text"
}
# Opsiyonel: #ops kanalına da gönder
putserv "PRIVMSG #ops :$nick (#$channel) size seslendi: $text"
}
} 2) Anope
m_op_redirect.cpp Kod:
#include "module.h"
class OpRedirect : public Module {
public:
void OnUserMessage(User *u, Channel *c, const std::string &msg) override {
if (msg.find("@op") != std::string::npos) {
// OP'lara ChanServ üzerinden mesaj gönder
IRCD->SendPrivmsg("ChanServ", "NOTICE %s :%s size seslendi: %s",
c->name.c_str(), u->nick.c_str(), msg.c_str());
}
}
};
MODULE_INIT(OpRedirect) Kod:
cd anope
./src/services 3) UnrealIRCd
m_op_alert.c Kod:
#include "unrealircd.h"
ModuleHeader MOD_HEADER = {
"m_op_alert",
"1.0",
"@op mesajlarında OP'lara bildirim gönderir",
"fatal",
"unrealircd-6",
};
int op_alert(Client *client, MessageTag *mtags, const char *channel, const char *text) {
if (strstr(text, "@op")) {
// Kanal OP'larini bul
Channel *chan = find_channel(channel);
if (chan) {
for (Member *m = chan->members; m; m = m->next) {
if (m->user->mode & CSTATUS_OP) {
sendto_one(m->user->client, NULL, "NOTICE %s :%s!%s@%s size seslendi: %s",
m->user->client->name, client->name, client->user->username,
client->user->realhost, text);
}
}
}
}
return 0;
}
MOD_INIT() {
CommandAdd(modinfo->handle, MSG_PRIVMSG, op_alert);
return MOD_SUCCESS;
} Kod:
make custommodule MODULEFILE=src/modules/third/m_op_alert.c
cp src/modules/third/m_op_alert.so ~/unrealircd/modules/third/ |