This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

please help (channelgrabber)

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

please help (channelgrabber)

Post by Arnold_X-P »

tcl that registers channels when these lose record (only it works for dalnet)

the tcl works well when the bot enters the channel and this note that the channel is not registered and registers it, the detail is when the channel loses its record being inside the bot there the tcl it does not work or does not detect that the channel lost its record, apparently its timers or checker set chaseutimer "5" to see the record of the channel does not work.

for the time being the tcl does not express any error in partyline check several times and I did tests
and it is confirmed that its temporizador to see the record of the channel does not work when the bot this one penetrated of the channel
[02:51] -ChanServ- The channel #bolivia2 is not registered.

Code: Select all

# $Id: channelgrabber.tcl, eggdrop-1.6.x 2004/5 awyeah@usa.net Exp $

# Channel Chasing, Channel Grabber Script v3.48.b (channelgrabber.tcl)
#       Script Version: v3.48.b
#       Built Date: June 2004, Last Updated: 3rd September 2004
#       Copyright © 1999-2004 awyeah (awyeah@usa.net)
#       This TCL script is designed to work with eggdrop v1.5.x or higher

#########################################################################
#                     Channel Grabber Script v3.48.b                    #
#                                                                       #
#                                                                       #
# Author: awyeah                                     3rd September 2004 #
# Email: awyeah@usa.net                            Build version 3.48.b #
# Copyright © 2004 awyeah All Rights Reserved    http://www.awyeah.org/ #
#########################################################################
#                                                                       #
# #######                                                               #
# PURPOSE                                                               #
# #######                                                               #
#                                                                       #
# This script was on by a request from some friends. This script is a   #
# good example of a script which interacts with IRC network services    #
# such as ChanServ, NickServ and MemoServ to register dropped channels. #
# This script will basically serve the purpose of registering dropped   #
# channels with the help of ChanServ.                                   #
#                                                                       #
# To define this in an elaborate way we can consider popular named      #
# channels dropping on a network utilizing network services such as     #
# ChanServ and NickServ. Users would want to register that channel on   #
# drop. However when the channel drops and there is no op, people will  #
# park-up inline in the channel to try and somehow get ops to register  #
# that channel. Thus registration cannot be acheived so easily when     #
# many users are parked. So the channel needs to be empty and someone   #
# has to cycle quickly to get ops in order to register that channel     #
# with ChanServ (only a temp. op can register a a channel - the first   #
# person to join a un-registered channel). So this script will sit on   #
# dropped channels and as soon as it sees a channel being empty         #
# (suppose on a netsplit) it will cycle that channel quickly and getops #
# and will then register that channel with ChanServ.                    #
#                                                                       #
# NOTE: This script is only intended for use with IRC networks using    #
# nick, channel registration services such as ChanServ, NickServ and    #
# MemoServ. A good example of a network fulfilling all of these         #
# requirements is 'DALnet'.                                             #
#                                                                       #
#########################################################################
#                                                                       #
# ###########                                                           #
# DESCRIPTION                                                           #
# ###########                                                           #
#                                                                       #
# This script will enhance your eggdrop bot and will make it get ops    #
# on dropped channels (popular channels) so it can register them with   #
# ChanServ. This is a very good script for chasing dropped channels on  #
# which people parked one by one after they are notified by others to   #
# grab the channel if they can get ops when the channel is empty or     #
# through a netsplit.                                                   #
#                                                                       #
# The way this script works is that at first, the bot detects the       #
# number of users on the dropped channel(s) (channels on which the bot  #
# is trying to getops on and register). This is done by using a timer   #
# which checks the number of users defined every 'X' second(s). Then if #
# the channel's user count is one, it is obvious that only the bot is   #
# in the channel and no one else. Then the bot will quickly cycle the   #
# channel and if suppose that it is in no major netsplit and the bot    #
# gets ops on the channel after the cycle, then it will quicky identify #
# it's nick to NickServ if it hasn't previously done so, and it will    #
# info the channel with ChanServ to check if the channel is is dropped  #
# or did someone register it during the netsplit. Then seeing if the    #
# channel is still unregistered the bot will register that channel      #
# quickly with ChanServ and using the same password and description     #
# set in the scripts settings. If the memo feature is enabled, the bot  #
# will also send a memo to the owner or the nick defined through        #
# MemoServ saying that it has sucessfully registered that channel.      #
#                                                                       #
#########################################################################
#                                                                       #
# ############                                                          #
# REQUIREMENTS                                                          #
# ############                                                          #
#                                                                       #
# [1] This script is intended to be used on an IRC Network having       #
#     network services such as ChanServ, NickServ MemoServ, etc.        #
#                                                                       #
# [2] This script is intended to be used on eggdrop 1.5.x/1.6.x or      #
#     higher.                                                           #
#                                                                       #
# [3] This script requires TCL version 8.2 or higher to run.            #
#                                                                       #
#########################################################################
#                                                                       #
# #####                                                                 #
# USAGE                                                                 #
# #####                                                                 #
#                                                                       #
# [1] Please unzip the zipped file channelgrabber.zip and place the tcl #
#     file channelgrabber.tcl in your eggdrops '/scripts' dir onto your #
#     shell along with your other tcl scripts.                          #
#                                                                       #
# [2] Please add a link at the bottom of your eggdrop's .conf file to   #
#     the path of your channelgrabber.tcl, which would be:              #
#                                                                       #
#        source scripts/channelgrabber.tcl                              #
#                                                                       #
# [4] Save your bot's configuration file.                               #
#                                                                       #
# [5] RESTART your eggdrop bot and start registering dropped channels!  #
#                                                                       #
#########################################################################
#                                                                       #
# #######                                                               #
# CONTACT                                                               #
# #######                                                               #
#                                                                       #
# - If you have any suggestions, comments, questions or if you want to  #
#   report bugs, please feel free to email me at: awyeah@usa.net        #
#                                                                       #
# - You can contact me on MSN Messenger, on my ID: awyeah@awyeah.org    #
#                                                                       #
# - You can also catch me on IRC (The DALnet Network)                   #
#                                                                       #
#         /server irc.dal.net:6667, Nick: awyeah                        #
#                                                                       #
#########################################################################
#                                                                       #
# ########                                                              #
# VERSIONS                                                              #
# ########                                                              #
#                                                                       #
#  v3.48.b - Initial release of script.                                 #
# (03/08/04)                                                            #
#                                                                       #
#                                                                       #
#  Latest updated verions of this script can be found on the tcl        #
#  archives of the following websites:                                  #
#                                                                       #
#        http://www.egghelp.org/  -  http://www.tclscript.com/          #
#                                                                       #
#########################################################################
#                                                                       #
# #######                                                               #
# CREDITS                                                               #
# #######                                                               #
#                                                                       #
#  - Thanks to user and ppslim for the control code removing filter     #
#    and everyone on forum.egghelp.org for their continuous support.    #
#                                                                       #
#  - Thanks to my friends who gave the idea and concept for such a      #
#    script, which without them this wouldn't have been possible!       #
#                                                                       #
#  - Thanks to all my friends who supported me all the way through      #
#    this project and helped me to fix the bugs and errors found        #
#    in this script.                                                    #
#                                                                       #
#                                                                       #
#  ./awyeah                                                             #
#                                                                       #
#########################################################################

##################################################
### Start editing variables from here onwards! ###
##################################################

#----------------------------------------#
#    SETUP CHANNEL ACTIVATION OPTIONS    #
#----------------------------------------#

#Set the channels you would like this script to work on. The script will continuously check all these
#channels. If any channel is found to be empty it will quickly cycle it to getops and will register it.
#USAGE: set chasechans "#channel1 #channel2 #channel3 #mychannel #yourchannel"
#(Seperate each entry in the list with a space)
set chasechans "#bolivia2"

#Set there the frequency of time 'in seconds' you would like the bot to continuously check if any channel
#in its working channels list is empty or not. This timer is continuous to infinity, untill the bot is killed.
#USAGE: Use a numerical value between '5 - 20' secs. You can use more than 20 secs but the bot will check each
#channel every 20 secs which can be a bit slow if alot of people are chasing the channel. Using less than 5 secs
#can cause the bot to be in alot of stress and it is not advisable. So try to keep it within the limit.
#(This will be the main timer for this script, checking if any channel is empty so the bot can cycle
#it immediately to getops and register it before anyone joins in and messes everything up)
#Example: 5, 8, 10, 12, 15, 18, 20, 22, 26 etc.
set chaseutimer "5"


#------------------------------#
#    SETUP NETWORK SERVICES    #
#------------------------------#

### IMPORTANT - This script is only intended to be used with networks supporting ChanServ, Nickserv etc ###
#Set your network services in this region which will be utilized by the bot in registring the dropped channels.

### SETUP CHANSERV ###
#Set here the nick of your networks *channel registration service*. This is always going to be 'ChanServ'.
#However some networks such as DALnet do not simply accept /msg chanserv, so then you would have to use
#'chanserv@services.dal.net'. Please set this according to your network as this is very important.
#(Note: This setting is not case-sensitive due to vast network services)
#This setting has been currently set to default for DALnet services.
#Example: ChanServ, ChanServ@services.mynetwork.net
set chasechanserv "chanserv@services.dal.net"

### SETUP NICKSERV ###
#Set here the nick of your networks *nick registration service*. This is always going to be 'NickServ'.
#However some networks such as DALnet do not simply accept /msg nickserv, so then you would have to use
#'nickserv@services.dal.net'. Please set this according to your network as this is very important.
#(Note: This setting is not case-sensitive due to vast network services)
#This setting has been currently set to default for DALnet services.
#Example: NickServ, NickServ@services.mynetwork.net
set chasenickserv "nickserv@services.dal.net"

### SETUP MEMOSERV ###
#Set here the nick of your networks *memo sending service*. This is always going to be 'MemoServ'.
#However some networks such as DALnet do not simply accept /msg memoserv, so then you would have to use
#'memoserv@services.dal.net'. Please set this according to your network as this is very important.
#(Note: This setting is not case-sensitive due to vast network services)
#This setting has been currently set to default for DALnet services.
#Example: MemoServ, MemoServ@services.mynetwork.net
set chasememoserv "memoserv@services.dal.net"


### EXEMPTION FOR SERVICES HOSTS ###
#Set here the host of your network services. All services such as ChanServ, NickServ, MemoServ would
#be having the same host, if not same ident. This option will prevent the bot from ignoring network
#services when it is interacting with them by registering channels, identfying the bot's nick and
#sending memo to the owner for the notification of channel registrations.
#WHOIS Example of ChanServ: (For identifying services hosts)
# ------------------------------------------------------------
# ChanServ is service@dal.net * Channel Registration Service
# ChanServ using services.dal.net DALnet services home base
# ChanServ is an IRC Operator
# ChanServ End of /WHOIS list.
# ------------------------------------------------------------
#Hence the host in this example on /whois chanserv is: 'dal.net'.
#(Note: All network services such as ChanServ, NickServ, MemoServ etc will be having similar hosts.)
#This setting has been currently set to default for DALnet services.
set chaseserviceshost "dal.net"


#------------------------------------------#
#    SETUP NETWORK SERVICES INTERACTION    #
#------------------------------------------#

#Set the type of interaction used with network services such as ChanServ, NickServ, MemoServ etc.
#This will be either in '/msg' or '/notice', if your network services use private messages (/msg)
#or private notices (/notice) for conveying their message. On some networks you have the to choice
#to choose between receiving either private messages or private notices.
#USAGE: [1/2] - [1=PRIVATE MESSAGES, 2=PRIVATE NOTICES]
#(Please set this option according to your network)
set chaseinteract "2"


#------------------------------------------#
#    SETUP REGISTRATION NOTICE MATCHING    #
#------------------------------------------#

### CHANSERV NOTICE MATCHING - CHANNEL IS NOT REGISTERED ###
#Set here the output result of your networks 'ChanServ', when you type */chanserv info #channel* of an
#un-registered channel. When the bot receives this notice from ChanServ it will register the channel.
#Example: Type '/CHANSERV INFO #BLABLA' (Then ChanServ will give you a notice output of an unregistered channel)
#USAGE: (Types of matching procedures - for channel info check)
#If the output of ChanServ is 'The channel #blabla is not registered.'
# ------------------------------------------------------------------------
# All the examples below will match the output given above.
# (1) "*The channel #* is not registered.*" (matches)
# (2) "*The channel * is not registered*" (matches)
# (3) "*channel #* is not registered*" (matches)
# (4) "* channel #* * * registered.*" (matches)
# (5) "*channel * * not registered*" (matches)
# ------------------------------------------------------------------------
# All the examples below will *not* match the output given above.
# (1) "*The channel #mychan* * registered." (will not match)
# (2) "*The channel # * * registered*" (will not match)
# (3) "*channel* # *is* registered.*" (will not match)
# ------------------------------------------------------------------------
# All the examples below are too obvious and wilcards need to be reduced.
# (1) "*The channel #* * * *" (reduce wildcards)
# (2) "*The * #* * not *" (reduce wildcards)
# (3) "*channel* *registered*" (reduce wildcards)
# (4) "*channel* *is* *registered*" (reduce wildcards)
# (5) "The * #* * * *registered*" (reduce wildcards)
# -------------------------------------------------------------------------
#(Note: Please set the correct match, in accordance to ChanServ's displayed
#output on your network, otherwise the bot will not register channels!)
#For default this has been currently set to DALnet's ChanServ output.
set chasematchnotreg "*The channel #* is not registered.*"


### CHANSERV NOTICE MATCHING - CHANNEL HAS BEEN REGISTERED ###
#Set here the output result of your networks 'ChanServ', when you register a channel with a command like
#*/chanserv register #channel pass desc*. The bot will react on receiving this channel registration notice.
#Example: Type '/JOIN #BLABLA' and '/CHANSERV REGISTER #BLABLA PASSWORD DESCRIPTION'
#(Then ChanServ will give you a long notice output that it has registered that channel)
#USAGE: (Types of matching procedures - for channel registration)
#If the output of ChanServ is "The channel #blabla has been registered to you. Your password has been set to...."
#We will only consider the output of ChanServ to be "The channel #blabla has been registered to you."
#(Note: As it is a long notice we only need to match a certain part of it not all)
# ------------------------------------------------------------------------
# All the examples below will match the output given above.
# (1) "*The channel #* has been registered to you.*" ==> matches
# (2) "*The channel * has been registered to you*" (matches)
# (3) "*channel #* * * registered * you*" (matches)
# (4) "* channel * has been registered*" (matches)
# (5) "*channel * has * registered*" (matches)
# ------------------------------------------------------------------------
# All the examples below will *not* match the output given above.
# (1) "*The channel #* * * registered to you.*" (will not match)
# (2) "*The channel * * * registered*" (will not match)
# (3) "*channel* # *has* *been* *registered*" (will not match)
# ------------------------------------------------------------------------
# All the examples below are too obvious and wilcards need to be reduced.
# (1) "*The * #* * * * registered*" (reduce wildcards)
# (2) "*The * #* * been *" (reduce wildcards)
# (3) "*channel* *registered*" (reduce wildcards)
# (4) "*channel* *has* *registered*" (reduce wildcards)
# (5) "The * #* * * * * you." (reduce wildcards)
# ------------------------------------------------------------------------
#(Note: Please set the correct match, in accordance to ChanServ's displayed
#output on your network, otherwise the bot will not register channels!)
#For default this has been currently set to DALnet's ChanServ output.
set chasematchreg "The channel #* has been registered to you."


#----------------------------------------------------------#
#    SETUP NICK IDENTIFICATION AND CHANNEL REGISTRATION    #
#----------------------------------------------------------#

### NICKSERV IDENTIFICATION TYPE ###
#Set the type of NickServ nick identification to use. The bot will need to have an identified
#nick with NickServ in order to register a channel with ChanServ. Since different networks have
#different formats of nick identification of NickServ please select an option similar to your network.
#USAGE: [1/2] - [1=NICKSERV IDENTIFY BOTNICK PASSWORD, 2=NICKSERV IDENTIFY PASSWORD]
#If set to '1' the bot will use */nickserv identify <botnick> <password>* to identify its nick.
#If set to '2' the bot will use */nickserv identify <password>* to identify its nick.
#To check this please type '/NICKSERV HELP IDENTIFY' and then select the same option
#as used on your network to identify the bot's nick with NickServ.
set chasenickservtype "1"


### CHANNEL REGISTRIATION TYPE ###
#Set the type of ChanServ channel registration to use. Since different networks have different
#formats of channel registration of ChanServ please select an option similar to the on your network.
#USAGE: [1/2/3/4/5] - [1=CHAN PASS DESC EMAIL, 2=CHAN PASS DESC, 3=CHAN PASS, 4=PASS DESC, 5=PASS]
#If set to '1' the bot will use */chanserv register <#channel> <password> <description> <email>* to register a channel.
#If set to '2' the bot will use */chanserv register <#channel> <password> <description>* to register a channel.
#If set to '3' the bot will use */chanserv register <#channel> <password>* to register a channel.
#If set to '4' the bot will use */chanserv register <password> <description>* to register a channel.
#If set to '5' the bot will use */chanserv register <password>* to register a channel.
#To check this please type '/CHANSERV HELP REGISTER' and then select the same option
#as used  on your network to identify the bot's nick with NickServ.
set chasechanservtype "2"


#---------------------------------#
#    SETUP NICK IDENTIFICATION    #
#---------------------------------#

#Set this if you want the bot to identify its nick before it tries to register a channel. The bots
#nick should be identified to NickServ before it can register a channel with ChanServ. (This is a
#harmless option and should be enabled eventhough you have a nick identifcation script loaded)
#(Recommended to be switched 'ON')
#USAGE: [0/1] - [0=OFF, 1=ON]
set chaseidentifynick "1"

#Set this to your bots NickServ 'nick password' if you have enabled to identify the bot's nick
#before registering a channel. (Set this option only if you have enabled the previous option)
#(Note: Please do not use any non-aplhanumeric characters)
set chasenickpass "summersxp"


#----------------------------------#
#    SETUP CHANNEL REGISTRATION    #
#----------------------------------#

#Set the ChanServ 'channel password' here which you would like the bot to use to register the
#channels with. (This is a *compulsory* option and should be always set)
#(Note: Please do not use any non-aplhanumeric characters)
set chasechanpass "my.password.channel"

#Set the ChanServ 'channel description' here which you would like the bot to use to register
#the channel with. (This is a *compulsory* option and should be always set)
set chasechandesc "Welcome to my channel nice"

#Set the ChanServ 'channel email' here which you would like the bot to use to register the
#channel with. (This is a compulsory option only if your networks ChanServ requires an
#email address upon registry of a new channel)
set chasechanemail "routing@outlook.com"


#---------------------------#
#    SETUP MEMOING OWNER    #
#---------------------------#

#Set here if you wish the bot to send the owner(you) or anyone a memo through MemoServ when
#it has sucessfully registered a channel. (This is *not* a compulsory option)
#USAGE: [0/1] - [0=OFF, 1=ON] [0=DO NOT SEND A MEMO, 1=SEND A MEMO]
set chasesendmemo "1"

#Set the 'nick' here to whom you would like the bot to 'send a memo'. Set this only if you have
#enabled the previous setting and wish the bot to send a memo upon registering a channel.
set chasememonick "sedition,Arnold_X-P"


#----------------------------#
#    SETUP IGNORE OPTIONS    #
#----------------------------#

#These are some protections for your bot from people who might flood it with large amount of clones
#or botnets. By enabling these and using them with the correct settings your bot will not get excess
#flood, sendq exceeded or timeout from the client server on private-message/ctcp floods.

### CHANNEL MESSAGE PROTECTION ###
#Set here how many channel messages in how many seconds from one host constitutes a flood. If you set
#this to 0:0 or 0 channel flood protection will be disabled. (This will be only for channel messages)
#USAGE: number_of_messages:in_less_than_seconds
#Example: "8:2", "7:5", "12:6", "6:3" etc
set chasepubflood "7:2"

### PRIVATE MESSAGE PROTECTION ###
#Set here how many private messages in how many seconds from one host constitutes a flood. If you set
#this to 0:0 or 0 private flood protection will be disabled. (This will be only for private messages)
#USAGE: number_of_messages:in_less_than_seconds
#Example: "8:2", "7:5", "12:6", "6:3" etc
set chasemsgflood "6:3"

### PRIVATE CTCP PROTECTION ###
#Set here how many ctcps in how many seconds from one host constitutes a flood. If you set this to 0:0
#or 0 ctcp flood protection will be disabled. (This will be only for ctcps sent to the bot)
#USAGE: number_of_ctcps:in_less_than_seconds
#Example: "8:2", "7:5", "12:6", "6:3" etc
set chasectcpflood "3:10"


###############################################################################
### Don't edit anything else from this point onwards, even if you know tcl! ###
###############################################################################

bind join - * chase:check:onjoin

set flood-msg $chasemsgflood
set flood-ctcp $chasectcpflood
bind flud - pub chase:pubflood
bind flud - msg chase:msgflood
bind flud - ctcp chase:ctcpflood
if {($chaseinteract == 1)} { bind msg - * chase:msg:info }
if {($chaseinteract == 2)} { bind notc - * chase:notc:info }
if {($chaseinteract != 1) && ($chaseinteract != 2)} { bind notc - * chase:notc:info }


global flood-msg flood-ctcp; set ctcp-mode 2
set chasechanauthor "awyeah (awyeah@usa.net)"
set chasechanscript "Channel Grabber Script v3.48.b"
set chasechans [split [string tolower $chasechans]]
foreach chasingchan $chasechans { channel add $chasingchan
channel set $chasingchan +bitch +stopnethack; channel set $chasingchan stopnethack-mode 1
channel set $chasingchan flood-chan $chasepubflood; channel set $chasingchan flood-ctcp $chasectcpflood }
if {(![string match *chase:check* [utimers]])} { utimer $chaseutimer chase:check:chans  }

proc chase:check:chans {} {
 global botnick chasechans chaseutimer
  foreach chasingchan $chasechans {
  if {(![botisop $chasingchan]) && ([llength [chanlist $chasingchan]] == 1) && ([string equal -nocase $botnick [chanlist $chasingchan]])} {
   putquick "PART $chasingchan" -next; putquick "JOIN $chasingchan" -next
   putlog "CHANNEL CHASE CYCLE: Cycled $chasingchan as it was empty." } }
  if {(![string match *chase:check* [utimers]])} { utimer $chaseutimer chase:check:chans  }
 return 0
}

proc chase:check:onjoin {nick uhost hand chan} {
 global botnick chasechans
  if {([string equal -nocase $botnick $nick]) && ([lsearch -exact [string tolower $chasechans] [string tolower $chan]] != -1)} {
   utimer 12 [list putlog "CHANNEL OP CHECK: Checking if $botnick has ops on [string tolower $chan]."]
   utimer 15 [list chase:check:join $nick $chan]
   }
}

proc chase:check:join {nick chan} {
 global botnick chasechanserv
  if {([botisop $chan]) && ([llength [chanlist $chan]] == 1) && ([string equal -nocase $botnick [chanlist $chan]])} {
   utimer 2 [list putlog "CHANNEL INFO CHECK: Checking with $chasechanserv if [string tolower $chan] is registered or not."]
   putquick "PRIVMSG $chasechanserv :INFO [string tolower $chan]" -next; return 0
   }
}

proc chase:notc:info {nick uhost hand text {dest ""}} {
 global botnick chasechans chasechanserv chasenickserv chasememoserv chasematchreg chasenickservtype chasesendmemo
 global chasechanpass chasechandesc chasememonick chaseidentifynick chasenickpass chasechanemail chasematchnotreg chasechanservtype
  if {([string equal $nick "ChanServ"]) && ([string equal -nocase $botnick $dest])} {; set text [chase:chanserv:filter $text]
  if {([string match "*$chasematchnotreg*" $text]) && ([lsearch -exact [string tolower $chasechans] [string tolower [lindex $text 2]]] != -1) && ([botisop [string tolower [lindex $text 2]]])} {
   if {($chasenickservtype == 1)} { set chasenickservmsg "IDENTIFY $botnick $chasenickpass" }; if {($chasenickservtype == 2)} { set chasenickservmsg "IDENTIFY $chasenickpass" }
   if {($chasechanservtype == 1)} { set chasechanservmsg "REGISTER [string tolower [lindex $text 2]] $chasechanpass $chasechandesc $chasechanemail" }; if {($chasechanservtype == 2)} { set chasechanservmsg "REGISTER [string tolower [lindex $text 2]] $chasechanpass $chasechandesc" }
    if {($chasechanservtype == 3)} { set chasechanservmsg "REGISTER [string tolower [lindex $text 2]] $chasechandesc" }; if {($chasechanservtype == 4)} { set chasechanservmsg "REGISTER $chasechanpass $chasechandesc" }; if {($chasechanservtype == 5)} { set chasechanservmsg "REGISTER $chasechanpass" }
    if {(($chasenickservtype != 1) && ($chasenickservtype != 2)) || (($chasechanservtype != 1) && ($chasechanservtype != 2) && ($chasechanservtype != 3) && ($chasechanservtype != 4) && ($chasechanservtype != 5))} { return 0 }
     if {($chaseidentifynick == 1)} { putquick "PRIVMSG $chasenickserv :$chasenickservmsg" -next; putlog "IDENTIFYING NICK: Identifying the nick $botnick to $chasenickserv." }; putquick "PRIVMSG $chasechanserv :$chasechanservmsg" -next; putlog "CHANNEL REGISTRATION: Registering [string tolower [lindex $text 2]] with $chasechanserv as it is not registered." }
     if {([string match "*$chasematchreg*" $text]) && ($chasesendmemo == 1) && ($chasememonick != "")} {
      set time [unixtime]; set registertime [ctime $time]; set date [string trim [lindex $registertime 2]]; set month [string trim [lindex $registertime 1]]; set time [string trim [lindex $registertime 3]]
      putserv "PRIVMSG $chasememoserv :SEND $chasememonick I have sucessfully registered the channel [string tolower [lindex $text 2]] on $date $month at $time under the nick $botnick!" -next
      putlog "MEMOING OWNER: Memoing $chasememonick with $chasememoserv to inform the owner that [string tolower [lindex $text 2]] has been registered by me."; return 0
      }
   }
}

