05 Kasım 2022, 05:39
|
#1
|
|
Dj bilgi modulu
m_dj.c diye pc nizde bir dosya oluşturun. ve alltaki kodları içine yapıştırın. daha sonra ftpnze gonerıp kurulumu yapabilirsiniz. kurulumu yapamayan arkadaşlar bu baslık altından yazabılırler.
Kod:
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.h"
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <fcntl.h>
#include "h.h"
#include "proto.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
DLLFUNC int m_dj(aClient *cptr, aClient *sptr, int parc, char *parv[]);
/* Place includes here */
#define MSG_dj "dj"
#define TOK_dj "lr"
#define DISIM "dj.bilgi"
ModuleHeader MOD_HEADER(m_dj)
= {
"dj Modulu", /* Name of module */
"dj UnrealIRCD", /* Version */
"Raistlin", /* Short description of module */
"3.2.3",
NULL
};
DLLFUNC int MOD_INIT(m_dj)(ModuleInfo *modinfo)
{
add_CommandX(MSG_dj, TOK_dj, m_dj, 1, M_UNREGISTERED|M_USER|M_VIRUS);
MARK_AS_OFFICIAL_MODULE(modinfo);
return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(m_dj)(int module_load)
{
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(m_dj)(int module_unload)
{
if (del_Command(MSG_dj, TOK_dj, m_dj) < 0)
{
sendto_realops("Hata %s",
MOD_HEADER(m_dj).name);
}
return MOD_SUCCESS;
}
DLLFUNC int m_dj(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
char *disim;
FILE *d;
char buf[BUFSIZE];
d = fopen(DISIM, "r");
if (d) {
while (fgets(buf, sizeof(buf), d)) {
buf[strlen(buf)-1] = 0;
sendto_one(sptr, ":DJBILGI PRIVMSG %s :%s", sptr->name, buf);
}
fclose(d);
} else {
sendto_one(cptr, ":DJBILGI NOTICE %s :DJ bilgi dosyası oluşturulmamış.", me.name, sptr->name, sptr->name);
}
}
Çoğumuz Aslen Deli ve Dünya Deliler Hastanesi..

|
|
|