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 

Matching word text alert!

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
gamer12
Voice


Joined: 14 Aug 2012
Posts: 10

PostPosted: Sat Apr 27, 2013 2:12 pm    Post subject: Matching word text alert! Reply with quote

Need a script which can paste a msg on channel if a person is asking same thing on different channels.


For, eg.

#help. A user joins it and asks for 'how does google work?'

#Ajutar. The user joins it and asks the same question?


So the bot can notify at #network - that this person has been asking the same questions on #help and #ajutar..


The notifying channel remains the same.. however the sub channels can be added.
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Mon Apr 29, 2013 6:55 am    Post subject: Reply with quote

Is there a time frame that should be taken into consideration when checking if the same question has been asked before in another channel?
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
gamer12
Voice


Joined: 14 Aug 2012
Posts: 10

PostPosted: Mon Apr 29, 2013 10:25 am    Post subject: :o Reply with quote

I guess the bot should respond as soon as it gets gets the same msg on any other defined channe.

The monitored channels can be more than one.

Thanks in advance.
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Thu May 02, 2013 6:37 am    Post subject: Reply with quote

You can try this version

Code:

bind PUBM - * catch:pubm
bind TIME - * catch:delete

set temp(to) "#ChanRank"

setudef flag catch

proc catch:pubm {nick uhost hand chan arg} {
   global catch temp

   if {[channel get $chan catch]} {
      if {![info exists catch($arg)]} {
         set catch($arg) "$chan [unixtime]"
      } else {
         if {$chan != [lindex [split $catch($arg)] 0]} {
            putserv "PRIVMSG $temp(to) :$nick said ''$arg'' on two different channels im in"
         }
      }
   }
}

proc catch:delete {min hour day month year} {
   global catch

   set a [clock add [clock seconds] -7 days];

   foreach n [array names catch] {
      if {[lindex [split $catch($n)] 1] < $a} {

         unset -nocomplain catch($n)
      }
   }
}


To activate the script to monitor other channels use (.chanset #channel +catch) in dcc chat. Also it will erase any 7 days old informations..

I don`t think this is the right way to do this kind of script but its a start.
_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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