mIRCForumlari.Net

mIRCForumlari.Net (https://www.mircforumlari.net/)
-   Unreal Hazır Kodlar (https://www.mircforumlari.net/unreal-hazir-kodlar/)
-   -   UnrealIRCD Özelleri Kapatma Modülü +D (https://www.mircforumlari.net/unreal-hazir-kodlar/252-unrealircd-ozelleri-kapatma-modulu-d.html)

RahmetLi 15 Aralık 2022 01:28

UnrealIRCD Özelleri Kapatma Modülü +D
 
Unreal IRC Sohbet Sitelerinizde Özellerinizi Kapatmaya yarayan bir modüldür. Kullanimi /mode RahmetLi +D gibi..

Kurulumunu yapmak için Putty ile hesabiza login olunuz.. SirayLa şu komutLari yaziniz.

daha sonra FTP ile hesabiniza giriniz Unreal3.2/src/modules klasörüne gönderiniz.

cd Unreal3.2
make custommodule MODULEFILE=m_privdeaf
yazdiktan sonra unrealircd.conf dosyasinin içinede şu kodu ekliyorsunuz..

loadmodule “src/modules/m_privdeaf.so”;
yazip kaydediyoruz.. Kaydetmek için CTRL+X ve y basiyoruz..

/rehash cekiniz modül kurulmuştur.. /module yazip kurulu modülleri görebilirsiniz.


PHP- Kodu:

/*
 * usermode +D: makes it so you cannot receive private messages/notices
 * except from opers, U-lines and servers. -- Syzop
 */

#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"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif

#ifndef DYNAMIC_LINKING
ModuleHeader m_privdeaf_Header
#else
#define m_privdeaf_Header Mod_Header
ModuleHeader Mod_Header
#endif
  = {
    "Özel Koruma",    /* Name of module */
    "v0.0.6", /* Version */
    "/mode nick +D", /* Short description of module */
    "3.2-b8-1",
    NULL
    };

static long UMODE_PRIVDEAF = 0;
static Umode *UmodePrivdeaf = NULL;
static Hook *CheckMsg;

DLLFUNC char *privdeaf_checkmsg(aClient *, aClient *, aClient *, char *, int);

DLLFUNC int MOD_INIT(m_privdeaf)(ModuleInfo *modinfo)
{
    UmodePrivdeaf = UmodeAdd(modinfo->handle, 'D', UMODE_GLOBAL, umode_allow_all, &UMODE_PRIVDEAF);
    if (!UmodePrivdeaf)
    {
        /* I use config_error() here because it's printed to stderr in case of a load
        * on cmd line, and to all opers in case of a /rehash.
        */
        config_error("m_privdeaf: Could not add usermode 'D': %s", ModuleGetErrorStr(modinfo->handle));
        return MOD_FAILED;
    }
   
    CheckMsg = HookAddPCharEx(modinfo->handle, HOOKTYPE_USERMSG, privdeaf_checkmsg);

    /* Ah well.. we'll just go perm for now. */
    ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);

    return MOD_SUCCESS;
}

DLLFUNC int MOD_LOAD(m_privdeaf)(int module_load)
{
    return MOD_SUCCESS;
}

DLLFUNC int MOD_UNLOAD(m_privdeaf)(int module_unload)
{
    return MOD_SUCCESS;
}

DLLFUNC char *privdeaf_checkmsg(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice)
{
    if ((acptr->umodes & UMODE_PRIVDEAF) && !IsAnOper(sptr) && !IsULine(sptr) && !IsServer(sptr))
    {
        sendnotice(sptr, "Uyari '%s' Nickli Kullanicinin Özelleri Kapali Durumdadir. Mesaj Gönderemezsiniz!", acptr->name);
        return NULL;
    } else
        return text;
}



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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.


Navbar with Avatar by Motorradforum