| View previous topic :: View next topic |
| Author |
Message |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jun 13, 2020 7:13 am Post subject: cycle auto greet checker |
|
|
i was wondering if eggdrop could cycle (part join like every 10 min)
and check for pms within like 5 sec of joining and if so to to set ban and kick
so far all i got is this i got from the archives:
| Code: |
bind msgm - "*" msg:bot
proc msg:bot {nick uhost hand text} {
if {![matchattr $hand n]} {
foreach chan [channels] {
if {[botisop $chan] && [onchan $nick $chan]} {
pushmode $chan +b *!*@[lindex [split $uhost @] 1]
putserv "KICK $chan $nick :Do not message me in private!"
}
}
flushmode $chan
}
}
|
Last edited by simo on Sat Jun 13, 2020 7:25 am; edited 1 time in total |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jun 13, 2020 7:24 am Post subject: |
|
|
| ive seen some in archieves but they seem to target specific url spam and channel add spam we were looking to target any auto greeter on join of eggbot within specific time frame (5 secs) |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sat Jun 13, 2020 8:19 am Post subject: Re: cycle auto greet checker |
|
|
| simo wrote: | i was wondering if eggdrop could cycle (part join like every 10 min)
and check for pms within like 5 sec of joining and if so to to set ban and kick
...
|
Try this:
| Code: |
# June 13, 2020
#
# http://forum.egghelp.org/viewtopic.php?t=20793
#
###
bind cron - "*/10 * * * *" do_cycle
###
proc do_cycle {min hour day month weekday} {
bind msgm - "*" msg:bot
putserv "part #channel_name_goes_here"
utimer 5 [list unbind msgm - "*" msg:bot]
}
###
###
proc msg:bot {nick uhost handle text } {
## commands to kick/ban go here
}
###
|
This is un-tested.
The bind cron should accomplish your desire to do something every 10 minutes.
Reference: https://crontab.guru/#*/10_*_*_*_*
You need to edit in the channel name to part. This thing is currently designed to be single channel. For now, see if you can get it to do what you want/need. Then, if you need it to work on more than one channel, maybe then we can doctor on it some more.
It does not actually check that the bot joined #channel, and then begin the 5 second countdown to unbinding. You can see the "5" in there, for now - and you can tweak that to suit.
However, if you find that you DO need it to watch for the bot itself joining, I suppose we could use a bind join for that, and re-write it.
Let's see what happens with this.
I hope this helps. _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jun 13, 2020 8:37 am Post subject: |
|
|
| tnx for the swift response willyw could we use the join bind to start counting time threshold wich will make it more channel settings configurable i presume |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sat Jun 13, 2020 9:40 am Post subject: |
|
|
| simo wrote: | ...
could we use the join bind to start counting time threshold
|
You forgot to tell us how this worked, so far.
| Quote: |
wich will make it more channel settings configurable i presume
|
I don't know what you mean, yet. _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jun 13, 2020 10:55 am Post subject: |
|
|
| oh sorry forgot to give feedback it seems to work well but the thing is using the bind join might provide a little bit more configurablility for channel since ur current code is for general use |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sat Jun 13, 2020 11:37 am Post subject: |
|
|
| simo wrote: | oh sorry forgot to give feedback it seems to work well
|
So you have run it.
Good.
| Quote: |
but the thing is using the bind join might provide a little bit more configurablility for channel since ur current code is for general use |
You did it again.
"might" ?
" a little bit more configurability"
All very vague.
What will happen if either I or somebody else comes along and re-writes it is: you'll get what we want or think of.
You'd be far better off to explain what is on your mind, in detail. Then there is a better chance of getting what you want.  _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jun 13, 2020 11:58 am Post subject: |
|
|
ur right i wasnt more specific let me try and attempt write it myselve for the join bind part
tnx so far willyw much apreciated |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sat Jun 13, 2020 1:37 pm Post subject: |
|
|
| simo wrote: | ...
let me try and attempt write it myselve for the join bind part
... |
Great !
and feel free to post it here if you wish. For help, if need be. Or, for other ideas on it.
Good luck with it. _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
|