lookjapan.COM - IRC ve mIRC dünyasının forumu!   buy vps


  lookjapan.COM - IRC ve mIRC dünyasının forumu! IF - Unreal, Services ve Botlar UnrealIRCd


Like Tree2Teşekkürler;
  • 1 Post By Entrance
  • 1 Post By Entrance

Yeni Konu   Cevap Yaz

 
LinkBack Seçenekler Stil
Alt 16 Mart 2016, 05:52   #1
 
exclusive - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: 07 Ağustos 2015
Mesajlar: 22
WEB Sitesi: http://www.aynet.org
IRC Sunucusu: irc.aynet.org
İlgi Alanı:
Alınan Beğeni: 0
Standart /ircops modulü

Merhaba, aşağıda /ircops modulüne Root Administrator rütbesini nasıl ekleyebilirim?

Çıktı aşağıdaki gibi "on systems.domain.com" ibaresinide kaldırmak istiyorum.


Opernick is a Network Administrator on systems.domain.com [Helpop]
Total: 1 IRCOP online - 1 Admin, 0 Oper and 0 Away
End of /IRCOPS list

PHP- Kodu: 
/*
 *   m_ircops - /IRCOPS command that lists IRC Operators
 *   (C) Copyright 2004-2005 Syzop <syzop@vulnscan.org>
 *   (C) Copyright 2003-2004 AngryWolf <angrywolf@flashmail.com>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 1, or (at your option)
 *   any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "proto.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

typedef struct
{
    
long *umode;
    
char *text;
oflag;

/*
 * Ultimate uses numerics 386 and 387 for RPL_IRCOPS and RPL_ENDOFIRCOPS,
 * but these numerics are RPL_QLIST and RPL_ENDOFQLIST in UnrealIRCd
 * (numeric conflict). I had to choose other numerics.
 */

#define RPL_IRCOPS        337
#define RPL_ENDOFIRCOPS   338
#define MSG_IRCOPS        "IRCOPS"
#define TOK_IRCOPS        NULL
#define MSG_HELPOPS       "HELPOPS"
#define IsAway(x)         (x)->user->away

#if !defined(IsSkoAdmin)
#define IsSkoAdmin(sptr)  (IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr) || IsCoAdmin(sptr))
#endif

static int m_ircops(aClient *cptraClient *sptrint parcchar *parv[]);
static 
int m_helpops(aClient *cptraClient *sptrint parcchar *parv[]);

static 
oflag otypes[7];

ModuleHeader MOD_HEADER(m_ircops)
  = {
    
"ircops",
    
"v3.71",
    
"/IRCOPS command that lists IRC Operators",
    
"3.2-b8-1",
    
NULL 
    
};

DLLFUNC int MOD_INIT(m_ircops)(ModuleInfo *modinfo)
{

    
otypes[0].umode = &UMODE_NETADMIN;
    
otypes[0].text "a Network Administrator";
    
otypes[1].umode = &UMODE_SADMIN;
    
otypes[1].text "a Services Administrator";
    
otypes[2].umode = &UMODE_ADMIN;
    
otypes[2].text "a Server Administrator";
    
otypes[3].umode = &UMODE_COADMIN;
    
otypes[3].text "a Co Administrator";
    
otypes[4].umode = &UMODE_OPER;
    
otypes[4].text "an IRC Operator";
    
otypes[5].umode = &UMODE_LOCOP;
    
otypes[5].text "a Local Operator";
    
otypes[6].umode NULL;
    
otypes[6].text NULL;

    if (
CommandExists(MSG_IRCOPS))
    {
        
config_error("Command " MSG_IRCOPS " already exists");
        return 
MOD_FAILED;
    }
    
CommandAdd(modinfo->handleMSG_IRCOPSTOK_IRCOPSm_ircopsMAXPARAM_USER);

    if (
CommandExists(MSG_HELPOPS))
    {
        
config_error("Command " MSG_HELPOPS " already exists");
        return 
MOD_FAILED;
    }
    
CommandAdd(modinfo->handleMSG_HELPOPSNULLm_helpopsMAXPARAM_USER);

    if (
ModuleGetError(modinfo->handle) != MODERR_NOERROR)
    {
        
config_error("Error adding command " MSG_IRCOPS ": %s",
            
ModuleGetErrorStr(modinfo->handle));
        return 
MOD_FAILED;
    }

    return 
MOD_SUCCESS;
}

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

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


static 
char *find_otype(long umodes)
{
    
unsigned int i;
    
    for (
0otypes[i].umodei++)
        if (*
otypes[i].umode umodes)
            return 
otypes[i].text;

    return 
"an unknown operator";
}

/*
 * m_ircops
 *
 *     parv[0]: sender prefix
 *
 *     Originally comes from TR-IRCD, but I changed it in several places.
 *     In addition, I didn't like to display network name. In addition,
 *     instead of realname, servername is shown. See the original
 *     header below.
 */

/************************************************************************
 * IRC - Internet Relay Chat, modules/m_ircops.c
 *
 *   Copyright (C) 2000-2002 TR-IRCD Development
 *
 *   Copyright (C) 1990 Jarkko Oikarinen and
 *                      University of Oulu, Co Center
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

static int m_ircops(aClient *cptraClient *sptrint parcchar *parv[])
{
aClient *acptr;
char buf[BUFSIZE];
int opers 0admins 0globs 0aways 0;

    for (
acptr clientacptracptr acptr->next)
    {
        
/* List only real IRC Operators */
        
if (IsULine(acptr) || !IsPerson(acptr) || !IsAnOper(acptr))
            continue;
        
/* Don't list +H users */
        
if (!IsAnOper(sptr) && IsHideOper(acptr))
            continue;

        
sendto_one(sptr":%s %d %s :\2%s\2 is %s on %s" "%s",
            
me.nameRPL_IRCOPSsptr->name,
            
acptr->name,
            
find_otype(acptr->umodes),
            
acptr->user->server,
            (
IsAway(acptr) ? " [Away]" IsHelpOp(acptr) ? " [Helpop] " ""));

        if (
IsAway(acptr))
            
aways++;
        else if (
IsSkoAdmin(acptr))
            
admins++;
        else
            
opers++;

    }

    
globs opers admins aways;

    
sprintf(buf,
        
"Total: \2%d\2 IRCOP%s online - \2%d\2 Admin%s, \2%d\2 Oper%s and \2%d\2 Away",
        
globs, (globs) > "s" ""adminsadmins "s" "",
        
opersopers "s" ""aways);

    
sendto_one(sptr":%s %d %s :%s"me.nameRPL_IRCOPSsptr->namebuf);
    
sendto_one(sptr":%s %d %s :End of /IRCOPS list"me.nameRPL_ENDOFIRCOPSsptr->name);

    return 
0;
}

static 
int m_helpops(aClient *cptraClient *sptrint parcchar *parv[])
{
aClient *acptr;
char buf[BUFSIZE];
int helpops 0aways 0total 0;

    for (
acptr clientacptracptr acptr->next)
    {
        
/* List only real IRC Operators */
        
if (IsULine(acptr) || !IsPerson(acptr) || !IsAnOper(acptr))
            continue;
        
/* Don't list +H users */
        
if (IsHideOper(acptr) || !(acptr->umodes UMODE_HELPOP))
            continue;

        
sendto_one(sptr":%s %d %s :\2%s\2 is %s on %s" "%s",
            
me.nameRPL_IRCOPSsptr->name,
            
acptr->name,
            
"HelpOp",
            
acptr->user->server,
            (
IsAway(acptr) ? " [Away]" ""));

        if (
IsAway(acptr))
            
aways++;
    }

    
total aways helpops;

    
sprintf(buf,
        
"Total: \2%d\2 HelpOP%s online (of which \2%d\2 Away)",
        
totaltotal "s" ""aways);

    
sendto_one(sptr":%s %d %s :%s"me.nameRPL_IRCOPSsptr->namebuf);
    
sendto_one(sptr":%s %d %s :End of /HELPOPS list"me.nameRPL_ENDOFIRCOPSsptr->name);

    return 
0;


 exclusive isimli Üye şimdilik offline konumundadır   Alıntı
Alt 18 Mart 2016, 22:22   #2
タネル
 
Entrance - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: 23 Ocak 2003
Bulunduğu yer: istanbul
Mesajlar: 540
WEB Sitesi: *
IRC Sunucusu: *
İlgi Alanı: Unreal
Alınan Beğeni: 361
Standart Cevap: /ircops modulü

Merhaba,

İsteğin doğrultusunda modülü, düzenledim ve eklenti olarak yüklüyorum. Test etme imkânım olmadı, olumlu/olumsuz dönüş sağlarsın..

İyi forumlar.. ^^*
Eklenmiş Dosya
Dosya tipi: zip m_ircops.zip (2.4 KB (Kilobyte), 24x kez indirilmiştir)
exclusive bu mesaja teşekkür etti





char *adres = "irc is finished"; for(int i = 0; *(adres + i); i++) { putchar(toupper(adres[i])); }
 Entrance isimli Üye şimdilik offline konumundadır   Alıntı
Alt 20 Mart 2016, 18:28   #3
 
exclusive - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: 07 Ağustos 2015
Mesajlar: 22
WEB Sitesi: http://www.aynet.org
IRC Sunucusu: irc.aynet.org
İlgi Alanı:
Alınan Beğeni: 0
Standart Cevap: /ircops modulü

Teşekkür ederim, modulde herhangi bir problem yok.
Fakat away geçince away göstermiyor

Nick Root Administrator [away] gibi.
 exclusive isimli Üye şimdilik offline konumundadır   Alıntı
Alt 20 Mart 2016, 18:45   #4
タネル
 
Entrance - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: 23 Ocak 2003
Bulunduğu yer: istanbul
Mesajlar: 540
WEB Sitesi: *
IRC Sunucusu: *
İlgi Alanı: Unreal
Alınan Beğeni: 361
Standart Cevap: /ircops modulü

exclusive Nickli Üyeden Alıntı Mesajı göster
Teşekkür ederim, modulde herhangi bir problem yok.
Fakat away geçince away göstermiyor

Nick Root Administrator [away] gibi.

Rica ederim, modülü güncelledim..

İyi forumlar.^^
exclusive bu mesaja teşekkür etti





char *adres = "irc is finished"; for(int i = 0; *(adres + i); i++) { putchar(toupper(adres[i])); }
 Entrance isimli Üye şimdilik offline konumundadır   Alıntı

Yeni Konu   Cevap Yaz

Etiketler
modulü, or ircops


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 Açık
Pingbacks are Açık
Refbacks are Açık


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Geliştirilebilir KOMUTLAR MODULÜ IF Kullanıcılarına ÖZEL... diAbLErO UnrealIRCd 0 22 Şubat 2019 13:14
ircops.c ufak bir edit.. dEathLeSs Unreal - 4 Parça Kodlar 0 27 Haziran 2017 12:33
IRCd shell paketler modulü. Entrance Unreal - Hazır Kodlar 1 06 Eylül 2015 13:40

web hosting web hosting
 buy vds
 vps buy

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.