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.

Multiple Announce

Help for those learning Tcl or writing their own scripts.
Post Reply
C
COBRa
Halfop
Posts: 49
Joined: Fri Jan 04, 2013 8:23 am

Multiple Announce

Post by COBRa »

I have a tcl script which when triggered by a keyword then announces but if the keyword is triggered more than once it multiple announces was wondering if theres a way to stop this let me give an example

Code: Select all

[12:41pm] <+user1> !addpre Pointstone.System.Cleaner.v7.7.32.720-LAXiTY 0DAY
[12:41pm] <+user2> !addpre Pointstone.System.Cleaner.v7.7.32.720-LAXiTY 0DAY

[12:41pm] <+master>  [Pointstone.System.Cleaner.v7.7.32.720-LAXiTY > Already added via ADDOLD]
[12:41pm] <+master>  [Pointstone.System.Cleaner.v7.7.32.720-LAXiTY > Already added via ADDOLD]
as you can see theres more than one announce so if possible would like it to announce the second part only once inmaterial of how many times the first part announces i use this code to announce

Code: Select all

set result [mysqlsel $db_handle "SELECT `release` FROM `from` WHERE `release` = '$rlsname' AND `type` = '$type'"]
		set result2 [mysqlsel $db_handle "SELECT `release` FROM `from` WHERE `release` = '$rlsname' AND `type` = 'SITEPRE'"]
	    set result3 [mysqlsel $db_handle "SELECT `release` FROM `from` WHERE `release` = '$rlsname' AND `type` = 'ADDOLD'"]
	    if { $result2 == "1" } {
		putnow "PRIVMSG $chan : $bopen\002\00314$rlsname\003\002 > \00309Already added via SiTEPRE\003$bclose"
		} else {
		if { $result3 == "1" } {
		putnow "PRIVMSG $chan : $bopen\002\00314$rlsname\003\002 > \00309Already added via ADDOLD\003$bclose"
so need something in there so it only runs once if possible

many thanks in advance
Post Reply