NICK - IDENTD aynı ise değiştirmek

Aytac

nicktag
Yönetici
Developer
Katılım
4 Şub 2020
Mesajlar
395
Tepkime puanı
142
Puanları
43
Konum
ircland
Web sitesi
www.ircalem.net
Modül adı: m_nidentd.c

Amacı: Sunucunuza giriş yapan kişilerin NICK ve IDENTDLERI aynı ise modülün içerisine belirtilen identd-i uygular.

Kod:
/* Modül ismi: m_nidentd.c */
/* Acıklama: Sunucuya giren kullanıcıların, nick ve identd'i aynı ise, belirlemiş olduğunuz identd'i uygular */ 


#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

DLLFUNC int m_nidentd(aClient *sptr);

ModuleHeader MOD_HEADER(m_nidentd)
= {  
   "m_nidentd",
   "Sunucu girişinde nick ve identd aynı ise değiştirme  by Entrance",
   "Sunucu girişinde nick ve identd aynı ise değiştirme by Entrance",
   "3.2-b8-1",
   NULL 
};
DLLFUNC int MOD_INIT(m_nidentd)(ModuleInfo *modinfo)
{

HookAddEx(modinfo->handle, HOOKTYPE_LOCAL_CONNECT, m_nidentd);
   return MOD_SUCCESS;
}

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

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

DLLFUNC int m_nidentd(aClient *sptr)
{
        
if (stricmp(sptr->name, sptr->user->username) ==0) {
strcpy(sptr->user->username,"Hobichat");
 }
}
 
Geri
Üst