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/)
-   -   m_sendraw modulunu userler kullanabilirmi (https://www.ircforumlari.net/unreal-ircd/452494-m_sendraw-modulunu-userler-kullanabilirmi.html)

SuperX 13 Şubat 2012 18:03

m_sendraw modulunu userler kullanabilirmi
 
başlıktada belirtigim gibi userlerin m_sendraw modulunu kullanmasını istiyorum olabilirmi

toXic 14 Şubat 2012 15:14

Cevap: m_sendraw modulunu userler kullanabilirmi
 
Modulu koyarsaniz bakalim.

YaRGuCi 14 Şubat 2012 16:29

Cevap: m_sendraw modulunu userler kullanabilirmi
 
PHP- Kodu:

/*
 * =================================================================
 * Filename:        m_sendraw.c
 * =================================================================
 * Description:         Command /sendraw: it sends a completely raw
 *                      string to either a server, client or channel.
 *                      It also has support for multiple targets.
 * =================================================================
 * Author:        AngryWolf
 * Email:        angrywolf[MENTION=16847]Flash[/MENTION]mail.com
 * =================================================================
 *
 * I accept bugreports, ideas and opinions, and if you have
 * questions, just send an email for me!
 *
 * Thank you for using my module!
 *
 * =================================================================
 * Requirements:
 * =================================================================
 *
 * o Unreal >=3.2-beta17
 * o One of the supported operating systems (see unreal32docs.html)
 *
 * =================================================================
 * Installation:
 * =================================================================
 *
 * See [url]http://angrywolf.linktipp.org/compiling.php?lang=en[/url]
 *
 * =================================================================
 * Mirror files:
 * =================================================================
 *
 * [url]http://angrywolf.linktipp.org/m_sendraw.c[/url] [Germany]
 * [url]http://angrywolf.uw.hu/m_sendraw.c[/url] [Hungary]
 * [url]http://angrywolf.fw.hu/m_sendraw.c[/url] [Hungary]
 *
 * =================================================================
 * Changes:
 * =================================================================
 *
 * $Log: m_sendraw.c,v $
 * Revision 2.2  2003/12/01 18:10:03  angrywolf
 * - Replaced add_Command and del_Command with CommandAdd and CommandDel.
 *
 * Revision 2.1  2003/08/31 20:36:56  angrywolf
 * From now on I'm using RCS
 *
 * 2003-05-14: Documentation updates
 * 2003-06-04: Little fix in the parameters of sendto_channel_butone
 *             (reported by ChRiS)
 * 2003-05-20: Fixed so channel messages sent from anywhere within
 *             the IRC Network are delivered to all members of the
 *             channel.
 * 2003-05-09: Added option -servers to send a message to all servers
 *             of the network
 * 2003-04-27: Fixed compile warnings for win32
 * 2003-02-07: Added multi-recipient support
 * 2003-02-02: Coded m_sendraw
 *
 * =================================================================
 */

#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

#define MyMod        ModSendraw->handle
#define MSG_SENDRAW     "SENDRAW"
#define TOK_SENDRAW     "SR"
#define DelCommand(x)    if (x) CommandDel(x); x = NULL

static Command        *AddCommand(char *msgchar *tokenint (*func)());
DLLFUNC int        m_sendraw(aClient *cptraClient *sptrint parcchar *parv[]);

ModuleInfo        *ModSendraw;
Command            *CmdSendraw;

#ifndef DYNAMIC_LINKING
ModuleHeader m_sendraw_Header
#else
#define m_sendraw_Header Mod_Header
ModuleHeader Mod_Header
#endif
  
= {
    
"sendraw",
    
"$Id: m_sendraw.c,v 2.2 2003/12/01 18:10:03 angrywolf Exp $",
    
"command /sendraw",
    
"3.2-b8-1",
    
NULL 
    
};

#ifdef DYNAMIC_LINKING
DLLFUNC int    Mod_Init(ModuleInfo *modinfo)
#else
int    m_sendraw_Init(ModuleInfo *modinfo)
#endif
{
    
ModSendraw    modinfo;
    
CmdSendraw    AddCommand(MSG_SENDRAWTOK_SENDRAWm_sendraw);

    if (!
CmdSendraw)
        return 
MOD_FAILED;

    return 
MOD_SUCCESS;
}

#ifdef DYNAMIC_LINKING
DLLFUNC int    Mod_Load(int module_load)
#else
int    m_sendraw_Load(int module_load)
#endif
{
    return 
MOD_SUCCESS;
}

#ifdef DYNAMIC_LINKING
DLLFUNC int    Mod_Unload(int module_unload)
#else
int    m_sendraw_Unload(int module_unload)
#endif
{
    
DelCommand(CmdSendraw);

    return 
MOD_SUCCESS;
}

static 
Command *AddCommand(char *msgchar *tokenint (*func)())
{
    
Command *cmd;

    if (
CommandExists(msg))
        {
        
config_error("Command %s already exists"msg);
        return 
NULL;
        }
        if (
CommandExists(token))
    {
        
config_error("Token %s already exists"token);
        return 
NULL;
        }

    
cmd CommandAdd(MyModmsgtokenfuncMAXPARA0);

#ifndef _WIN32
    
if (ModuleGetError(MyMod) != MODERR_NOERROR || !cmd)
#else
    
if (!cmd)
#endif
    
{
#ifndef _WIN32
        
config_error("Error adding command %s: %s"msg,
            
ModuleGetErrorStr(MyMod));
#else
        
config_error("Error adding command %s"msg);
#endif
        
return NULL/* just to be sure */
    
}

    return 
cmd;
}

/*
** m_sendraw
**      parv[0] = sender prefix
**      parv[1] = targets separated by commas (nick/server/channel)
**      parv[2] = message
*/

DLLFUNC int m_sendraw(aClient *cptraClient *sptrint parcchar *parv[])
{
    
aClient        *acptr;
    
aChannel    *chptr;
    
char        *recipients, *to, *message, *p;

        if (!
MyClient(sptr) || !IsNetAdmin(sptr))
    {
            
sendto_one(sptrerr_str(ERR_NOPRIVILEGES), me.nameparv[0]);
        return -
1;
    }

        if (
parc || BadPtr(parv[2]))
    {
            
sendto_one(sptr":%s NOTICE %s :*** Usage: /sendraw <to1>[,<to2>,[,<to3>...]]> [:]<message>",
                    
me.namesptr->name);
            
sendto_one(sptr":%s NOTICE %s :*** <to>: <#channel>|<nick>|-servers",
                    
me.namesptr->name);
            
sendto_one(sptr":%s NOTICE %s :*** Example: /sendraw #opers ::Lamer PRIVMSG #opers :Hello!",
                    
me.namesptr->name);
        return -
1;
    }

    
recipients    strdup(parv[1]);
    
message        parv[2];

    ;
sendto_realops("%s (%s@%s) did a /sendraw [ \2to=\2%s \2message=\2%s ]",
        
sptr->namesptr->user->username,
        
IsHidden(sptr) ? sptr->user->virthost sptr->user->realhost,
        
recipientsmessage);

    for (
to strtoken(&precipients","); toto strtoken(&pNULL","))
    {

            if (!
strcasecmp(to"-servers"))
            
sendto_serv_butone(&memessage);
            else if (*
to == '#' && (chptr find_channel(toNullChn)) != NullChn)
            
sendto_channel_butone(&me, &mechptrmessage);
            else if ((
acptr find_person(toNULL)) || (acptr find_server_quick(to)))
            
sendto_one(acptrmessage);
        else
        {
            if (!
IsServer(sptr))
                    
sendto_one(sptrerr_str(ERR_NOSUCHNICK),
                    
me.namesptr->nameto);
            return -
1;
        }

    }

    
MyFree(recipients);
    
    return 
0;



sanırım

PHP- Kodu:

if (!MyClient(sptr) || !IsNetAdmin(sptr))
    { 

denemedim ama şurada bi değişiklik yapılması gerekir.

SuperX 14 Şubat 2012 17:44

Cevap: m_sendraw modulunu userler kullanabilirmi
 
toXic modul linki [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

SuperX 14 Şubat 2012 23:05

Cevap: m_sendraw modulunu userler kullanabilirmi
 
if (!MyClient(sptr) && !IsULine(sptr))

Olarak degiştim oldu peki kanal founderileri kullana bilsin olsun istiyorum onu nasıl yaparım

toXic 16 Şubat 2012 18:27

Cevap: m_sendraw modulunu userler kullanabilirmi
 
Userler kullaniyorsa zaten kanal founderleride kullanir, onlarda user.

SuperX 16 Şubat 2012 23:19

Cevap: m_sendraw modulunu userler kullanabilirmi
 
evt ama sadece kanal founderleri kullansın userler degil

SuperX 18 Şubat 2012 21:14

Cevap: m_sendraw modulunu userler kullanabilirmi
 
guncel

ErKaNs 14 Mayıs 2012 01:54

Cevap: m_sendraw modulunu userler kullanabilirmi
 
Kod:

(!MyClient(sptr) || (access & CHFL_CHANOWNER))
dene

ErKaNs 14 Mayıs 2012 14:32

Cevap: m_sendraw modulunu userler kullanabilirmi
 
Alıntı:

ShaKa Nickli Üyeden Alıntı (Mesaj 1041118090)
Kod:

(!MyClient(sptr) || (access & CHFL_CHANOWNER))
dene

PHP- Kodu:

long access;
    
access get_access(sptrchptr);
(!
MyClient(sptr) || (access CHFL_CHANOWNER)) 



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

Powered by vBulletin® Version 3.8.8 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2024 IRCForumlari.Net