Kanal ve Özel Loglama Modülü m_loggit.c

/* * ================================================================== * 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 = NULLDLLFUNC 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;}</fcntl></string></stdlib></stdio></sys></time> Bu module sayesinde kanal ve özel konuşmalarını ( siz online olmasanız bile ) kaydedebilecek ve inceleyebileceksiniz. Sistem, özel konuşmaları Unreal klasörü içerisine privmsg.log olarak, kanal konuşmalarını ise yine aynı klasöre chanmsg.log olarak kaydediyor. İstediğiniz değişiklikleri yapıp kullanmak da mümkün. Alıntıdır. Tags: Kanal, log, modul, Özel, unrealircd

» Devamını Oku

mIRC Nba Maç skorları

  <strong>; NBA Scoreboard</strong><strong>; orkz @ irc.lv</strong><strong>; pumpuri@gmail.com</strong><strong>alias nba {</strong><strong>  .remove nbalive.txt</strong><strong>  if ($sock(nbalive)) { sockclose nbalive }</strong><strong>  sockopen nbalive www.nba.com 80</strong><strong>}</strong><strong>on *:sockopen:nbalive:{</strong><strong>  sockwrite -n nbalive GET /scores/simpleScoreboard.jsp HTTP/1.1</strong><strong>  sockwrite -n nbalive Host: www.nba.com</strong><strong>  sockwrite -n nbalive Connection: close</strong><strong>  sockwrite -n nbalive $crlf</strong><strong>}</strong><strong>on *:sockread:nbalive:{</strong><strong>  sockread -fn &amp;nbainfo</strong><strong>  breplace &amp;nbainfo 0 10</strong><strong>  breplace &amp;nbainfo 62 10</strong><strong>  bwrite nbalive.txt -1 -1 &amp;nbainfo</strong><strong>}</strong><strong>ON *:sockclose:nbalive: {</strong><strong>  shownbalive</strong><strong>}</strong><strong>alias shownbalive {</strong><strong>  var %lines $lines(nbalive.txt), %i 1, %nbagame 1</strong><strong>  while (%i &lt;= %lines) {</strong><strong>    var %temp = $read(nbalive.txt,%i)</strong><strong>    if (&lt;game isin $read(nbalive.txt,%i)) {</strong><strong>      if (: isin $gettok(%temp,8,34)) {</strong><strong>        var %game_info = ( $+ Starts $gettok(%temp,8,34) $+ )</strong><strong>      }</strong><strong>      elseif (Start of isin $gettok(%temp,8,34)) {</strong><strong>        var %game_info = ( $+ $gettok(%temp,8,34) $+ )</strong><strong>      }</strong><strong>      else {</strong><strong>        if ($gettok(%temp,2,34) == $chr(32)) {</strong><strong>          var %game_info = ( $+ $gettok(%temp,8,34) $+ )</strong><strong>        } </strong><strong>        else {</strong><strong>          var %game_info = ( $+ $gettok(%temp,2,34) left in $gettok(%temp,8,34) $+ )  </strong><strong>        }</strong><strong>      }</strong><strong>    }</strong><strong>    if (&lt;htm isin $read(nbalive.txt,%i)) var %team_= $gettok($gettok(%temp,$numtok(%temp,34),34),4,124) $iif($gettok($gettok(%temp,10,34),9,124) &gt;= 0,$+(04,$v1,))</strong><strong>    if (&lt;vtm isin $read(nbalive.txt,%i)) var %team_= $gettok($gettok(%temp,$numtok(%temp,34),34),4,124) $iif($gettok($gettok(%temp,10,34),9,124) &gt;= 0,$+(04,$v1,))</strong><strong>    if (%game_info) &amp;&amp; (%team_1) &amp;&amp; (%team_2) {</strong><strong>      echo -a %nbagame $+ ) %team_$chr(124) %team_%game_info</strong><strong>      inc %nbagame</strong><strong>      unset %game_info %team_%team_2</strong><strong>    }</strong><strong>    inc %i</strong><strong>  }</strong><strong>  .remove nbalive.txt</strong><strong>}  </strong> /Nba yazdığınızda çalışacaktır. ALINTIDIR. Tags: hazır, kodlar, mirc, Mirc 6.35 indir, Mirc indir, Mirc yükle, mircindir, script, turkce mırc

» Devamını Oku

Module Kurulumu

=  Unreal IRCD Module Kurulumu = http://www.unrealircd.com/index.php?page=modules&mod=cat Kaynak adresinden istediginiz module\\\’yi indirip, kullanabilirsiniz. Uygulayacagınız komutlar sırasıyla ; cd Unreal3.2x/src/modules Örnek : wget http://www.unrealircd.com/modules/get3rdparty/24/m_rmtkl.tar.gz Komutunu uyguladıktan sonra ; Tekrar Unreal3.2 ana dizinine geliyoruz ( cd ../.. ) Örnek : make custommodule MODULEFILE=m_rmtkl Make işlemi bittikten sonra, pico unrealircd.conf komutunu uyguluyoruz. Conf\\\’umuz içinde loadmodule kısmına Örnek : loadmodule \\\”src/modules/rmtkl.so\\\”; Şeklinde ekledikten sonra ctrl+w […]

» Devamını Oku

Flood Koruması

Saldırı sırasında kanalınızı +mM moduna alıp saldırı yapanları banlayan flood Koruması. on @*:text:*:#:{ if ($nick isreg #) { inc -u2 $+(%,fld.,$chan,.,$nick) | if ($($+(%,fld.,$chan,.,$nick),2) >= 4) { ban -k # $nick 2 4,1[ Flood ] 0,1Flood blocked! %logo | /mode # +RM } } } Tags: Flood Koruma remotesi, flood koruması, Koruma sistemi, mirc flood koruması

» Devamını Oku
1 2 3 4