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.

Timed Message

Old posts that have not been replied to for several years.
Locked
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Timed Message

Post by Stealthx »

Hi, I have searched the database for the suitable script that I need... What I need is a TCL that send SAME messages to every channel the bot is in or joined and the timer will be 60mins. The bot will activate such function once I do a .+chan # and I don't have to do a public command such as "!quote on", it will be AUTO activated. I know there's alot of such script such as quote scripts and so on but I don't need so many quotes, and I don't need those number etc.

<Bot> (#1) test test test

All I need was...

<Bot> test test test

-

I've see the TCL by WPnL, SendMsg.TCL but how do I make it activated once the bot joined?

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 "#chan1 #chan2"

# How often do you want the msg to be displayed (in minutes)
set minutes 15

# 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 {
"\002Line1"
"\037Line2"
}


### 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"
+ Stealth Box +
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

bind dcc n|- +chan foo
proc foo {h i t} {
  # do stuff - initialize say on join, timer, etc.
  *dcc:+chan $h $i $t
}
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

demond wrote:

Code: Select all

bind dcc n|- +chan foo
proc foo {h i t} {
  # do stuff - initialize say on join, timer, etc.
  *dcc:+chan $h $i $t
}
I don't understand. Combined with WPnL's TCL?
+ Stealth Box +
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I don't patch other people's scripts; here I write scriptlets only, hoping that the person in need for scripting help will take it from there and tailor it for their specific needs; I expect anyone asking here for help to have at least some minimal knowledge of Tcl and eggdrop scripting

what I wrote is a proc which overrides eggdrop's default +chan command, does whatever you want it to do on channel add, and then falls back to default +chan behaviour (that is, proceeds with actual adding of the channel to bot's channels)
Locked