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.

Announcement

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
Fire-Fox
Master
Posts: 289
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Announcement

Post by Fire-Fox »

Morning,

when I use the script I think this is what happens.

after making the announcement interval 10 mins. and it also shows in chan. and when I logged into irc this morning there where no anounce during the night at all. So im thinking is there a error somewhere or dosn't the script like when i .rehash the bot?

Code: Select all

# Needs to be set
# Where to make and delete announcements
# .chanset #CHAN +staff
# Where to publish the announcement
# .chanset #CHAN +reklame

bind pub o|o !create ob:reklame
bind pub o|o !delete ob:delete 

setudef flag makereklame
setudef flag reklame

proc putnoobuser { chan nick } {
	putserv "NOTICE $nick : $nick you are not opped"
}

#################
## Lav Reklame ##
#################
proc ob:reklame {nick uhost hand chan arg} {
global reklameid reklametid
if {![channel get $chan makereklame] } {return}	
if {![isop $nick $chan]} {putnoobuser $chan $nick ; return 0}
set reklame [join [lrange [split $arg] 1 end]]
set reklametid [join [lrange [split $arg] 0 0]]	
set reklameid($reklame) [timer $reklametid "visreklame #staff \"$reklame\" \"$reklame\""]
putserv "NOTICE $nick :Announcement \"$reklame\" is created with interval $reklametid minutte(r)"
}
#################
##     End     ##
#################

#################
## Show announcement ##
#################
proc visreklame {chan id reklame} {   
global reklameid reklametid 
if {![channel get $chan makereklame] } {return}
set reklame [join [lrange [split $reklame] 0 end]]	
putserv "PRIVMSG #oldboys :$reklame "
set reklameid($reklame) [timer $reklametid "visreklame #chan \"$reklame\" \"$reklame\""]
}
#################
##     End     ##
#################

##################
## Delete announcemnt ##
##################
proc ob:delete {nick uhost hand chan arg} {
global reklameid reklametid
if {![channel get $chan makereklame] } {return}
if {![isop $nick $chan]} {putnoobuser $chan $nick ; return 0}
set arg [join [lrange [split $arg] 0 end]] 
killtimer $reklameid($arg)
putserv "NOTICE $nick :Announcement \"$arg\" is deleted "
}
#################
##     End     ##
#################

putlog "Reklame by Xirg"
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
CrazyCat
Revered One
Posts: 1236
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

As your ads are stored in a variable, it's volatile. And there is nothing which relaunch the timer on start.

Did you just rehash the eggdrop or restart it ? If it's a simple rehash, try to rehash it again and look well for errors to see if there is not a problem.

If you restarted it, it's normal.
User avatar
Fire-Fox
Master
Posts: 289
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

I'll look deeper :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Post Reply