IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Unreal IRCd (https://www.ircforumlari.net/unreal-ircd/)
-   -   Girişte Deop Modulu (https://www.ircforumlari.net/unreal-ircd/318635-giriste-deop-modulu.html)

Raw 27 Şubat 2010 22:09

Girişte Deop Modulu
 
Merhaba arkadaşlar ;

Forumda kanal yasaklama ile ilgili bir sürü soru ve konu gördüm. Bu modulun işinize yarayacağını kanısına vardım. Kurduğunuzda sunucunda kayıtsız bir kanala giriş yapıldğında ( operleriniz harici) unreal otomatik olarak deop edecektir ve bu sayede operleriniz haricindeki kimse op olamayağından kanal kaydedemiyecek sadece sohbet amaçlı kullanacaktır.Kodlar aşağıdadır.

Kod:

/*
 * ==================================================================
 * Module:            joindeop
 * Author:            w00t <
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
>
 * Version:            1.0.0
 * Written For:        Stealth (and others).
 * Licence:            GPL
 * Description:        Deops a user on join to a new channel if user
 *                is not an oper.
 * ==================================================================
 */


 /* ChangeLog:
 *    28/09/2005 - 1.0.0
 *        -Initial version
 */

#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

static int            cb_join(aClient *, aClient *, aChannel *, char *[]);


Hook *joindeop_hookjoin;

ModuleHeader MOD_HEADER(jointhrottle)
  = {
    "joindeop",
    "v1.0.0",
    "Deops non-opers on joining a new channel by w00t <
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
>",
    "3.2-b8-1",
    NULL
    };

DLLFUNC int MOD_INIT(jointhrottle)(ModuleInfo *modinfo)
{
    joindeop_hookjoin = HookAddEx(modinfo->handle, HOOKTYPE_LOCAL_JOIN, cb_join);

    return MOD_SUCCESS;
}

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

DLLFUNC int MOD_UNLOAD(jointhrottle)(int module_unload)
{
    if (joindeop_hookjoin)
        HookDel(joindeop_hookjoin);
       
    joindeop_hookjoin = NULL;
   
    return MOD_SUCCESS;
}

static int cb_join(aClient *cptr, aClient *sptr, aChannel *chptr, char *parv[])
{
    Member *cm;
   
    if (!IsOper(sptr))
    {
        //sendto_realops("%s is joining %s and not an oper", sptr->name, chptr->chname);
       
        /* appropriated from m_svsmode.c, why do_cmd didn't like me I have nfi.. */
        for (cm = chptr->members; cm; cm = cm->next)
        {
            //sendto_realops("Comparing %s to %s", cm->cptr->name, sptr->name);
            if (cm->cptr->name == sptr->name)
            {
                //sendto_realops("Match found.");
                if (cm->flags & CHFL_CHANOP)
                {
                    Membership *mb;
                   
                    //sendto_realops("Match is opped, deopping.");
                    mb = find_membership_link(cm->cptr->user->channel,
                        chptr);               
                   
                    sendto_channel_butserv(chptr, (aClient *)find_server_quick_search(me.name), ":%s MODE %s %s %s",
                        me.name, chptr->chname, "-o", cm->cptr->name);
                    sendto_serv_butone(NULL, ":%s MODE %s %s %s", me.name, chptr->chname, "-o", cm->cptr->name);
                    cm->flags &= ~CHFL_CHANOP;
                    if (mb)
                        mb->flags = cm->flags;
                }
            }
        }
    }
    return HOOK_CONTINUE;
}

İyi forumlar

dXt 27 Şubat 2010 22:28

Cevap: Girişte Deop Modulu
 
Emeğine sağlık.

onNes 28 Şubat 2010 01:09

Cevap: Girişte Deop Modulu
 
Güzel Çalışma Haci

toXic 28 Şubat 2010 11:23

Cevap: Girişte Deop Modulu
 
bu w00t zaten sürekli böyle moduller yaziyor fakat iyi hatırlıyorum daha önce forumda verilmişti.

RahmetLi 01 Mart 2010 08:18

Cevap: Girişte Deop Modulu
 
Toxic ben hiç gormedim bu modulu Harbi 10 numara Sabitlik Konu Paşam :)

sabitlesen super olur :D

IcNaMeK 16 Mart 2010 11:11

Cevap: Girişte Deop Modulu
 
Büyüksün Hocam:)

Diablo 16 Mart 2010 22:39

Cevap: Girişte Deop Modulu
 
aşağıdaki adresden güncel unreal modullerini indirebilirsiniz.

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk