| View previous topic :: View next topic |
| Author |
Message |
gamer12 Voice
Joined: 14 Aug 2012 Posts: 10
|
Posted: Sat Apr 27, 2013 2:12 pm Post subject: Matching word text alert! |
|
|
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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Apr 29, 2013 6:55 am Post subject: |
|
|
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 |
|
 |
gamer12 Voice
Joined: 14 Aug 2012 Posts: 10
|
Posted: Mon Apr 29, 2013 10:25 am Post subject: :o |
|
|
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 |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Thu May 02, 2013 6:37 am Post subject: |
|
|
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 |
|
 |
|