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/)
-   Hazır_kodlar (https://www.ircforumlari.net/hazir_kodlar/)
-   -   OPERS Modulu. (https://www.ircforumlari.net/hazir_kodlar/318167-opers-modulu.html)

toXic 24 Şubat 2010 15:03

OPERS Modulu.
 
Modul /ircops modulu gibi ama .txt deki metni alip RPL_OPERS İLE Kullaniciya veren basit bir modul..


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
#define RPL_OPERS  337
#define MSG_opers "opers"
#define TOK_opersx "lr"
#define tox "#Opers"
#define MSG_opersmotd "opersmotd"
#define TOK_opersmotdx "omx"
aClient *sptr;
aChannel *chptr;
char *text;
DLLFUNC int m_opersmotd(aClient *sptr);
DLLFUNC int m_opers(aClient *cptr, aClient *sptr, int parc, char *parv[]);
#define aciklama "m_opers Operler Bilgileri gosterme Modulu (toXic)"
#define aciklama2 "Operler Bilgileri gosterme Modulu (toXic)"
#define aciklama3 "Opers"
#define versiyon    "3.2-b8-1"
ModuleHeader MOD_HEADER(m_opers)
= {
aciklama,
aciklama2,
aciklama3,
versiyon,
NULL
};
DLLFUNC int MOD_INIT(m_opers)(ModuleInfo *modinfo)
{
add_CommandX(MSG_opers, TOK_opersx,  m_opers, 1, M_UNREGISTERED|M_USER|M_VIRUS);
MARK_AS_OFFICIAL_MODULE(modinfo);
return MOD_SUCCESS;
}
 
DLLFUNC int MOD_LOAD(m_opers)(int module_load)
{
return MOD_SUCCESS;
}
 
DLLFUNC int MOD_UNLOAD(m_opers)(int module_unload)
{
if (del_Command(MSG_opers, TOK_opersx, m_opers) < 0)
{
sendto_realops("Bir hata Olustu.. %s",
MOD_HEADER(m_opers).name);
}
return MOD_SUCCESS;
}
 
DLLFUNC int m_opers(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
 
/*
 if  (!sptr || !sptr || !chptr || !text) {
  return text;
 }
 if (!strcmp(text, "!opers")) {
*/
 // dosya islemleri.
#define OKU "opers.txt"
int i;
FILE *dosya;
char buf[BUFSIZE];
dosya = fopen(OKU, "r");
if (dosya != NULL) {
while (fgets(buf, sizeof(buf), dosya)) {
buf[strlen(buf)-1] = 0;
if ((chptr = find_channel(tox, NullChn)) != NullChn)
sendto_channel_butone(&me, &me, chptr, ":OPERS PRIVMSG  %s %s  Kullanicisi, \2OPERS\2 Komutunu Kullandi.", tox, sptr->name);
sendto_one(sptr, ":%s %d %s :%s", me.name, RPL_OPERS, sptr->name, buf);
 
}
// Dosyaya Yazdirma..
 time_t irc_time;
                struct tm tdate;
                irc_time = time(NULL);
                tdate = *localtime(&irc_time);
                FILE * pFile;
                pFile = fopen ("operskullananlar.txt", "a");
                fprintf (pFile, "Tarih: %02d-%02d-%02d Saat: %02d:%02d Nick: %s  IP: %s \n", tdate.tm_mday, tdate.tm_mon + 1,
                tdate.tm_year - 100, tdate.tm_hour, tdate.tm_min, sptr->name,  sptr->user->realhost);
                fclose (pFile);
 
//  HATADA Operlere Bildirim..
} else {
 sendto_realops("Opers: %s !opers Komutunu Kullandi, fakat, Bir hata ile karsilasti..",
                        sptr->name);
// Kullaniciya bildirim.
sendto_one(cptr, ":%s NOTICE %s HATA Olustu.\n", me.name, sptr->name);
return 0;
}
  }



ircops yerine bu modul ile daha genis bilgiler verebilirsiniz kullanicilara.
Öncelikle opers.txt olusturmalisiniz Unreal3.2* dizini icine.
Nick : toXic  ISIM :2 IBRAHIM S SEHIR :  Samsun YETKI : Network Administrator GOREVI :  Yazilim
Nick : X  ISIM :  Y SEHIR :  Istanbul YETKI : Service Admin GOREVI :  Global Kanallar Sorumlusu
Bu sekil..
Dosya olusturulmadi ise komut kullaniminda kisiye ve operslere uyari verecektir.

Alıntı:

-ø-
Nick : toXic ISIM :2 IBRAHIM S SEHIR : Samsun YETKI : Network Administrator GOREVI : Yazilim
Nick : X ISIM : Y SEHIR : Istanbul YETKI : Service Admin GOREVI : Global Kanallar Sorumlusu
-ø-
[KBSC] 15::03 [toXic PING]
-ø-
Böyle bir sonuc verecektir..
Ayrica Komut kullananlar, operskullananlar.txt de üzerinde kayit edilmektedir.

İyi calismalar.

CoboL 24 Şubat 2010 18:05

Cevap: OPERS Modulu.
 
Kardesim biraz daha acabilirmisin paylasimini.. ircops modulunu silip bu verdigin kodlarımı yapistircagız yerine ? Yoksa farkli bir txt acip onamı yapistircagiz.

FBI- 24 Şubat 2010 18:39

Cevap: OPERS Modulu.
 
Ortak güzel bi paylaşım yağmışın yine.. iyi gidiyon :) emeğine sağlık

toXic 24 Şubat 2010 18:40

Cevap: OPERS Modulu.
 
Zaten acikli.

Unreal3.2* dizini icersine opers.txt hazirliycaksiniz operlerin nickleri görevleri bilgileri vs. yazacaksiniz alt alta tek satir halinde.

/opers Komutu Kullanimda, ircops yerinde göstericek..


Nick : toXic ISIM :2 IBRAHIM S SEHIR : Samsun YETKI : Network Administrator GOREVI : Yazilim
Nick : X ISIM : Y SEHIR : Istanbul YETKI : Service Admin GOREVI : Global Kanallar Sorumlusu

Bu SEKİL.
Bir Modul Bu, başka bir modulde calistirmaya calistirirsaniz zaten hata verir. Modul olarak kuracaksin.

iyi calismalar.

CoboL 24 Şubat 2010 21:31

Cevap: OPERS Modulu.
 
Teşekkürler.

IcNaMeK 09 Mart 2010 22:44

Cevap: OPERS Modulu.
 
Tskler Elinize Saglık

CroAtoN 22 Ocak 2013 14:38

Cevap: OPERS Modulu.
 
Örnek Modulu Kurdum ve Sonuc

• CroAtoN •
• CroAtoN •
• CroAtoN • Aşk Hikayesi Sunucu Yöneticileri Hakkinda Bilgi Almak icin:
• CroAtoN • /opers Komutunu Kullaniniz.
• CroAtoN •
• CroAtoN •


AskHikayesi.NET IRC YÖNETİCİLERİ ve BİLGİLERİ
--------------------------------------------------------------
Nick : CroAtoN
SEHIR : Bursa
MEMLEKET : Samsun
YAŞ : 27
MEDENİ DURUM : Evli
BURÇ : Oğlak
YETKI : Ağ Yöneticisi
GOREVI : WEB & IRC SAHİBİ
--------------------------------------------------------------


#Opers Odasi
[14:37:55] <OPERS> CroAtoN Kullanicisi, OPERS Komutunu Kullandi.



not : opers.txt kendime göre ayarladim

MuRCeLL 01 Temmuz 2013 21:54

Cevap: OPERS Modulu.
 
ibo güzel hoş eline sağlık da bence bunu /opers değilde /ircops olarak değiştirsen daha mantıklı olmazmi sence?

toXic 03 Temmuz 2013 14:03

Cevap: OPERS Modulu.
 
ircops modulunden işleyiş olarak farkli oldugu için opers olarak kullaniliyor. Fakat 2'si birleştirilebilir.

MyKraL 12 Nisan 2016 03:31

Cevap: OPERS Modulu.
 
eline sağlık kurdum fakat /opers yazınca #opers kanalına gelen cok bildiri msjı geliyo birde statüse degilde özele msj olarak gelse daha iyi degilmi ?

[03:30] <MyKraL> +
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.
[03:30] <OPERS> MyKraL Kullanicisi, OPERS Komutunu Kullandi.


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

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