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.

when true -> print putserv-line1 then 2 then 3 and so on

Old posts that have not been replied to for several years.
Locked
H
Heart

when true -> print putserv-line1 then 2 then 3 and so on

Post by Heart »

Hi,

I made a script which has 2 variables per putserv line. One variable from this two is always a date (eg Dec 19). Now I want to check if the variable I get is true with the current date. when yes the putserv line should be printed.

Code: Select all

proc pub:testscript {nick host hand chan arg} {

<snap>
(the whole set for the variables)

if {$date0==[clock format [clock seconds] -format "%b %d"]} {
putserv "PRIVMSG $chan :\0031,15$date0 $report0\003"

if {$date1==[clock format [clock seconds] -format "%b %d"]} {
putserv "PRIVMSG $chan :\0031,15$date1 $report1\003"

if {$date2==[clock format [clock seconds] -format "%b %d"]} {
putserv "PRIVMSG $chan :\0031,15$date2 $report2\003"

if {$date3==[clock format [clock seconds] -format "%b %d"]} {
putserv "PRIVMSG $chan :\0031,15$date3 $report3\003"

}
}
}
} else {
putserv "PRIVMSG $chan :\0031,15 No data for \00312,15[clock format [clock seconds] -format "%b %d"]\0031,15\003"
}

}
So it doesn't work. I always only get one putserv line although there are eg 3 variables with the same/correct date. How do I have to changes this code that I get the two other variables too (in this example)?

Thanks
Heart
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Have you commented out the top putsefv line, to confirm only the first one is triggered.

This is likely due to the message duplication removal.

DO the $resultX (where X is a number) variable contain the same text or different.

See you config file for information on allowing duplicate lines.
Locked