Kahkaha

Bayıldım

Cool

Kızgın

Mahcup

Öğretici

Şaşkın

Suskun

Tatlı

Üzgün

Süper

Online Kullanici ve Kullanici Rekoru

Ana Sayfa » internet » IRC » Online Kullanici ve Kullanici Rekoru
Online Kullanici ve Kullanici Rekoru

cd ircservices-5.0.xx
pico channels.h

dosyası içerisinde

 

time_t topic_time;   /* When topic was set */satırının hemen altına

 

int anuser;
int maxuser;
time_t maxuser_time;ekleyip kayıt edin ..

pico channels.c

dosyası içerisinde

 

/* Allocate pre-cleared memory */
c = scalloc(sizeof(Channel), 1);satırının hemen altına

 

c->anuser = 0;şeklinde ekleyip ve aynı dosya içerisinde

 

void chan_deluser(User *user, Channel *c)
{
    struct c_userlist *u;
    int i;
    LIST_SEARCH_SCALAR(c->users, user, user, u);
    if (!u) {
 log(“channel: BUG: chan_deluser() called for %s in %s but they ”
     “were not found on the channel’s userlist.”,
     user->nick, c->name);
 return;
    }satırının hemen altına

 

(c->anuser)–;şeklinde ekleyip kayıt edin …

cd modules\chanserv
pico chanserv.h

dosyası içerisinde

 

char *last_topic;  /* Last topic on the channel */satırının hemen üzerine

 

int anuser;
int maxuser;
time_t maxuser_time;şeklinde ekleyip kayıt edin …

pico main.c

dosyası içerisinde

 

static int chanserv_whois(const char *source, char *who, char *extra)
{
    if (irc_stricmp(who, s_ChanServ) != 0)
 return 0;
    send_cmd(ServerName, “311 %s %s %s %s * :%s”, source, who,
      ServiceUser, ServiceHost, desc_ChanServ);
    send_cmd(ServerName, “312 %s %s %s :%s”, source, who,
      ServerName, ServerDesc);
    send_cmd(ServerName, “318 End of /WHOIS response.”);
    return 1;
}satırının hemen altına

 

void ago_time(char *buf, time_t t, User *u)
{
  int days, hours, minutes, seconds;   
  days = t/(24*3600);
  t %= 24*3600;
  hours = t/3600;
  t %= 3600;
  minutes = t/60;
  t %= 60;
  seconds = t;
  sprintf(buf,”%d gün, %d saat, %d dakika ve %d saniye önce”, days, hours, minutes, seconds);                                                            
}şeklinde ekleyin ve aynı dosya içerisinde

 

static int do_channel_create(Channel *c, User *u, int32 modes)
{
    /* Store ChannelInfo pointer in channel record */
    c->ci = get_channelinfo(c->name);
    if (c->ci) {
 /* Store return pointer in ChannelInfo record */
 c->ci->c = c;
    }
    /* Restore locked modes and saved topic */
    /* Note: these should be outside the c->ci test to ensure any spurious
     *       +r modes are cleared */
    check_modes(c);
    restore_topic(c);
    return 0;
}satırını

 

static int do_channel_create(Channel *c, User *u, int32 modes)
{
    /* Store ChannelInfo pointer in channel record */
    c->ci = get_channelinfo(c->name);
    if (c->ci) {
 /* Store return pointer in ChannelInfo record */
 c->ci->c = c;
 c->maxuser = c->ci->maxuser;
        c->maxuser_time = c->ci->maxuser_time;
    } else
        {
        c->maxuser = 1;
        c->maxuser_time = time(NULL);
    }
    /* Restore locked modes and saved topic */
    /* Note: these should be outside the c->ci test to ensure any spurious
     *       +r modes are cleared */
    check_modes(c);
    restore_topic(c);
    return 0;
}şeklinde değiştirin ve aynı dosya içerisinde

 

if (ci && ci->entry_message)
notice(s_ChanServ, user->nick, “(%s) %s”, ci->name, ci->entry_message);satırının üzerine

 

if (c->maxuser < ++(c->anuser)) {
            c->maxuser = c->anuser;
            c->maxuser_time = time(NULL);
        if(ci) {
            ci->maxuser = c->maxuser;
            ci->maxuser_time = c->maxuser_time;
        }
    }şeklinde ekleyin ve aynı dosya içerisinde

 

if (c->topic) {
     ci->last_topic = sstrdup(c->topic);
     strscpy(ci->last_topic_setter, c->topic_setter, NICKMAX);
     ci->last_topic_time = c->topic_time;
 }satırının hemen altına

 

c->maxuser = c->anuser;
c->maxuser_time = time(NULL);
ci->maxuser = c->maxuser;
ci->maxuser_time = c->maxuser_time;şeklinde ekleyin ve aynı dosya içerisinde

 

static void do_info(User *u)
{
char *chan = strtok(NULL, ” “);
char *param = strtok(NULL, ” “);
ChannelInfo *ci;
NickGroupInfo *ngi, *ngi2 = NULL;
char buf[BUFSIZE], *end, *s;satırının altına

 

char buf2[BUFSIZE];
time_t now=time(NULL);şeklinde ekleyin ve aynı dosya içerisinde

 

if (ci->entry_message && CHECK_SHOW_ALL)
notice_lang(s_ChanServ, u, CHAN_INFO_ENTRYMSG, ci->entry_message);satırının hemen üzerine

 

if (ci->c)
send_cmd(s_ChanServ, “NOTICE %s :Online kullanıcı : \2%d\2”, u->nick, ci->c->anuser);
ago_time(buf2, now-ci->maxuser_time, u);
send_cmd(s_ChanServ, “NOTICE %s :Kullanıcı rekoru : \2%d\2 [%s]”, u->nick, ci->maxuser, buf2);şeklinde kaydedin…

cd ..
cd database
pico version4.c

dosyası içerisinde

 

SAFE(write_int32(ci->last_topic_time, f));satırının hemen altına

 

SAFE(write_int16(ci->maxuser, f));
SAFE(write_int32(ci->maxuser_time, f));şeklinde ekleyip kaydedin ve sonra ircservices-5.0.xx
ana klasör içerisinde

make
make install

yaparak servisinizi restartlayın.sunucunuza girerek kayıtlı bir
kanalınıza info cekin..
daha sonra tekrar

cd ircservices-5.0.xx\modules\database
pico version4.c

dosyasına tekrar girip içerisinde

 

SAFE(read_int32(&tmp32, f));
ci->last_topic_time = tmp32;satırını bulup hemen altına

 

SAFE(read_int16(&tmp16, f));
ci->maxuser = tmp16;
SAFE(read_int32(&tmp32, f));
ci->maxuser_time = tmp32;ekleyip dosyayı kaydediyoruz ve sonra ircservices-5.0.xx
ana klasör içerisinde

make
make install

yaparak servisinizi tekrar restartlayın.Güle güle kullanın

Kodu yazarı : Diablo

Online Kullanici ve Kullanici Rekoru - Yorumlar

YORUMLARINIZI PAYLAŞIN

 

Yapılan Yorumlar

FBI18 Aralık 2009

Bu kodlada karşılaşmıştım daha önce bi kaç sunucuda aktif durumda ama eskisi gibi rağbet görmeyen bir code diyebilirim. İyi paylaşım.

BENZER İÇERİKLERİlginizi çekebilecek diğer içerikler

irc invex komutu

irc invex komutu 17 Ocak 2011

irc notify kullanımı

irc notify kullanımı 17 Ocak 2011

SOSYAL MEDYADA BİZSitemizin sosyal medya hesapları

RASTGELE İÇERİKLER

Web Sohbet Güncellendi Mehmet Akif Ersoy-Fatih Kürsüsünde Yüreğimden yüreğine Bedir Eczanesi ALANYA TEKNOLOJİ SERVİS. DAN. HİZ. LTD. ŞTİ. Sevgi Işığı Büyük Rant Sona Erdi

FACEBOOK'TA BİZ

Hoşgeldiniz

kelebek.gen.tr – kelebek mirc - Tüm Hakları Saklıdır