proc chase:msg:info {nick uhost hand text} {
 global botnick chaseinteract; set dest $botnick
  chase:notc:info $nick $uhost $hand $text $dest
}


proc chase:msgflood {nick uhost hand type chan} {
 global chaseserviceshost chaseignoretime
 if {([string match -nocase *$chaseserviceshost* [lindex [split $uhost @] 1]]) || ([string equal -nocase $botnick $nick]) || ([matchattr $hand mnof|mnof $chan]) || ([isignore *!*@[lindex [split $uhost @] 1]]) || ([string equal $nick "ChanServ"]) || ([string equal $nick "NickServ"]) || ([string equal $nick "MemoServ"])} { return 1 }
  if {(![string match -nocase *$chaseserviceshost* [lindex [split $uhost @] 1]]) && (![string equal -nocase $botnick $nick]) && (![matchattr $hand mnof|mnof $chan]) && (![isignore *!*@[lindex [split $uhost @] 1]]) && (![string equal $nick "ChanServ"]) && (![string equal $nick "NickServ"]) && (![string equal $nick "MemoServ"])} {
  newignore "*!*@[lindex [split $uhost @] 1]" msg:flood "MSG Flooder" $chaseignoretime; return 1
  }
}

proc chase:pubflood {nick uhost hand type chan} {
 global chaseignoretime
 if {([string equal -nocase $botnick $nick]) || ([matchattr $hand mnof|mnof $chan]) || ([isignore *!*@[lindex [split $uhost @] 1]])} { return 1 }
  if {(![string equal -nocase $botnick $nick]) && (![matchattr $hand mnof|mnof $chan]) && (![isignore *!*@[lindex [split $uhost @] 1]])} {
   newignore "*!*@[lindex [split $uhost @] 1]" channel:flood "Channel Flooder" $chaseignoretime; return 1
   }
}

proc chase:ctcpflood {nick uhost hand type chan} {
 global chaseinoretime
 if {([string equal -nocase $botnick $nick]) || ([matchattr $hand mnof|mnof $chan]) || ([isignore *!*@[lindex [split $uhost @] 1]])} { return 1 }
  if {(![string equal -nocase $botnick $nick]) && (![matchattr $hand mnof|mnof $chan]) && (![isignore *!*@[lindex [split $uhost @] 1]])} {
   newignore "*!*@[lindex [split $uhost @] 1]" ctcp:flood "CTCP Flooder" $chaseignoretime; return 1
   }
}


### Thanks to ppslim and user for this filter ###
proc chase:chanserv:filter {str} {
  regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str
  return $str
}

putlog "\[LOADED\] by $chasechanscript \002$chasechanauthor\002"
if {($chasechans != "")} { putlog "Channel Grabber is \002*ACTIVE*\002 on: \002[string tolower $chasechans]\002" }

return
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
User avatar
Fahad
Op
Posts: 127
Joined: Mon Aug 29, 2016 9:40 am

Now this TCL is Useless.

Post by Fahad »

This TCL is useless because now they ask for Security answer. :D
Post Reply