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 

troll.tcl Version 2.1 (20.03.2012)

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


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Mon Aug 10, 2009 7:25 pm    Post subject: troll.tcl Version 2.1 (20.03.2012) Reply with quote

Code:

# Displays random troll quotes in the channel using a simple !troll trigger and makes people suffer
#
# Official troll.tcl and updated version, at http://bsdunix.info/eggdrop/scripts/troll.tcl
#
# troll TCL for eggdrop by spithash@DALnet #Codemasters
#
# version 1.0
#


egghelp fetch: http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1618
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl


Last edited by spithash on Mon Mar 26, 2012 4:39 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Tue Oct 19, 2010 2:50 pm    Post subject: troll.tcl version 2.0 Reply with quote

troll.tcl version 2.0 is out.

Code:
#############################################################################################################
# Troll v2.0 TCL by spithash@DALnet                                                                         #
#                                                                                                           #
# Gets troll quotes and makes people suffer!                                                                #
# Version 2.0 is way different since there's no database in the file. It fetches the quotes by a website.   #
# Also, you can ".chanset #channel +troll" to enable it.                                                    #
# I added this just in case you don't want your trolls to be available globally.                            #
#############################################################################################################
# Any official release of troll.tcl will be announced in http://forum.egghelp.org/viewtopic.php?t=17078     #
# Official troll.tcl updates will be in egghelp.org's TCL archive,                                          #
# Or here: http://bsdunix.info/eggdrop/scripts/troll.tcl                                                    #
# (Keep it to "puthelp" cause I didn't add any flood protection yet,                                        #
# and it may cause your bot "Excess Flood" quit if it's in "putserv" or "putquick",                         #
# if someone floods the !troll trigger or if the troll quote is too long.)                                  #
#############################################################################################################
# Credits: special thanks to: username, speechles and arfer who helped me with this :)                      #
#############################################################################################################
setudef flag troll
bind pub - !troll parce
proc parce {nick uhost hand chan text} {
    if {[channel get $chan troll]} {
::http::config -urlencoding utf-8 -useragent "Mozilla/5.0 (X11; U; Linux i686; el-GR; rv:1.8.1) Gecko/2010112223 Firefox/3.6.12"
set url [::http::geturl "http://rolloffle.churchburning.org/troll_me.php" -timeout 15000]
set data [::http::data $url]
::http::cleanup $url
regsub -all -- {\n} $data "" data;
regexp -nocase -- {<p .*?>(.*?)</p>} $data -> info
regsub -all -- {(<strong[^>]*>)|(</strong>)} $info "\002" info;
while { $info != "" } {
    puthelp "PRIVMSG $chan :[string range $info 0 419]"
    set info [string range $info 420 end]
    }
  }
}
putlog "\002troll.tcl\002 v2.0 by spithash@DALnet iz up and trollin'"
# EOF


I really thank you guys for helping me out Smile
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl


Last edited by spithash on Tue Jan 17, 2012 8:24 am; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Pixelz
Voice


Joined: 15 Jun 2005
Posts: 24
Location: EFnet

PostPosted: Fri Oct 22, 2010 2:06 am    Post subject: Reply with quote

There's also this: http://rolloffle.churchburning.org/fortune/trolldb
_________________
Pixelz @ EFnet, freenode, QuakeNet, Undernet
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Mon Oct 25, 2010 5:58 am    Post subject: egghelp.org's fetch Reply with quote

egghelp.orgs's fetch
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Lucifer
Voice


Joined: 01 Nov 2006
Posts: 17

PostPosted: Sat Nov 20, 2010 8:29 pm    Post subject: error!!!!! Reply with quote

[16:22] <(FreeBSD> [16:22:08] Tcl error [parce]: invalid command name "::http::config"
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Sun Nov 21, 2010 1:34 am    Post subject: Re: error!!!!! Reply with quote

Lucifer wrote:
[16:22] <(FreeBSD> [16:22:08] Tcl error [parce]: invalid command name "::http::config"


you need http.tcl loaded first
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Tue Jan 17, 2012 8:19 am    Post subject: Reply with quote

For any official release of troll.tcl you may refer to egghelp.org's tcl archive.

Let me know if you are experiencing any problems with the script, I will appreciate it Very Happy
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Mon Mar 26, 2012 4:33 am    Post subject: troll.tcl version 2.1 Reply with quote

Brand new version of troll.tcl 2.1 is out!
Added flood protection. Well, throttle control. Smile

Fetch it from egghelp's tcl archive:

http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1618

Enjoy the lulz!!!
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Dominatez
Voice


Joined: 14 Jan 2019
Posts: 28
Location: United Kingdom

PostPosted: Thu Aug 15, 2019 9:02 am    Post subject: Reply with quote

This is showing the following error now.

Tcl error [parse]: data error

Would be good if it was working.


Code:

#############################################################################################################
# Troll v2.1 TCL by spithash@DALnet                                                                         #
#############################################################################################################
# Gets troll quotes and makes people suffer!                                                                #
#############################################################################################################
#                                                               #
# Version 2.1   (20.03.2012)                                          #
#                                                               #
# Added flood protection. More like, throttle control. Special thanks to username.                 #
#                                                                                                           #
# Any official release of troll.tcl will be announced in http://forum.egghelp.org/viewtopic.php?t=17078     #
# Official troll.tcl updates will be in egghelp.org's TCL archive,                                          #
# Or here: http://bsdunix.info/spithash/troll/troll.tcl                                                     #
#############################################################################################################
# Version 2.0                                                      #
#                                                               #
# Version 2.0 is way different since there's no database in the file. It fetches the quotes by a website.   #
# Also, you can ".chanset #channel +troll" to enable it.                                                    #
# I added this just in case you don't want your trolls to be available globally.                            #
#                                                               #
# (Keep it to "puthelp" cause I didn't add any flood protection yet,                                        #
# and it may cause your bot "Excess Flood" quit if it's in "putserv" or "putquick",                         #
# if someone floods the !troll trigger or if the troll quote is too long.)                                  #
#############################################################################################################
# Credits: special thanks to: username, speechles and arfer who helped me with this :)                      #
#############################################################################################################

# Channel flag.
setudef flag troll

# Set the time (in seconds) between commands.
set delay 10

bind pub - !troll parse

proc parse {nick uhost hand chan text} {
global delay
variable troll
if {![channel get $chan troll]} {
    return 0
}
if {[info exists troll(lasttime,$chan)] && [expr $troll(lasttime,$chan) + $delay] > [clock seconds]} {
    putserv "NOTICE $nick :You can use only 1 command in $delay seconds. Wait [expr $delay - [expr [clock seconds] - $troll(lasttime,$chan)]] seconds and try again, nigga."
    return 0
}

::http::config -urlencoding utf-8 -useragent "Mozilla/5.0 (X11; U; Linux i686; el-GR; rv:1.8.1) Gecko/2010112223 Firefox/3.6.12"
set url [::http::geturl "http://rolloffle.churchburning.org/troll_me.php" -timeout 15000]
set data [::http::data $url]
::http::cleanup $url

regsub -all -- {\n} $data "" data;
regexp -nocase -- {<p .*?>(.*?)</p>} $data -> info
regsub -all -- {(<strong[^>]*>)|(</strong>)} $info "\002" info;

while {$info != ""} {
    putserv "PRIVMSG $chan :[string range $info 0 419]"
    set info [string range $info 420 end]
}
set troll(lasttime,$chan) [clock seconds]

}

putlog "\002troll.tcl\002 v2.1 by spithash@DALnet iz up and trollin'"
# EOF
Back to top
View user's profile Send private message
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