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 

cycle auto greet checker

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


Joined: 22 Mar 2015
Posts: 941

PostPosted: Sat Jun 13, 2020 7:13 am    Post subject: cycle auto greet checker Reply with quote

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
View user's profile Send private message
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Sat Jun 13, 2020 7:24 am    Post subject: Reply with quote

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
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Jun 13, 2020 8:19 am    Post subject: Re: cycle auto greet checker Reply with quote

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. Smile

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
View user's profile Send private message
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Sat Jun 13, 2020 8:37 am    Post subject: Reply with quote

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
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Jun 13, 2020 9:40 am    Post subject: Reply with quote

simo wrote:
...
could we use the join bind to start counting time threshold


You forgot to tell us how this worked, so far. Wink

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
View user's profile Send private message
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Sat Jun 13, 2020 10:55 am    Post subject: Reply with quote

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
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Jun 13, 2020 11:37 am    Post subject: Reply with quote

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. Smile
"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. Wink
_________________
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
View user's profile Send private message
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Sat Jun 13, 2020 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Jun 13, 2020 1:37 pm    Post subject: Reply with quote

simo wrote:
...
let me try and attempt write it myselve for the join bind part
...


Great ! Smile

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
View user's profile Send private message
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