tryCode:set w [string map {%B \002 %b \00302 %r \00304 %% \003} $w]
Thats in ure greet setCode:set what [string map {%chan% $chan %nick% $nick}]![]()
CORECode:<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...
i already put ( a:command -add greet pub:greet 1115 618 |N )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
MY PROBLEM... please help me put some flood protection andCode:proc pub:greet {hand chan args x mix} { set what [::stats::channel -get $chan greet] blablablabla.... }
to use %nick% and %chan%
ive tried it but it doesnt work... i need help.. thank you...
Last edited by UniversaliA; 02-04-2007 at 12:08. Reason: use [CODE][/CODE]
v R | A r
tryCode:set w [string map {%B \002 %b \00302 %r \00304 %% \003} $w]
Thats in ure greet setCode:set what [string map {%chan% $chan %nick% $nick}]![]()
add this proc to your code:
and in your join process replace this:Code:proc greet:parse {greet} { set greet [string map { %nick% $nick %chan% $chan} [split $greet]] return $greet }
with:Code:putserv "NOTICE $nick :$nick, [::stats::channel -get $chan 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 :PCode:set greet [::stats::channel -get $chan greet] putserv "NOTICE $nick :[greet:parse $greet]"
Enjoy!
Fuck oFF!
a little update, added antiflood protectionCode: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)] } }
Fuck oFF!
script does not contain errors...
but it wont unset..![]()
v R | A r
Thanks for the help.. its now workingCode: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]]" } }![]()
v R | A r
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks