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.

wont show the advertisement

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

wont show the advertisement

Post by Fire-Fox »

i have the following in my bot but it wont show the text when someone do

!reklame <1> <this is a test> (<1> is the interval it should show the text)


sorry there is some danish language in the code... :)

Code: Select all

bind pub -|- !reklame pub_lavreklame
bind pub -|- !slet pub_drabreklame 

#################
## Lav Reklame ##
#################
proc pub_lavreklame {nick uhost hand chan arg} {
global reklameid reklametid
	
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 $chan \"$reklame\" \"$reklame\""]
putserv "NOTICE $nick : advertisement  \"$reklame\" is now createt with the following interval $reklametid minutte(r)"
}
#################
##     End     ##
#################

##################
## Show advertisement ##
##################
proc visreklame {chan id reklame} {
global reklameid reklametid 
set reklame [join [lrange [split $reklame] 0 end]]	
putserv "PRIMSG $chan : 12\[4AliasFM12\] $reklame 12\[4AliasFM12\]"
set reklameid($reklame) [timer $reklametid "visreklame $chan \"$reklame\" \"$reklame\""]
}
#################
##     End     ##
#################

##################
## Dræb Reklame ##
##################
proc pub_drabreklame {nick uhost hand chan arg} {
global reklameid reklametid

if {![isop $nick $chan]} {putnoobuser $chan $nick ; return 0}
set arg [join [lrange [split $arg] 0 end]] 
killtimer $reklameid($arg)
putserv "NOTICE $nick : Reklamen \"$arg\" er nu slettet"
}
#################
##     End     ##
#################

putlog "Reklame by Xirg Loaded Edited by Dj-Fire"
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Post Reply