Tekil Mesaj gösterimi
Alt 20 Ağustos 2009, 13:59   #6
Çevrimiçi
toXic
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: telnetten özel okuma mümkünmü ?




Kod:   Kodu kopyalamak için üzerine çift tıklayın!
/* * ================================================================== * Filename: m_loggit.c * Description: Real-time Logging * Written by: MartinCo * ================================================================== */ #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> #include <fcntl.h> #include "h.h" // ================================================================== // Definitions & macros // ================================ #define MyMod LoggitModInfo->handle #define DelHook(x) if (x) HookDel(x); x = NULL DLLFUNC char *loggit_privmsg(aClient *, aClient *, aClient *, char *, int); DLLFUNC char *loggit_chanmsg(aClient *, aClient *, aChannel *, char *, int); // ================================================================== // Module header // ================================================================== ModuleHeader MOD_HEADER(m_loggit) = { "Loggit", "$Id: m_loggit.c,v 3.6 2007 MartinCo Exp $", "Loggit", "3.2-b8-1", NULL }; ModuleInfo *LoggitModInfo; static Hook *HookPrivMsg; static Hook *HookChanMsg; static FILE *fp; DLLFUNC int MOD_INIT(m_loggit)(ModuleInfo *modinfo) { int ret = MOD_SUCCESS; LoggitModInfo = modinfo; HookPrivMsg = HookAddPCharEx(MyMod, HOOKTYPE_USERMSG, loggit_privmsg); HookChanMsg = HookAddPCharEx(MyMod, HOOKTYPE_CHANMSG, loggit_chanmsg); return ret; } DLLFUNC int MOD_LOAD(m_loggit)(int module_load) { return MOD_SUCCESS; } DLLFUNC int MOD_UNLOAD(m_loggit)(int module_unload) { DelHook(HookChanMsg); DelHook(HookPrivMsg); return MOD_SUCCESS; } // ================================================================== // Functions for nicknames, channel names and prefixes // ================================================================== DLLFUNC char *loggit_privmsg(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice) { time_t calender_time; struct tm tdate; calender_time = time(NULL); tdate = *localtime(&calender_time); FILE * pFile; pFile = fopen ("privmsg.log", "a"); fprintf (pFile, "%02d-%02d-%02d %02d:%02d [%s > %s] %s\n", tdate.tm_mday, tdate.tm_mon + 1, tdate.tm_year - 100, tdate.tm_hour, tdate.tm_min, cptr->name, acptr->name, text); fclose (pFile); return text; } DLLFUNC char *loggit_chanmsg(aClient *cptr, aClient *sptr, aChannel *chptr, char *text, int notice) { time_t calender_time; struct tm tdate; calender_time = time(NULL); tdate = *localtime(&calender_time); FILE * pFile; pFile = fopen ("chanmsg.log", "a"); fprintf (pFile, "%02d-%02d-%02d %02d:%02d [%s] [%s] %s\n", tdate.tm_mday, tdate.tm_mon + 1, tdate.tm_year - 100, tdate.tm_hour, tdate.tm_min, chptr->chname, cptr->name, text); fclose (pFile); return text; }

tarih ve saat olarak log alıyor. Uneral'in icinde Unreal/ Klasorunde yani privmsg.log ve chanprivmsg.log seklinde log txt leri olusur ftpden de bakarsın dilersen telnettende cd Unreal pico privmsg.log seklindede bakarsin.

 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları tatlim sohbet Mobil Chat