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"