Tekil Mesaj gösterimi
Alt 29 Ocak 2008, 15:36   #12
Çevrimdışı
ysfm
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Anopede dj helper ve globaloplar icin otomatik host ve ajoin modulesi




PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
#include "module.h"
#define AUTHOR "n00bie"
#define VERSION "$Id: ns_joinradiochan.c v1.0.1 14-01-2007 n00bie $"
/* -------------------------------------------------------------------------------
 * Name  : ns_joinradiochan.c
 * Author : n00bie
 * Version : 1.0.1
 * Date  : 06-09-2006
 * Updated : 14-01-2007
 * -------------------------------------------------------------------------------
 * Tested & Supported: Unreal3.2.6, InspIRCd, PTlink, UltimateIRCd2, ViagraIRCd
 * 
 * Description: When a user having HalfOP access and above on the Network Help
 * channel identify his nick to services, this module will forcefully join the
 * user to the network Help Channel (which is defined on services.conf).
 * If the user have no access on the Help Channel nothing is done.
 *
 * NOTE: In order for this module to work RadioChannel must be enabled or defined
 * in services.conf
 * --------------------------------------------------------------------------------
 * Changelog:
 * v1.0.0 - First Public Release.
 * v1.0.1 - Minor Code Update.
 *    Added support for InspIRCd, PTlink, UltimateIRCd2, ViagraIRCd.
 * --------------------------------------------------------------------------------
 * This module have no configurable option.
*/
#define RadioChannel "#radyo"

int joinradio(User *u);
int AnopeInit(int argcchar **argv)
{
 
Command *c;
 
createCommand("ID"joinradioNULL, -1, -1, -1, -1, -1);
 
moduleAddCommand(NICKSERVcMOD_TAIL);
 
createCommand("IDENTIFY"joinradioNULL, -1, -1, -1, -1, -1);
 
moduleAddCommand(NICKSERVcMOD_TAIL);
 if (!
RadioChannel) {
  
alog("\002RadioChannel\002 is not enabled in services.conf. Unloading module.");
  return 
MOD_STOP;
 } else {
  
alog("%s: ns_joinradiochan: Successfully loaded module."s_NickServ);
 }
 
moduleAddAuthor(AUTHOR);
 
moduleAddVersion(VERSION);
 return 
MOD_CONT;
}
int joinradio(User *u)
{
 
ChannelInfo *ci cs_findchan(RadioChannel);
 if (
check_access(uciCA_HALFOP) || check_access(uciCA_HALFOPME)) {
  
anope_cmd_svsjoin(s_NickServu->nickRadioChannel);
  if (!
stricmp(IRCDModule"inspircd") || 
   !
stricmp(IRCDModule"ptlink") || 
   !
stricmp(IRCDModule"ultimate2") || 
   !
stricmp(IRCDModule"unreal32") || 
   !
stricmp(IRCDModule"viagra")) {
    
anope_cmd_svsjoin(s_ChanServu->nickRadioChannel);
                                
send_cmd(s_HostServ"CHGHOST %s Dj.servername.net"u->nicku->nick);
}
 }
 return 
MOD_CONT;
}
void AnopeFini(void)
{
 
alog("%s: ns_joinradiochan%s: Module Unloaded."s_NickServMODULE_EXT);
}
/* EOF */ 


 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları sohbet odaları Benimmekan Mobil Sohbet