egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AntiAdvertise.tcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Passionate
Voice


Joined: 25 Oct 2005
Posts: 15

PostPosted: Wed Nov 09, 2005 2:05 am    Post subject: AntiAdvertise.tcl Reply with quote

Hello,

The TCL by Rana Usman AntiAdvertise.tcl seems to be having some probs with the cycling.. Its not cycling the channel as per the timer interval. It cycles for the first time as soon as the script is loaded.. after that its not cycling at all. I request someone to check the tcl before its uploaded.

Code:
##------------------------------------ IN THE NAME OF ALLAH THE MOST MERCIFULL -------------------------------------##
#--------------------------------------------------------------------------------------------------------------------#
#                                    ADVERTISE/PRIVATE/DCC SPAM KICK SCRIPT BY RANA USMAN                            #
#--------------------------------------------------------------------------------------------------------------------#
#AUTHOR : RANA USMAN
#Email : coolguy_rusman@yahoo.com
#URL : www.ranausman.tk & www.airevision.tk
#Version : 1
#If you have any suggestion about my script or any way to make it better kindly let me know i will be glad to look forward
#Server : Catch me on *UNDERNET* my nickname is ^Rana^Usman
#if you find any bugs kindly report them at coolguy_rusman@yahoo.com O-R usmanrana33@hotmail.com
###############
# DESCRIPTION #
###############
#Assalam O Aleikum n hello everyone here's another script which will gonna kick the users who advertise different URLs
#and sends invitation to join their channel.This script is effective because there is a option for bot to cycle channel
#after a specific time you will set in the bot configuration.This script will not only kick on channel advertisement
#but also on the private advertisement and it will check for DCC spam too.INSHALLAH you will like it :).This script will
#Also send a message after every 15 minutes to detect spam as there are a lot of IRC scripts which spam on detecting any
#Sort of MSG on main of channel.
#For DCC spam bot will check for following files :- .zip .exe .vbs .rar .ini .htm .html .txt .com .bat .org .net 
###################### Special Thanks to arfer and MysticMan of #TCL @ Dalnet :)  #######################################

###############################
# HOW TO ENABLE CHANNEL CYCLE #
###############################
## To enable bot to cycle channel after specific time DCC to the bot and give the command below
# COMMAND  : .chanset #your_chan +advertisecycle  (TO ENABLE)
# COMMAND  : .chanset #your_chan -advertisecycle  (TO DISABLE)
## The channel cycling wont work untill you will not enable it

#########################
# CONFIGURATION SECTION #
#########################

## Set the channels here on which you want this script to work
# Seperate channels by Space like "#channel1 #channel2 #channel3"
# If you want this script to work on all the channels where ur bot is parked leave it as ""
 
set advertisechans ""

##Set Advertising words here on which you want your bot to kick user
#You can manually add advertising words in the way mentioned below ( *WILD CARDS SUPPORTED* )
# set advertisingword {
# "*word1*"
# "*word2*"
# }

set advertisingword {
  "join *#*"
  "visit*"
  "*#*"
  "*.com*"
  "*www.*"
  "*.org*"
  "*.cc*"
  "*.ca*"
  "*.pk*"
  "*.co*"
  "*.net*"
  "*j0in*"
}


#Set time Below after which you want your bot to cycle the channel (in Minutes)
#After this time bot will cycle the channel and will detect advertisements if found will kick out
set advcycletime "10"

#Set the message below you want to give while bot parting channel
set partspam "-= Detecting Spam =-"

# Set the banmask type to use in banning the User who Advertises.
# Currently BAN Type is set to 1 (*!*@some.domain.com),
# BAN Types are given below;
# 1 - *!*@some.domain.com
# 2 - *!*@*.domain.com
# 3 - *!*ident@some.domain.com
# 4 - *!*ident@*.domain.com
# 5 - *!*ident*@some.domain.com
# 6 - *nick*!*@*.domain.com
# 7 - *nick*!*@some.domain.com
# 8 - nick!ident@some.domain.com
# 9 - nick!ident@*.host.com
set advbantype "1"

