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.
Support & discussion of released scripts, and announcements of new releases.
4mirc
Voice
Posts: 37 Joined: Fri May 16, 2008 11:11 pm
Contact:
Post
by 4mirc » Mon May 24, 2010 10:05 pm
hello
i used to use this tcl for 5 years and its work good
but suddenly i dont know what happen to not work again
can anyone fix it for me
Code: Select all
set adtext {
"textherer"
"textherer"
"textherer"
"textherer"
"textherer"
"textherer"
"textherer"
}
set ad-at- 15
#######DO NOT EDIT BELOW THESE LINES#######
set notnick "$botnick"
set notnick [string tolower ${nick}]
if {![info exists {ald}]} {
global notnick chan ad-at- adtext
set ald 1
timer ${ad-at-} printing
}
proc printing {} {
global notnick channels ad-at- adtext
set printochan [lindex $adtext [rand [llength $adtext]]]
amsg "$printochan"
timer ${ad-at-} printing
}
putlog "\002\<admin\> Specker Bot is Load \<admin\>\002"
proc amsg { arg } {
foreach chan [channels] {
putserv "privmsg $chan:$arg"
}
}
Regards
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Tue May 25, 2010 11:00 am
There are two main issues with that code:
First, in the amsg proc, there's no space inbetween the channel and the message (with the colon-prefix). $chan:$arg should be $chan :$arg
Secondly, the "list" of messages is not a proper list, and your script may break if there's any { or } characters within. The proper way of doing this is to use the list command to build/set the list.
Further, the code has some spurious global commands at aglobal context. This is not an error, but a pointless line of code that only makes the code harder to read.
NML_375
4mirc
Voice
Posts: 37 Joined: Fri May 16, 2008 11:11 pm
Contact:
Post
by 4mirc » Wed May 26, 2010 6:42 am
hello nml375
thanks for the reply
i fixed the script and its work 100%
thanks alot