egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simple Timer

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
kwnds
Voice


Joined: 15 Mar 2007
Posts: 21

PostPosted: Tue Mar 18, 2008 8:52 pm    Post subject: Simple Timer Reply with quote

I need a simple script that send me a message with one or more line to some channels.
Can someone help me?
Thanks
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Mar 18, 2008 9:09 pm    Post subject: Reply with quote

Code:
######################################################################
# SendMsg 1.1 - Send Messages to channels specified every X minutes  #
#                                                                    #
# Created by WPnL (modified for egghelp forums request by speechles) #
# Report bugs to wpnl@lycos.co.uk                                    #
# This script is freeware.                                           #
# Feel free to edit it.                                              #
######################################################################
# If you use this for spamming purposes, you are commiting a violation
# of the terms of use of this script. You are also an asshole and    #
# should be prohibited from ever owning a pc, or meeting with someone#
# who has access to one. You are basically beneath pond scum if you  #
# are using this script to spam with - speechles                     #
######################################################################

# --> Channels
# list of channels you want this message displayed in
# can be 1,2,3 or 50,000 channels (seperate each by a space)
set ad-channels "#somechannel #etc"

# --> Minutes
# How often do you want the msg to be displayed (in minutes)
set ad-minutes 10

# --> Messages
# 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
# %channel% can be used to represent channels
# the script will convert it to represent each channel correctly.
set ad-msgs {
 "\002These are the rules for %channel%."
 "\037No spamming, no shoes, no shirts, no service."
}

# --> Flood Control
# At what point should we decide when to change to
# the slower method of puthelp queueing?
# The number used is the amount of lines to display
# using putserv, after which the rest will be puthelp.
# ( if you want things to display faster, raise this.
#   if you find the bot getting excess flooded, lower it. )
set ad-flood 5

# --> Congratulations your config is finished
# DO NOT CHANGE BEYOND THIS POINT

if {![info exists ad-timer]} {
 timer $::ad-minutes sendtext
 set ad-timer 1
}
   
proc sendtext { } {
 set count -1
 foreach channel [split $::ad-channels] {
  foreach msg [split $::ad-msgs] {
   regsub -nocase -all -- {%channel%} $msg $channel msg
   set count [expr $count + 1]
   if {$count < $::ad-flood} {
     putserv "PRIVMSG $channel :$msg"
   } else {
     puthelp "PRIVMSG $channel :$msg"
   }
  }
 }
 timer $::ad-minutes sendtext
 return 1
}

putlog "SendMsg 1.1 by WPnL (modded for egghelp) Loaded"

The script sanely handles flood control. So feel free to put a lot of channels or many lines of messages.
Back to top
View user's profile Send private message
kwnds
Voice


Joined: 15 Mar 2007
Posts: 21

PostPosted: Thu Mar 20, 2008 11:44 am    Post subject: Reply with quote

Thanks for the help Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber