botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 01-04-2007, 05:12   #1 (permalink)
Junior Member
 
vR|Ar's Avatar
 
Join Date: Mar 2007
Location: PHIL
Posts: 6
Rep Power: 0
vR|Ar is an unknown quantity at this point
Send a message via Yahoo to vR|Ar
Exclamation HELP - greet :)

Code:
<vR|Ar> AI-HELP chanset greet welcome to our channel...
<TESTIBOT> SET #chantest greet welcome to our channel...
<vR|Ar> AI-HELP chanset +greet
<TESTIBOT> SET #chantest +greet 
* Attempting to rejoin channel #chantest
* Rejoined channel #chantest
-TESTIBOT- vR|Ar, welcome to our channel...
CORE
Code:
proc join:greet {nick uhost hand chan} {
	if {[channel get $chan greet] && [botisop $chan]} {
	putserv "NOTICE $nick :$nick, [::stats::channel -get $chan greet]"
	}
}
BINDS
bind join -|- * join:greet
i already put ( a:command -add greet pub:greet 1115 618 |N )

Code:
proc pub:greet  {hand chan args x mix} { 

	set what [::stats::channel -get $chan greet]
             blablablabla....
}
MY PROBLEM... please help me put some flood protection and
to use %nick% and %chan%

ive tried it but it doesnt work ... i need help.. thank you...
__________________
v R | A r

Last edited by UniversaliA; 02-04-2007 at 12:08. Reason: use [CODE][/CODE]
vR|Ar is offline   Reply With Quote
Old 01-04-2007, 06:07   #2 (permalink)
Member
 
Join Date: Jun 2004
Location: Canada
Age: 18
Posts: 141
Rep Power: 0
AdrianK is on a distinguished road
Default

Code:
set w [string map {%B \002 %b \00302 %r \00304 %% \003} $w]
try

Code:
set what [string map {%chan% $chan %nick% $nick}]
Thats in ure greet set
AdrianK is offline   Reply With Quote
Old 01-04-2007, 13:13   #3 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

add this proc to your code:

Code:
proc greet:parse {greet} {
set greet [string map { %nick% $nick %chan% $chan} [split $greet]]
return $greet
}
and in your join process replace this:
Code:
putserv "NOTICE $nick :$nick, [::stats::channel -get $chan greet]"
with:
Code:
set greet [::stats::channel -get $chan greet]
putserv "NOTICE $nick :[greet:parse $greet]"
also hope you didn't change what AdrianK stated before, because as far as I can tell that line is from the a:tell process and it is used to define the colors that the bot will output your text in. So if you changed it, put it back :P

Enjoy!
__________________
Fuck oFF!
arcade is offline   Reply With Quote
Old 01-04-2007, 17:40   #4 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

Code:
proc join:greet {nick uhost hand chan} {
global agrflood
if {[channel get $chan greet] && [botisop $chan] && ![info exists agrflood($nick,$chan)] && ![info exists agrflood($chan)]} {
set greet [::stats::channel -get $chan greet]
putserv "NOTICE $nick :[subst [greetarse $greet]]"
set agrflood($nick,$chan) 1
set agrflood($chan) 1
utimer 10 [unset agrflood($nick,$chan)]
utimer 5 [unset agrflood($chan)]
}
}
a little update, added antiflood protection
__________________
Fuck oFF!
arcade is offline   Reply With Quote
Old 01-04-2007, 18:45   #5 (permalink)
Junior Member
 
vR|Ar's Avatar
 
Join Date: Mar 2007
Location: PHIL
Posts: 6
Rep Power: 0
vR|Ar is an unknown quantity at this point
Send a message via Yahoo to vR|Ar
Default

script does not contain errors...

but it wont unset..
__________________
v R | A r
vR|Ar is offline   Reply With Quote
Old 07-04-2007, 16:11   #6 (permalink)
Junior Member
 
vR|Ar's Avatar
 
Join Date: Mar 2007
Location: PHIL
Posts: 6
Rep Power: 0
vR|Ar is an unknown quantity at this point
Send a message via Yahoo to vR|Ar
Default done

Code:
proc join:greet {nick uhost hand chan} {
global agrflood 
if {[channel get $chan greet] && [botisop $chan]} {
if {[info exists agrflood($nick:$chan)]} {
    return 0
  }
set greet [::stats::channel -get $chan greet]
set agrflood($nick:$chan) 1
timer 2[list unset agrflood($nick:$chan)]
putserv "NOTICE $nick :[subst [greet:parse $greet]]"
}
}
Thanks for the help.. its now working
__________________
v R | A r
vR|Ar is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Correct script] Eroare Botnet [Welcome,Leave,Greet] SoLLo Tcl scripting 1 24-05-2007 19:07
Greet AdrianK a&a light script 0 28-02-2007 23:05
Exista greet la join? BizZu #a&a 3 27-09-2005 18:29
Need help with greet arcade Tcl scripting 21 09-09-2005 17:01


All times are GMT +3. The time now is 10:04.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.