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.

SendMsg doesn't send the messages..

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
Exedore
Halfop
Posts: 43
Joined: Sun Jan 27, 2008 10:04 pm

SendMsg doesn't send the messages..

Post by Exedore »

Hello friends..

I have downloaded this TCL scrip:

Code: Select all

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
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

post your file here, use code tags
User avatar
Exedore
Halfop
Posts: 43
Joined: Sun Jan 27, 2008 10:04 pm

Post by Exedore »

Code: Select all

######################################################################
# 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"
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

try using the following edited procedure

Code: Select all

proc sendtext { } {
 global channels minutes msgs
 foreach channel $channels {
  foreach msg $msgs {
   putserv "PRIVMSG $channel :$msg"
  }
 }
 timer $minutes sendtext
 return 1
}
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

DragnLord wrote:try using the following edited procedure

Code: Select all

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: Select all

set channels [list #somechannel #yourchannel #etc]
The same can be done for msgs.
User avatar
Exedore
Halfop
Posts: 43
Joined: Sun Jan 27, 2008 10:04 pm

Post by Exedore »

Nothing
User avatar
Exedore
Halfop
Posts: 43
Joined: Sun Jan 27, 2008 10:04 pm

Post by Exedore »

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..
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

I posted what I changed to get it working on my bots, perhaps you need to recompile.
User avatar
Exedore
Halfop
Posts: 43
Joined: Sun Jan 27, 2008 10:04 pm

Post by Exedore »

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
Post Reply