#Set the Users Mode you want to Exempt
#The Bot will not kick the user who had the modes you will define below
#You can leave it as it is , if you dont know about it
#Recommended : of
set advusers "of"

###################
# SET KICK REASON #
###################

## Set Kick Reason for spam on channel or Advertise on channel
# The user will be kicked using this reason when someone advertise / Spam on the main of channel
set advertisekick "{Channel Spam} Spammer Detected,Donot advertise here Advertise in your pant"

## Set the kick Reason for DCC spam
# After cycling or if bot detects someone sending file to it the bot will kick the user using this reason
set dccspamkick "{Dcc Spam} Dcc Spam Detected,Spammer is one who wastes his time in drowning a fish"

## Set kick reason for Private Spam
# The user will be kicked using this reason when someone advertise / spam in the private of bot
set pvtspamkick "{Private Spam} Spammer Detected,Spam in your nappy"

###########################
# CONFIGURATION ENDS HERE #
###########################

######################################################################################################################
# APPEAL : Earth Quake on October 8 Recording 7.6 on Richter Scale Striked Pakistan at 8:52 AM and Lead Thousands of #
# Peoples toward death.Over 50 Rural Cities destroyed from map.                                                      #
#                          Kindly Donate your Donations to Help us (www.islamic-releif.com)                          #
######################################################################################################################
######################################################################################################################
#--------------------------------------------------------------------------------------------------------------------#
#  SCRIPT STARTS FROM HERE.YOU CAN MAKE MODIFICATIONS AT UR OWN RISK, I DONT RESTRICT YOU TO NOT TO TOUCH THE CODE!  #
#         MAKE THIS SCRIPT BETTER WITH YOU SKILLS.NO MORE CONFIGURATION REQUIRED BEYOND THIS POINT                   #
#--------------------------------------------------------------------------------------------------------------------#
######################################################################################################################

# ALL THE BINDS #

setudef flag advertisecycle
bind msgm - * privatespam:RanaUsman
bind ctcp - DCC RanaUsman:dcc
bind pubm - * advertising:RanaUsman

# ALL THE PROCEDURES #
#This proc is to detect channel advertisements
proc advertising:RanaUsman {nick uhost hand chan text} {
global advertisingword advertisechans advertisekick banmask advusers
#This checks for enabled channels for advertisescript
if {(([lsearch -exact [string tolower $advertisechans] [string tolower $chan]] != -1)  || ($advertisechans == ""))} {
set text [advertise:filter $text]
set banmask "[advs:banmask $uhost $nick]"
#this detects if there is some advertising word found :-)
foreach advertising [string tolower $advertisingword] {
if {[string match -nocase $advertising $text] || [string match -nocase "* $advertising *" $text] || [string match -nocase "$advertising *" $text] || [string match -nocase "* $advertising" $text]} {
if {[matchattr $hand $advusers]} { return 0 } else {
putquick "MODE $chan +bb $banmask"
putquick "KICK $chan $nick :$advertisekick"
    }
   }
  }
 }
}
# this proc will detect for pvt spam
proc privatespam:RanaUsman {nick uhost hand text} {
global spampvt advertisingword advertisechans pvtspamkick banmask advusers
set text [advertise:filter $text]
set banmask "[advs:banmask $uhost $nick]"
foreach advertising [string tolower $advertisingword] {
if {[string match -nocase $advertising $text] || [string match -nocase "* $advertising *" $text] || [string match -nocase "$advertising *" $text] || [string match -nocase "* $advertising" $text]} {
#below is the action bot will take against spammer and detects it if he is in channel
foreach onchans [channels] {
if {[onchan $nick $onchans]} {
if {[matchattr $hand $advusers]} { return 0 } else {
utimer 15 [list putquick "MODE $onchans +bb $banmask"]
utimer 16 [list putquick "KICK $onchans $nick :$pvtspamkick"]
     }
    }
   }
  }
 }
}
# This proc will check for DCC spam

