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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
-
gamer12
- Voice
- Posts: 10
- Joined: Tue Aug 14, 2012 6:58 pm
Post
by gamer12 »
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.
-
caesar
- Mint Rubber
- Posts: 3778
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
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.
-
gamer12
- Voice
- Posts: 10
- Joined: Tue Aug 14, 2012 6:58 pm
Post
by gamer12 »
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.
-
Madalin
- Master
- Posts: 310
- Joined: Fri Jun 24, 2005 11:36 am
- Location: Constanta, Romania
-
Contact:
Post
by Madalin »
You can try this version
Code: Select all
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.