| View previous topic :: View next topic |
| Author |
Message |
Exedore Halfop

Joined: 27 Jan 2008 Posts: 43
|
Posted: Tue Feb 19, 2008 7:56 pm Post subject: SendMsg doesn't send the messages.. |
|
|
Hello friends..
I have downloaded this TCL scrip:
| Code: | | http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=867 |
SendMsg.tcl
I do everything what says in the file, I mean, I configure all the directives, put the file into the scripts folder, add the line in my *.conf, and reload my bot.
Nothing Happens
the bot doesn't send any message..
When the bot starts, loads the tcl script, but as I said
Nothing Happens
What is the problem?
Thk u all |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Wed Feb 20, 2008 12:52 am Post subject: |
|
|
| post your file here, use code tags |
|
| Back to top |
|
 |
Exedore Halfop

Joined: 27 Jan 2008 Posts: 43
|
Posted: Wed Feb 20, 2008 9:09 am Post subject: |
|
|
| Code: |
######################################################################
# SendMsg 1.0 - Send Messages to channels specified every X minutes #
# #
# Created by WPnL #
# Report bugs to wpnl@lycos.co.uk #
# This script is freeware. #
# Feel free to edit it. #
######################################################################
### SETTINGS ###
# Channels where the msg is sent to.
# If you want to use several channels put a space between them
set channels "#somechannel"
# How often do you want the msg to be displayed (in minutes)
set minutes 10
# Set your msgs here
# \002 bold
# \003 colour (ex: \0030,12 textcolor=0 white; backgroundcolor=12 blue)
# \022 reverse
# \037 underline
# Write several lines for several msgs
set msgs {
"\002Change your nick by typing /nick New-Nick"
"\002Welcome to #channel"
}
### YOU ARE DONE NOW. YOU DON'T NEED TO EDIT ANYTHING ELSE FROM HERE ###
if {![info exists sendtext_running]} {
timer $minutes sendtext
set sendtext_running 1
}
proc sendtext {} {
global channels minutes msgs
foreach channel $channels {
foreach msg $msgs {
putserv "PRIVMSG $channel :$msg"
}
}
timer $minutes sendtext
return 1
}
putlog "SendMsg 1.0 by WPnL Loaded" |
|
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Wed Feb 20, 2008 11:19 am Post subject: |
|
|
try using the following edited procedure
| Code: | proc sendtext { } {
global channels minutes msgs
foreach channel $channels {
foreach msg $msgs {
putserv "PRIVMSG $channel :$msg"
}
}
timer $minutes sendtext
return 1
} |
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Feb 20, 2008 2:45 pm Post subject: |
|
|
| DragnLord wrote: | try using the following edited procedure
| Code: | foreach channel [split $channels] {
foreach msg [split $msgs \n] { |
|
You should be splitting those improper tcl lists or setting variables as lists to begin with. | Code: | | set channels [list #somechannel #yourchannel #etc] |
The same can be done for msgs. |
|
| Back to top |
|
 |
Exedore Halfop

Joined: 27 Jan 2008 Posts: 43
|
Posted: Thu Feb 28, 2008 10:21 am Post subject: |
|
|
| Nothing |
|
| Back to top |
|
 |
Exedore Halfop

Joined: 27 Jan 2008 Posts: 43
|
Posted: Thu Feb 28, 2008 10:36 am Post subject: |
|
|
Should I recomp or remake before place the xxx.tcl on the scripts folder?
Or it just matter of put there the file?
I don't understand.. |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Feb 28, 2008 1:05 pm Post subject: |
|
|
| I posted what I changed to get it working on my bots, perhaps you need to recompile. |
|
| Back to top |
|
 |
Exedore Halfop

Joined: 27 Jan 2008 Posts: 43
|
Posted: Fri Feb 29, 2008 12:23 pm Post subject: |
|
|
But is that the procedure?
I mean:
- download the file
- place on scripts folder
- recompile or remake or something
- then restart the bot?
or I just have to place the xxx.tcl file into the folder and rehash?
or something..
run a command
setup a flag in mybot.conf
i don't know |
|
| Back to top |
|
 |
|