IRCRehberi.Net- Türkiyenin En iyi IRC ve Genel Forum Sitesi  
 sohbet
derya sohbet


Unreal IRCd Unreal sunucunuzda rastladığınız sorunların çözümüne bu başlık altından ulaşabilirsiniz.

1Beğeni(ler)
  • 1 Post By OmerAti


 
 
Seçenekler Stil
Alt 26 Ocak 2024, 21:55   #1
Standart UnrealIRCD 6 Allsend Modülü Güncellendi

Modüller ufak ufak unrealircd 6 geçiriyoruz allsend modülü tamamlandı

Kod

/*
  Licence: GPLv3 or later
  Copyright - 2024 Valerie Pond
  Requested by OmerAti
*/
/*** <<<MODULE MANAGER START>>>
module
{
		documentation "https://github.com/ValwareIRC/valware-unrealircd-mods/blob/main/allsend/README.md";
		troubleshooting "In case of problems, documentation or e-mail me at v.a.pond@outlook.com";
		min-unrealircd-version "6.*";
		max-unrealircd-version "6.*";
		post-install-text {
				"The module is installed. Now all you need to do is add a loadmodule line:";
				"loadmodule \"third/allsend\";";
				"And /REHASH the IRCd.";
				"Please see the README for operclass requirements";
		}
}
*** <<<MODULE MANAGER END>>>
*/

#include "unrealircd.h"



ModuleHeader MOD_HEADER = {
	"third/allsend",
	"1.00",
	"Adds the /allsend command which allows privileged server operators to send targetted messages",
	"Valware",
	"unrealircd-6",
};


#define AMSG_ALL 1
#define AMSG_USERS 2
#define AMSG_OPERS 3
#define AMSG_NOTICE SEND_TYPE_NOTICE
#define AMSG_PRIVMSG SEND_TYPE_PRIVMSG
#define AMSG_LOCAL 1
#define AMSG_GLOBAL 2

#define MSG_ALLSEND "ALLSEND"
CMD_FUNC(cmd_allsend);


static void allsend_halp(Client *client, char **p);

static char *allsend_help[] =
{
	"***** ALLSEND *****",
	"-",
	"Send a message to a particular group of people.",
	"-",
	"Syntax:",
	"    /allsend <users|opers|all> <notice|private> <local|global> <message>",
	"-",
	"Example:",
	"-",
	"Send notification about a pending server restart or services outage or something =]:",
	"    /allsend all notice global There will be a server restart in 30 minutes.",
	"-",
	NULL
};

MOD_INIT()
{

	CommandAdd(modinfo->handle, MSG_ALLSEND, cmd_allsend, 4, CMD_OPER | CMD_SERVER);
	return MOD_SUCCESS;
}
/** Called upon module load */
MOD_LOAD()
{
	return MOD_SUCCESS;
}
/** Called upon unload */
MOD_UNLOAD()
{
	return MOD_SUCCESS;
}

static void allsend_halp(Client *client, char **p) {
	if(IsServer(client))
		return;
	for(; *p != NULL; p++)
		sendto_one(client, NULL, ":%s %03d %s :%s", me.name, RPL_TEXT, client->name, *p);
}

CMD_FUNC(cmd_allsend)
{
	Client *target;
	int destination = 0, sendtype = 0, global = 0;

	if (!ValidatePermissionsForPath("allsend", client, NULL, NULL, NULL))
	{
		sendnumeric(client, ERR_NOPRIVILEGES);
		return;	
	}
	else if (BadPtr(parv[1]) || BadPtr(parv[2]) || BadPtr(parv[3]) || BadPtr(parv[4]))
	{
		allsend_halp(client,allsend_help);
		return;
	}

	/* figuring out the options*/
	if (!strcasecmp(parv[1],"users"))
		destination = AMSG_USERS;
	else if (!strcasecmp(parv[1],"all"))
		destination = AMSG_ALL;
	else if (!strcasecmp(parv[1],"opers"))
		destination = AMSG_OPERS;
	if (!strcasecmp(parv[2],"notice"))
		sendtype = AMSG_NOTICE;
	else if (!strcasecmp(parv[2],"private"))
		sendtype = AMSG_PRIVMSG;
	if (!strcasecmp(parv[3],"local"))
		global = AMSG_LOCAL;
	else if (!strcasecmp(parv[3],"global"))
		global = AMSG_GLOBAL;


	if (!destination || !global) // (n)one of these were mentioned correctly
	{
		allsend_halp(client,allsend_help);
		return;
	}

	if (global == AMSG_GLOBAL)
	{
		list_for_each_entry(target, &client_list, client_node)
		{
			if (destination == AMSG_OPERS && !IsOper(target))
				continue;
			else if (destination == AMSG_USERS && IsOper(target))
				continue;
			else if (has_user_mode(target, 'B') || IsULine(target)) // skip bots and ulines
				continue;

			MessageTag *mtags = NULL;
			new_message(client, recv_mtags, &mtags);
			sendto_prefix_one(target, client, mtags, ":%s %s %s :%s", 
				client->name,
				(sendtype == AMSG_NOTICE) ? "NOTICE" : "PRIVMSG",
				target->name,
				parv[4]);
		}
		return;
	}
	if (global == AMSG_LOCAL)
	{
		list_for_each_entry(target, &lclient_list, lclient_node)
		{
			if (destination == AMSG_OPERS && !IsOper(target))
				continue;
			else if (destination == AMSG_USERS && IsOper(target))
				continue;
			else if (has_user_mode(target, 'B') || IsULine(target)) // skip bots and ulines
				continue;

			MessageTag *mtags = NULL;
			new_message(client, recv_mtags, &mtags);
			sendto_prefix_one(target, client, mtags, ":%s %s %s :%s", 
				client->name,
				(sendtype == SEND_TYPE_NOTICE) ? "NOTICE" : "PRIVMSG",
				target->name,
				parv[4]);
		}
		return;
	}
}
 
Alt 27 Ocak 2024, 13:35   #2
hepSi bir yaLan . . .
ZaLim - ait Kullanıcı Resmi (Avatar)

Standart

Türkiye hala Unreal 3x'ten vazgeçmemişken unreal 6 ile ilgili gelişmeler memnuniyet verici.

________________

Fuego, sonrisas, realidad y dolor . . .
Bırak elinde ki kalemi diyorlar,
bırak şeytan doldurur.
Ve bugün imge dediğin her şey,
bir anda bizim gibi bir katil olur.
.


hepSi bir yaLan . . .
 
Alt 27 Ocak 2024, 14:32   #3
Sim
civciv~🐥
Sim - ait Kullanıcı Resmi (Avatar)

Standart

emeginize saglik

________________

Hope. . . ✨
 
Alt 27 Ocak 2024, 17:03   #4
Standart

Emeğinize sağlık

 
Alt 27 Ocak 2024, 21:48   #5
TurkArkadas.com
Microsoft - ait Kullanıcı Resmi (Avatar)

Standart

Yasakları vardi gerci diye biliyorum ama hayirlisi

________________

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]
 
Alt 29 Ocak 2024, 00:52   #6
Standart

Emeğinize sağlık.

________________

İnsan bütün sıkıntılarını tek başına atlatınca,
kimseye ihtiyaç duymuyor.


UnrealIRCD 6 Allsend Modülü Güncellendi
 
Alt 16 Şubat 2024, 17:09   #7
✰ ÖzeL..
oMeN - ait Kullanıcı Resmi (Avatar)

Standart

Emeğine sağlık dostum

________________

Edep; aklın Tercümanıdır. İnsan edebi kadar akıllı, Aklı kadar şerefli, Şerefi kadar Kıymetlidir. Massive..




~ E & B ~
 
Alt 25 Şubat 2024, 02:21   #8
Mutena
Ruyanur - ait Kullanıcı Resmi (Avatar)

Standart

Emeğine sağlık hocam

________________

"hakikâte giden yolda, meşakkatsiz bir varış yoktur."




 


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Kapalı
Refbacks are Kapalı





Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 00:29.