proc RanaUsman:dcc {nick uhost handle dest key arg} {
 global dccspamkick rusman onechans banmask advertisechans advusers dccspamword
 set banmask "[advs:banmask $uhost $nick]"
 set rusman [string tolower [lindex $arg 1]]
 if {[string match "*.exe" $rusman] || [string match "*.bat" $rusman] || [string match "*.vbs" $rusman] || [string match "*.html" $rusman] || [string match "*.htm" $rusman] || [string match "*.com" $rusman] || [string match "*.net" $rusman] || [string match "*.org" $rusman] || [string match "*.ini" $rusman] || [string match "*.zip" $rusman] || [string match "*.rar" $rusman]} {
 foreach onchans [channels] {
 if {[onchan $nick $onchans]} {
 if {[matchattr $handle $advusers]} { return 0 } else {
 utimer 15 [list putquick "MODE $onchans +bb $banmask"]
 utimer 16 [list putquick "KICK $onchans $nick :$dccspamkick"]
    }
   }
  }
 }
}

#Here is the proc which will let bot towards cycling channel
timer $advcycletime RanaUsman:cycle
proc RanaUsman:cycle {} {
global advcycletime partspam advertisechans
foreach chan [channels] {
if {[lsearch -exact [channel info $chan] +advertisecycle] != -1} {
putserv "PART $chan :$partspam"
putserv "JOIN $chan"
  } 
 }
}
#It will msg channel after every 15 mins to detect spam
timer 15 RanaUsman:checkspam
proc RanaUsman:checkspam {} {
foreach chan [channels] {
putserv "PRIVMSG $chan :0{Detecting Spam} abcdefghijklmnopqrstuvwxyz :-)"
 }
}
#Thanks to someone for this control code removing filter i dont remember his name :-)
proc advertise:filter {str} {
  regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str
  return $str
}
# Different types of BAN for bot to do :-)

proc advs:banmask {uhost nick} {
 global advbantype
  switch -- $advbantype {
   1 { set banmask "*!*@[lindex [split $uhost @] 1]" }
   2 { set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
   3 { set banmask "*!*$uhost" }
   4 { set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }
   5 { set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }
   6 { set banmask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }
   7 { set banmask "*$nick*!*@[lindex [split $uhost "@"] 1]" }
   8 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }
   9 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }
   default { set banmask "*!*@[lindex [split $uhost @] 1]" }
   return $banmask
  }
}
# Ever seen such simple coding ?
# I Completed this script at 11:27 AM on October 14 2005
# APPEAL : Earth Quake in Pakistan damaged a lot kindly donate to help them (www.islamic-releif.com)
##########################################################################################################
#--------------------------------------------------------------------------------------------------------#
putlog "\002=- *Anti Advertis Script* by *Rana Usman* (www.ranausman.tk) has been successfully LOADED -="
#--------------------------------------------------------------------------------------------------------#
##########################################################################################################






Here's The code to check whats wrong .. Smile

Rgds

Passionate.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Nov 09, 2005 2:37 am    Post subject: Reply with quote

yeah, I suggest the same - someone (or better yet, many people) to check if the script they have downloaded from Tcl Archive actually works and rate it - so other people would know that script's quality

don't use this script, use spambuster.tcl - it has been long known to work hehe
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Nov 09, 2005 12:03 pm    Post subject: Reply with quote

Code:
timer $advcycletime RanaUsman:cycle
proc RanaUsman:cycle {} {
global advcycletime partspam advertisechans
foreach chan [channels] {
if {[lsearch -exact [channel info $chan] +advertisecycle] != -1} {
putserv "PART $chan :$partspam"
putserv "JOIN $chan"
  }
 }
}

The timer should also be added in the RanaUsman:cycle proc, also the join line is not needed there. It looks like the script is buggy, I suggest you do what demond suggested.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber