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

>
+
Etiketlenen Kullanıcılar

19Beğeni(ler)

Yeni Konu aç Cevapla
 
LinkBack Seçenekler Stil
Alt 10 Mart 2012, 20:24   #1
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: OPERHELP Sistem MODULU




Buda benden olsun
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
/* * IRC - Internet Relay Chat, src/modules/m_away.c * (C) 2001 The UnrealIRCd Team * * away command * * See file AUTHORS in IRC package for additional names of * the programmers. * * 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. */ /* m_away.c dosyasi düzenlenerek bu hale getirildi. Kanal'a join ve part icin, sky-dancerin, sirilagiris adli modulunden do_cmd sekmesini calisma bicimi gozlenip gerekli testler yapilarak module uygun hale getirildi. Düzenleyen: BehroozWolf */ #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 DLLFUNC int m_away(aClient *cptr, aClient *sptr, int parc, char *parv[]); #define MSG_AWAYHELPER "HELPERAWAY" #define TOK_AWAYHELPER "313126" #define RAPOR "#helpers" extern aChannel *get_channel(aClient *, char *, int); static char mybuf[BUFSIZE+1]; DLLFUNC ModuleHeader MOD_HEADER(m_away) = { "m_helperaway", "Helper away sistemi(helperler tarafindan kullanilir)", "Written by BehroozWolf <behroom@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...].com>", "3.2-b8-1", NULL }; DLLFUNC int MOD_INIT(m_away)(ModuleInfo *modinfo) { add_Command(MSG_AWAYHELPER, TOK_AWAYHELPER, m_away, 1); MARK_AS_OFFICIAL_MODULE(modinfo); return MOD_SUCCESS; } DLLFUNC int MOD_LOAD(m_away)(int module_load) { return MOD_SUCCESS; } DLLFUNC int MOD_UNLOAD(m_away)(int module_unload) { if (del_Command(MSG_AWAYHELPER, TOK_AWAYHELPER, m_away) < 0) { sendto_realops("Failed to delete commands when unloading %s", MOD_HEADER(m_away).name); } return MOD_SUCCESS; } /*********************************************************************** * m_away() - Added 14 Dec 1988 by jto. * Not currently really working, I don't like this * call at all... * * ...trying to make it work. I don't like it either, * but perhaps it's worth the load it causes to net. * This requires flooding of the whole net like NICK, * USER, MODE, etc messages... --msa ***********************************************************************/ /* ** m_away ** parv[0] = sender prefix ** parv[1] = away message */ static char *FullDate(TS time_in) { struct tm *tp = localtime(&time_in); if (!tp) return NULL; memset(&mybuf, 0, sizeof mybuf); strftime(mybuf, sizeof mybuf, "%d-%m-%Y - %H:%M:%S", tp); //strftime(mybuf, sizeof mybuf, "%B %x %A %X", tp); return mybuf; } int m_away(aClient *cptr, aClient *sptr, int parc, char *parv[]) { char *away, *awy2 = parv[1]; aChannel *chptr; char nick[NICKLEN + 2]; int n; if (!IsServer(sptr) && MyConnect(sptr) && !IsPerson(sptr)) { } if (!IsHelpOp(sptr)) { sendto_one(sptr, ":%s NOTICE %s :Bu komutun kullanim sinirlamasi HelpOp'tur. Bu komutu kullanmaya yetkiniz yok.", me.name, sptr->name); return 0; } if (IsServer(sptr)) return 0; away = sptr->user->away; if (parc < 2 || !*awy2) { /* Marking as not away */ if (away) { MyFree(away); sptr->user->away = NULL; /* Only send this if they were actually away -- codemastr */ sendto_serv_butone_token(cptr, parv[0], MSG_AWAYHELPER, TOK_AWAYHELPER, ""); } /* hope this works XX */ if (IsServer(sptr) || IsULine(sptr) || IsOper(sptr)) return 0; if ((chptr = find_channel(RAPOR, NullChn)) != NullChn) sendto_channel_butone(&me, &me, chptr, ":HelpServ PRIVMSG %s :[%s] \2%s\2 rumuzu \2mesgul(away)\2 konumundan cikti.", RAPOR, FullDate(sptr->lasttime), sptr->name); sptr->umodes |= UMODE_WHOIS; sptr->umodes |= UMODE_KIX; sendto_one(sptr, ":%s MODE %s +qW", sptr->name, sptr->name); int Secim; char Kanalimiz[64]; char *kanallistesi[]= { "#help", }; srand(time(NULL)); Secim = rand()%(sizeof(kanallistesi)/sizeof(*kanallistesi)); strcpy(Kanalimiz,kanallistesi[Secim]); if (!BadPtr(Kanalimiz)) { char *JoinChan[3] = { sptr->name, Kanalimiz, NULL }; do_cmd(sptr, sptr, "JOIN", 3, JoinChan); } //sendto_one(sptr, ":%s[away] NICK :%s", parv[0], sptr->name); aChannel *chanptr; if (chanptr = find_channel("#help", (aChannel *)NULL)) { sendto_one(sptr, ":HelpServ NOTICE %s :Mesgul(away) konumundan ciktiniz, Helperlığınız tekrar devam etmektedir.", sptr->name); sendto_one(sptr, ":HelpServ NOTICE %s :%s kanalinda suanda %d kisi bulunmaktadir.", sptr->name, helpchan, chanptr->users); sendto_one(sptr, ":HelpServ NOTICE %s :Hosgeldin %s, iyi görevler!", sptr->name, sptr->name); } if (MyConnect(sptr)) sendto_one(sptr, rpl_str(RPL_UNAWAY), me.name, parv[0]); return 0; } n = dospamfilter(sptr, parv[1], SPAMF_AWAY, NULL); if (n < 0) return n; #ifdef NO_FLOOD_AWAY if (MyClient(sptr) && AWAY_PERIOD && !IsAnOper(sptr)) { if ((sptr->user->flood.away_t + AWAY_PERIOD) <= timeofday) { sptr->user->flood.away_c = 0; sptr->user->flood.away_t = timeofday; } if (sptr->user->flood.away_c <= AWAY_COUNT) sptr->user->flood.away_c++; if (sptr->user->flood.away_c > AWAY_COUNT) { sendto_one(sptr, err_str(ERR_TOOMANYAWAY), me.name, parv[0]); return 0; } } #endif /* Marking as away */ if (strlen(awy2) > (size_t)TOPICLEN) awy2[TOPICLEN] = '\0'; if (away) if (strcmp(away, parv[1]) == 0) return 0; sendto_serv_butone_token(cptr, parv[0], MSG_AWAYHELPER, TOK_AWAYHELPER, ":%s", awy2); if (away) away = (char *)MyRealloc(away, strlen(awy2) + 1); else away = (char *)MyMalloc(strlen(awy2) + 1); sptr->user->away = away; (void)strcpy(away, awy2); if (IsServer(sptr) || IsULine(sptr) || IsOper(sptr)) return 0; if ((chptr = find_channel(RAPOR, NullChn)) != NullChn) sendto_channel_butone(&me, &me, chptr, ":HelpServ PRIVMSG %s :[%s] \2%s\2 rumuzu \2mesgul(away)\2 konumuna gecmistir.", RAPOR, FullDate(sptr->lasttime), sptr->name); sendto_one(sptr, ":%s MODE %s -qW", sptr->name, sptr->name); sptr->umodes &= ~UMODE_WHOIS; sptr->umodes &= ~UMODE_KIX; sendto_one(sptr, ":HelpServ NOTICE %s :Mesgul(away) konumuna gectiniz, helperliginiz sona ermiştir.", sptr->name); sendto_one(sptr, ":HelpServ NOTICE %s :Lütfen taki almayi unutmayiniz. Örnek; \2%s[away]\2, \2%s[busy]\2", sptr->name, sptr->name, sptr->name); sendto_one(sptr, ":HelpServ NOTICE %s :(Help Yönetimi)", sptr->name); int Secim; char Kanalimiz[64]; char *kanallistesi[]= { "#help", }; srand(time(NULL)); Secim = rand()%(sizeof(kanallistesi)/sizeof(*kanallistesi)); strcpy(Kanalimiz,kanallistesi[Secim]); if (!BadPtr(Kanalimiz)) { char *JoinChan[3] = { sptr->name, Kanalimiz, NULL }; do_cmd(sptr, sptr, "PART", 3, JoinChan); } //sendto_one(sptr, ":%s NICK :%s[away]", sptr->name, parv[0]); if (MyConnect(sptr)) sendto_one(sptr, rpl_str(RPL_NOWAWAY), me.name, parv[0]); return 0; }


 
Alıntı ile Cevapla

Alt 10 Mart 2012, 20:27   #2
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: OPERHELP Sistem MODULU




moduleller için tesekkürler, ikiside güzel
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.

 
Alıntı ile Cevapla

Cevapla

Etiketler
modulu, operhelp, sistem


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


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
operhelp Sorun Voodo mIRC Scripting Sorunları 1 26 Kasım 2012 02:35
#operhelp part Lethel Unreal IRCd 7 16 Nisan 2010 17:03
operhelp omlet takiLsana Komik Loglar 3 22 Şubat 2010 16:35
#OperHelp el3ct mIRC Scripting Sorunları 12 12 Nisan 2008 01:35
Klasik 1 OperHeLp :) XcLusive Komik Loglar 5 04 Nisan 2008 19:55