egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multiple Announce

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
COBRa
Halfop


Joined: 04 Jan 2013
Posts: 49

PostPosted: Fri Feb 10, 2017 8:51 am    Post subject: Multiple Announce Reply with quote

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:
[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:
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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber