IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Unreal IRCd (https://www.ircforumlari.net/unreal-ircd/)
-   -   ~T:block:kelime komutu eklentisi (https://www.ircforumlari.net/unreal-ircd/182267-t-block-kelime-komutu-eklentisi.html)

SeYH_SaMiL 23 Şubat 2009 07:43

~T:block:kelime komutu eklentisi
 
Arkadaşlar bu ~T:block:kelime komutunu kullanıma açmak için bir edit gerekiyor fakat bilgi bulamadım bilginiz varsa paylaşabilirmisiniz, forumda bir çok kelimede arama yaptım ama ne yazıkki bulamadım bu editi. ircservices kullanıyorum.

toXic 24 Şubat 2009 17:54

Cevap: ~T:block:kelime komutu eklentisi
 
Modul o edit değilki? :S

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

Burdan çekin.

Bilgi :

Bu modül ile size ( "metin yasağı") kanal bazı kelimeleri encoutnering üzerine harekete geçmeye ircd talimat bir genişletilmiş yasağı ~ T: <action>: <globmask> ekler. Desteklenen eylemler 'blok' () ve 'tüm cümle blok sansür' () <censored> ile sözcük yerine vardır.
See the README for more information.
Daha fazla bilgi için README bakın.
Example usage: +bb ~T:block:*[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] ~T:censor:*badword*
Örnek kullanım: + BB ~ T: block: * http:// * ~ T: Block: * KötüKelime*

Şeklindedir.

SeYH_SaMiL 25 Şubat 2009 06:38

Cevap: ~T:block:kelime komutu eklentisi
 
Edit diye bir kaç forumda okudum fakat geniş bilgi yoktu, bende emin değildim modülmü yoksa editmi diye, teşekkürler paylaştığın için toXic.

OzGuR 20 Nisan 2009 17:03

Cevap: ~T:block:kelime komutu eklentisi
 
Bu modülü bende kullanıyorum. Edit mi değil mi bilmiyorum , fakat bende ki modul Syzop adlı arkadaşın yazmış olduğu modul olarak görünüyor işinizi görücekse paylaşıma sunayım.

toXic 20 Nisan 2009 17:29

Cevap: ~T:block:kelime komutu eklentisi
 
textban.c 1.0

Kod:

/*
 * Text ban. (C) Copyright 2004-2005 Bram Matthys.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * See README for instructions
 * Or scroll down ~30 lines to see 2 define's which you can tweak.
 */
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "proto.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"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
/** Max number of text bans per channel.
 * This is basically the most important setting. It directly affects
 * how much CPU you want to spend on text processing.
 * For comparison: with 10 textbans of max length (150), and messages said in
 * the channel with max length (~500 bytes), on an A1800+ (1.53GHz) machine
 * this consumes 30 usec per-channel message PEAK/MAX (usec = 1/1000000 of a
 * second), and in normal (non-supersize messages) count on 10-15 usec.
 * Basically this means this allows for like >25000 messages per second at
 * 100% CPU usage in a worth case scenario. Which seems by far sufficient to me.
 * Also note that (naturally) only local clients are processed, only people
 * that do not have halfops or higher, and only channels that have any
 * textbans set.
 * UPDATE: The speed impact for 15 bans per channel is 42 usec PEAK.
 * HINT: If you are hitting the "normal banlimit" before you actually hit this
 *      one, then you might want to tweak the #define MAXBANS and #define
 *      MAXBANLENGTH in include/struct.h. Doubling MAXBANLENGTH is usually
 *      a good idea, and then you can enlarge MAXBANS too a bit if you want to.
 */
#define MAX_EXTBANT_PER_CHAN    15 /* Max number of ~T bans in a channel. */
/** Max length of a ban.
 * NOTE: This is mainly for 'cosmetic' purposes. Lowering it does not
 *      decrease CPU usage for text processing.
 */
#define MAX_LENGTH              150 /* Max length of a ban */
/** Benchmark mode.
 * Should never be used on production servers.
 * Mainly meant for debugging/profiling purposes for myself, but if you
 * have a test server and are curious about the speed of this module,
 * then you can enable it of course ;).
 */
#undef BENCHMARK
 
ModuleHeader MOD_HEADER(textban)
  = {
 "textban",
 "v1.0",
 "ExtBan ~T (textban) by Syzop",
 "3.2-b8-1",
 NULL
    };
/* Forward declarations */
char *extban_modeT_conv_param(char *para_in);
int extban_modeT_is_banned(aClient *sptr, aChannel *chptr, char *ban, int type);
int extban_modeT_is_ok(aClient *sptr, aChannel *chptr, char *para, int checkt, int what, int what2);
DLLFUNC char *textban_chanmsg(aClient *, aClient *, aChannel *, char *, int);
DLLFUNC int MOD_INIT(textban)(ModuleInfo *modinfo)
{
ExtbanInfo req;
 memset(&req, 0, sizeof(ExtbanInfo));
 req.flag = 'T';
 req.conv_param = extban_modeT_conv_param;
 req.is_banned = extban_modeT_is_banned;
 req.is_ok = extban_modeT_is_ok;
 
 if (!ExtbanAdd(modinfo->handle, req))
 {
  config_error("textban module: adding extban ~T failed! module NOT loaded");
  return MOD_FAILED;
 }
 ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
 HookAddPCharEx(modinfo->handle, HOOKTYPE_CHANMSG, textban_chanmsg);
 return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(textban)(int module_load)
{
 return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(textban)(int module_unload)
{
 return MOD_SUCCESS;
}
unsigned int counttextbans(aChannel *chptr)
{
Ban *ban;
unsigned int cnt = 0;
 for (ban = chptr->banlist; ban; ban=ban->next)
  if ((ban->banstr[0] == '~') && (ban->banstr[1] == 'T') && (ban->banstr[2] == ':'))
  cnt++;
 for (ban = chptr->exlist; ban; ban=ban->next)
  if ((ban->banstr[0] == '~') && (ban->banstr[1] == 'T') && (ban->banstr[2] == ':'))
  cnt++;
 return cnt;
}
 
int extban_modeT_is_ok(aClient *sptr, aChannel *chptr, char *para, int checkt, int what, int what2)
{
int n;
 if ((what == MODE_ADD) && (what2 == EXBTYPE_EXCEPT) && MyClient(sptr))
  return 0; /* except is not supported */
 /* We check the # of bans in the channel, may not exceed MAX_EXTBANT_PER_CHAN */
 if ((what == MODE_ADD) && (checkt == EXBCHK_PARAM) &&
      MyClient(sptr) && !IsAnOper(sptr) &&
    ((n = counttextbans(chptr)) >= MAX_EXTBANT_PER_CHAN))
 {
  /* We check the # of bans in the channel, may not exceed MAX_EXTBANT_PER_CHAN */
  sendto_one(sptr, err_str(ERR_BANLISTFULL), me.name, sptr->name, chptr->chname, para);
  sendnotice(sptr, "Too many textbans for this channel");
  return 0;
 }
 return 1;
}
/** Ban callbacks */
char *extban_modeT_conv_param(char *para_in)
{
static char retbuf[MAX_LENGTH+1];
char para[MAX_LENGTH+1], *action, *text, *p;
 strlcpy(para, para_in+3, sizeof(para)); /* work on a copy (and truncate it) */
 /* ~T:<action>:<text> */
 text = strchr(para, ':');
 if (!text)
  return NULL;
 *text++ = '\0';
 /* para=action, text=text */
 if (!*text)
  return NULL; /* empty text */
 
 /* ~T:<action>:<text> */
 if (!strcasecmp(para, "block"))
  action = "block";
 else
  return NULL; /* unknown action */
 /* check the string.. */
 for (p=text; *p; p++)
  if ((*p == '\003') || (*p == '\002') ||
      (*p == '\037') || (*p == '\026') ||
      (*p == ' '))
  return NULL; /* codes not permitted, would be confusing since they are stripped */
 /* Rebuild the string.. */
 snprintf(retbuf, sizeof(retbuf), "~T:%s:%s", action, text); /* can be cut off if too long */
 return retbuf;
}
int extban_modeT_is_banned(aClient *sptr, aChannel *chptr, char *ban, int type)
{
 /* Never banned here */
 return 0;
}
/* Channel message callback */
DLLFUNC char *textban_chanmsg(aClient *cptr, aClient *sptr, aChannel *chptr, char *text, int notice)
{
static char filtered[512]; /* temp buffer */
Ban *ban;
long fl;
int done=0;
char *p;
#ifdef BENCHMARK
struct timeval tv_alpha, tv_beta;
 gettimeofday(&tv_alpha, NULL);
#endif
 if (!MyClient(sptr))
  return text; /* Remote and servers are not affected */
 fl = get_access(sptr, chptr);
 if (fl & (CHFL_HALFOP|CHFL_CHANOP|CHFL_CHANPROT|CHFL_CHANOWNER))
  return text; /* halfop or higher */
 filtered[0] = '\0'; /* NOT needed, but... :P */
 for (ban = chptr->banlist; ban; ban=ban->next)
 {
  if ((ban->banstr[0] == '~') && (ban->banstr[1] == 'T') && (ban->banstr[2] == ':'))
  {
  if (!done)
  {
    /* Prepare the text [done here, to avoid useless CPU time] */
    strlcpy(filtered, StripControlCodes(text), sizeof(filtered));
    done = 1;
  }
  p = ban->banstr + 3;
  if (!strncasecmp(p, "block:", 6))
  {
    if (!_match(p+6, filtered))
    {
    sendto_one(sptr, err_str(ERR_CANNOTSENDTOCHAN),
      me.name, sptr->name, chptr->chname,
      "Message blocked due to a text ban", chptr->chname);
    return NULL;
    }
  }
  }
 }
#ifdef BENCHMARK
 gettimeofday(&tv_beta, NULL);
 ircd_log(LOG_ERROR, "TextBan Timing: %ld microseconds (%s / %s / %d)",
  ((tv_beta.tv_sec - tv_alpha.tv_sec) * 1000000) + (tv_beta.tv_usec - tv_alpha.tv_usec),
  sptr->name, chptr->chname, strlen(text));
#endif
 return text;
}

mode #kanal +b ~T:*kelime* ile, Kullanıcıların Kanala *kelime* Yazmasını Engelleyebilirsiniz Bu Komutla. UnrealIRCd ile Alakalı Oldugu Dolayısıyla, Konu, UnrealIRCd Bölümüne Tasınmıstır.

SerKaaNN 22 Nisan 2009 12:57

Cevap: ~T:block:kelime komutu eklentisi
 
konuyla ilgili olduğunu düşündüğüm için ayrı bir konu açmadım neyse sorunuma söyleyeyim.

kullanıcı blocklu bir kelime yazdığında -irc.server.org- Server IRC Protect! Reklam/Küfür Tespit Edilmiştir! Mesajınız gönderilmedi. karşısına bu uyarı çıkıyor, bunu nasıl değiştirebiliriz ve blocklu kelimeleri nasıl düzenleyebiliriz. yardımcı olursanız sevinirim.

toXic 22 Nisan 2009 14:25

Cevap: ~T:block:kelime komutu eklentisi
 
BU Ya Spamfilter'den olabilir yada baska Modullerden önce onu bulmak lazım

SerKaaNN 22 Nisan 2009 17:35

Cevap: ~T:block:kelime komutu eklentisi
 
hımm tşk ederim saolasın.

networking 13 Eylül 2009 00:55

Cevap: ~T:block:kelime komutu eklentisi
 
toXic Kardeş kusura bakma ama bu modulu kurdum bu hatayı verdi cevap yazarsan sevinirim make[2]: Entering directory `/home/sohbetde/Unreal3.2/src/modules'
make[2]: *** No rule to make target `txtban.c', needed by `custommodule'. Stop.
make[2]: Leaving directory `/home/sohbetde/Unreal3.2/src/modules'
make[1]: *** [custommodule] Error 2
make[1]: Leaving directory `/home/sohbetde/Unreal3.2/src'
make: *** [custommodule] Error 2
Yada tam kurulumunu verirsen sevinirm benim mekanın adı ./server irc.sohbetdevri.com yani mircturk ün kopyası gelir görürsen anlarsın :)

GemLik 13 Eylül 2009 02:50

Cevap: ~T:block:kelime komutu eklentisi
 
make[2]: *** No rule to make target `txtban.c', needed by `custommodule'. Stop.


modulu uygun yere atmamışsınız sanırım modulun olmadğını söylüyor kontrol ediniz.


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 17:21.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk