-Merhaba arkadaşlar,--
-*--- Başlıktanda anlaşıldığı üzere ---Web ---ve ---IRC--- kullanıcılarını, ayırt etme modülü çok küçük bir ---MODUL--- olsada işlem görüyor.--
-*--- Modülün çalışma mantığı ise kullanıcının ---WHOIS---, bilgilerine ---SWHOIS---, komutu aracılığı ile hangi porttan bağlandıysa web veya mirc kullanıcısı olduğunu belirtmekte.--
-İlaveten web'ten giriş olunca,--
IRC'ten giriş olunca,
Belirtilen kanalada uyarı vermektedir
-NOT---: Default PORT 1987'dir siz onu kendi web portunuz ile değiştireceksiniz.--
-İyi Çalışmalar.--
-*--- Başlıktanda anlaşıldığı üzere ---Web ---ve ---IRC--- kullanıcılarını, ayırt etme modülü çok küçük bir ---MODUL--- olsada işlem görüyor.--
-*--- Modülün çalışma mantığı ise kullanıcının ---WHOIS---, bilgilerine ---SWHOIS---, komutu aracılığı ile hangi porttan bağlandıysa web veya mirc kullanıcısı olduğunu belirtmekte.--
-İlaveten web'ten giriş olunca,--
Kod:
[21:01] <WEB> Üzerinden: NICK -> (a) IDENTD -> (confused) FULLNAME -> (Always, look on the bright side of life.) Kullanıcısı giris yaptı.
IRC'ten giriş olunca,
Kod:
[21:02] <mIRC> Üzerinden: NICK -> (b) IDENTD -> (confused) FULLNAME -> (Always, look on the bright side of life.) Kullanıcısı giris yaptı.
Belirtilen kanalada uyarı vermektedir
-NOT---: Default PORT 1987'dir siz onu kendi web portunuz ile değiştireceksiniz.--
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 web "#opers"
#define mirc "#opers"
DLLFUNC int m_kullanici(aClient *sptr, aChannel *chptr);
ModuleHeader MOD_HEADER(m_kullanici)
= {
"m_kullanici",
"Web ve IRC kullanıcılarını ayırt etme by Entrance",
"Web ve IRC kullanıcılarını ayırt etme by Entrance",
"3.2-b8-1",
NULL
};
DLLFUNC int MOD_INIT(m_kullanici)(ModuleInfo *modinfo)
{
HookAddEx(modinfo->handle, HOOKTYPE_LOCAL_CONNECT, m_kullanici);
return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(m_kullanici)(int module_load)
{
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(m_kullanici)(int module_unload)
{
return MOD_SUCCESS;
}
DLLFUNC int m_kullanici(aClient *sptr, aChannel *chptr)
{
if (!IsULine(sptr) && !IsServer(sptr))
{
if (sptr->listener->port == 1987) {
sptr->user->swhois = strdup("Web Kullanıcısı -> www.turkhacks.com");
if ((chptr = find_channel(web, NullChn)) != NullChn)
sendto_channel_butone(&me, &me, chptr, ":WEB PRIVMSG %s :Üzerinden: NICK -> (\2%s\2) IDENTD -> (\2%s\2) FULLNAME -> (\2%s\2) Kullanıcısı giris yaptı.", web, sptr->name, sptr->user->username, sptr->info);
return 0;
}
else {
}
sptr->user->swhois = strdup("mIRC Kullanıcısı -> irc.turkhacks.com");
if ((chptr = find_channel(mirc, NullChn)) != NullChn)
sendto_channel_butone(&me, &me, chptr, ":mIRC PRIVMSG %s :Üzerinden: NICK -> (\2%s\2) IDENTD -> (\2%s\2) FULLNAME -> (\2%s\2) Kullanıcısı giris yaptı.", mirc, sptr->name, sptr->user->username, sptr->info);
return 0;
}
}
-İyi Çalışmalar.--

