- Home»
- Cod sursa: spam.tcl
spam.tcl
spam.tcl
This tcl script is intended to spam users in private, notices or channel. Because this is a dangerous tool, we remind you that this file is for education purposes. File tested with Eggdrop v1.6.18
| Postat de | Copyright | Categorie | Review user | Vizualizari | Data |
|---|---|---|---|---|---|
| btc | Justdabomb2 | games | Cod netestat | 368 | 2023-12-25 12:00:24 |
##################################################################################################
## ##
## Author: Justdabomb2 <email: edngravy@sbcglobal.net> ##
## Script: Spam Scripts ##
## Version: v3.0 ##
## Date: 10/23/2006 ##
## Tested with: Eggdrop v1.6.18 ##
## ##
## Commands: !spam <nick> - sends spam to the given nick in a private message. ##
## !spam <channel> - sends spam to the given channel. ##
## !notspam <nick> - sends spam to the given nick in a notice. ##
## !notspam <channel> - sends spam to everyone on the given channel in a ##
## notice. ##
## !spamon - Activates the script so that others can use it. ##
## Only the set botowner can use this command. ##
## !spamoff - De-Activates the script so that others can not use it. ##
## Only the set botowner can use this command. ##
## ##
## Installation: ##
## 1. Save the script in your script directory as "spam.tcl". ##
## 1. Save the text file in your script directory as "spam.txt". ##
## 2. add line "source scripts/spam.tcl" to the bottom of your eggdrop ##
## configuration file. ##
## 3. CTRL+F search for 'set dicechan ' and change "#channel" to the nane of ##
## 4. CTRL+F search for 'set ownerofbot ' and change "YourNick" to your main ##
## nick. ##
## 5. Rehash or restart your bot, and type "!spamhelp" in the channel. ##
## ##
## ##
## Bugs: - None known yet, E-mail me if you find any. ##
## ##
## ##
## Features: - If the script gets abused, the bot owner can shut it off. ##
## - Only users with voice, half-op or op, can use commands to send spam. ##
## - Spam can be sent through private message or notice to a nick or channel. ##
## - Spam can only be sent from one channel, so it is easy to notice if it is ##
## abused. ##
## ##
## You do NOT need to change anything in this script (besides what it tells you to change in ##
## the installation), it should work the way it is right now. ##
## ##
## Newer versions on this script will be if I decide something should be added or a bug ##
## needs to be fixed. ##
## ##
## If you notice any problems with the script, please e-mail them to me at ##
## edngravy@sbcglobal.net ##
## ##
## ##
## Please do not re-distribute a modified version of this script. If you do re-distribute ##
## it in it's original form, please give credit to me, and do not claim it as your own. ##
## ##
## ~Thank you! ##
## ##
##################################################################################################
###############################################################
## Do NOT forget to change this to the name of your channel! ##
###############################################################
set spamchan "#channel"
################################################
## Do NOT forget to change this to your nick! ##
################################################
set ownerofbot "YourNick"
#########################################################
## You Do NOT need to change anything below this line! ##
#########################################################
####################################
## Do NOT change these variables! ##
####################################
set spamtxt "scripts/spam.txt"
set spamcreator "Justdabomb2"
set spamver "v3.0"
set spamonoroff 1
#############################
## There are the commands! ##
#############################
bind pub - !spam disp:spam
bind pub - !notspam disp:notspam
bind pub - !binspam disp:binspam
bind pub - !notbinspam disp:notbinspam
bind pub - !spamon spam:on
bind pub - !spamoff spam:off
bind pub - !spamhelp spam:help
#########################################################################
## This is where the '!spam <nick/channel>' part of the script starts. ##
#########################################################################
proc disp:spam {nick host handle chan text} {
global botnick spamchan spamtxt spamonoroff ownerofbot
if { $spamonoroff == 1 } {
if {[string tolower $chan] == [string tolower $spamchan]} {
if { [isop $nick $spamchan] || [ishalfop $nick $spamchan] || [isvoice $nick $spamchan] } {
if { [lindex $text 0] != "" } {
set spamcheck [lindex $text 0]
if {[string tolower $spamcheck] == [string tolower $ownerofbot]} {
putquick "KICK $chan $nick :I don't think so..."
return
}
if {[string tolower $spamcheck] == [string tolower $botnick]} {
putquick "KICK $chan $nick :I don't think so..."
return
} else {
set spamto $spamcheck
}
} else {
set spamto $spamchan
}
set spamfile [open $spamtxt r]
set spamread [split [read $spamfile] \n]
close $spamfile
putquick "PRIVMSG $spamto :\002Spam from $nick -\002"
putquick "PRIVMSG $spamto :[lindex $spamread [rand [llength $spamread]]]"
putquick "PRIVMSG $spamto :[lindex $spamread [rand [llength $spamread]]]"
putquick "PRIVMSG $spamto :[lindex $spamread [rand [llength $spamread]]]"
putquick "PRIVMSG $spamto :[lindex $spamread [rand [llength $spamread]]]"
} else {
set spamfile [open $spamtxt r]
set spamread [split [read $spamfile] \n]
close $spamfile
putquick "NOTICE $nick :Only people with Voice, HalfOp, or Op can use this command."
}
} else {
putquick "PRIVMSG $chan :This command can only be used in $spamchan."
}
} else {
putquick "PRIVMSG $chan :Spam has been deactivated. Ask $ownerofbot to activate it."
}
}
############################################################################
## This is where the '!notspam <nick/channel>' part of the script starts. ##
############################################################################
proc disp:notspam {nick host handle chan text} {
global botnick spamchan spamtxt spamonoroff ownerofbot
if { $spamonoroff == 1 } {
if {[string tolower $chan] == [string tolower $spamchan]} {
if { [isop $nick $spamchan] || [ishalfop $nick $spamchan] || [isvoice $nick $spamchan] } {
if { [lindex $text 0] != "" } {
set spamcheck [lindex $text 0]
if {[string tolower $spamcheck] == [string tolower justdabomb2]} {
putquick "KICK $chan $nick :I don't think so..."
return
}
if {[string tolower $spamcheck] == [string tolower $botnick]} {
putquick "KICK $chan $nick :I don't think so..."
return
} else {
set spamto $spamcheck
}
} else {
set spamto $spamchan
}
set spamfile [open $spamtxt r]
set spamread [split [read $spamfile] \n]
close $spamfile
putquick "NOTICE $spamto :\002Spam from $nick -\002"
putquick "NOTICE $spamto :[lindex $spamread [rand [llength $spamread]]]"
putquick "NOTICE $spamto :[lindex $spamread [rand [llength $spamread]]]"
putquick "NOTICE $spamto :[lindex $spamread [rand [llength $spamread]]]"
putquick "NOTICE $spamto :[lindex $spamread [rand [llength $spamread]]]"
} else {
set spamfile [open $spamtxt r]
set spamread [split [read $spamfile] \n]
close $spamfile
putquick "NOTICE $nick :Only people with Voice, HalfOp, or Op can use this command."
}
} else {
putquick "PRIVMSG $chan :This command can only be used in $spamchan."
}
} else {
putquick "PRIVMSG $chan :Spam has been deactivated. Ask $ownerofbot to activate it."
}
}
############################################################
## This is where the '!spamon' part of the script starts. ##
############################################################
proc spam:on {nick host handle chan arg} {
global spamchan spamonoroff ownerofbot
if {[string tolower $nick] == [string tolower $ownerofbot]} {
if {[string tolower $chan] == [string tolower $spamchan]} {
if { $spamonoroff == 1 } {
putquick "PRIVMSG $chan :Spam is already activated."
} else {
putquick "PRIVMSG $chan :Spam has been activated."
set spamonoroff 1
}
} else {
putquick "PRIVMSG $chan :You can only use this command in $spamchan."
}
} else {
putquick "PRIVMSG $chan :Only Justdabomb2 Can use this command."
}
}
#############################################################
## This is where the '!spamoff' part of the script starts. ##
#############################################################
proc spam:off {nick host handle chan arg} {
global spamchan spamonoroff ownerofbot
if {[string tolower $nick] == [string tolower $ownerofbot]} {
if {[string tolower $chan] == [string tolower $spamchan]} {
if { $spamonoroff == 0 } {
putquick "PRIVMSG $chan :Spam is already deactivated."
} else {
putquick "PRIVMSG $chan :Spam has been deactivated."
set spamonoroff 0
}
} else {
putquick "PRIVMSG $chan :You can only use this command in $spamchan."
}
} else {
putquick "PRIVMSG $chan :Only Justdabomb2 Can use this command."
}
}
##############################################################
## This is where the '!spamhelp' part of the script starts. ##
##############################################################
proc spam:help {nick host handle chan arg} {
global spamchan
if {[string tolower $chan] == [string tolower $spamchan]} {
putquick "NOTICE $nick :\002!spam <nick> \002- sends spam to the given nick in a private message."
putquick "NOTICE $nick :\002!spam <channel> \002- sends spam to the given channel."
putquick "NOTICE $nick :\002!notspam <nick> \002- sends spam to the given nick in a notice."
putquick "NOTICE $nick :\002!notspam <channel> \002- sends spam to everyone on the given channel in a notice."
putquick "NOTICE $nick :\002!spamon \002- Activates the script so that others can use it."
putquick "NOTICE $nick :\002!spamoff \002- De-Activates the script so that others can not use it."
} else {
putquick "NOTICE $nick :Spam is only used in $spamchan."
}
}
putlog "$spamcreator's Spam Script $spamver Loaded!"
IRC Snippets