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 

Warn Action

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


Joined: 28 Dec 2013
Posts: 22
Location: The World

PostPosted: Tue Jul 23, 2019 8:29 am    Post subject: Warn Action Reply with quote

Hi, I was looking for a simple tcl that warn the user not to use any action /me in the channel

Thanks in advance Wink
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1042

PostPosted: Tue Jul 23, 2019 3:00 pm    Post subject: Re: Warn Action Reply with quote

MrBeta wrote:
Hi, I was looking for a simple tcl that warn the user not to use any action /me in the channel


And what will trigger this warning?

In other words - do you want a scheduled announcement? Like four times per day, or something?

Or - do you want bot to react if someone actually does 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
MrBeta
Voice


Joined: 28 Dec 2013
Posts: 22
Location: The World

PostPosted: Tue Jul 23, 2019 4:28 pm    Post subject: Reply with quote

A simple warning not to use actions of any kind.
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1042

PostPosted: Tue Jul 23, 2019 5:15 pm    Post subject: Reply with quote

Experiment with this

It does both.

If you don't want both, simply delete the part you don't want. Or, comment it out.




Code:

# July 23, 2019
# http://forum.egghelp.org/viewtopic.php?p=107714#107714
#
#

###
# This section will cause bot to react to /me in channel
# You must edit it.  Substitute your channel name for   #your_chan_here
#
###
bind ctcp - "ACTION" saw_me_in_chan


proc saw_me_in_chan {nick uhost handle dest keyword text} {
        putserv "privmsg #your_chan_here :Hey $nick !   No channel wide CTCP's in this channel,  ok?"
}
###

###
###

###
# This section will cause bot to do an announcement in the channel, on a schedule.
# You must edit it.
# First, visit:  https://crontab.guru/  if you are not already familiar with how to configure the
# timing of crontab.  It will help.
# Edit the     bind cron     line.  The part that is currently,  "* * * * *"  must be edited.
# As it is now, it will announce every minute. 
#
# Next, substitute your channel name for   #your_chan_here
#

bind cron - "* * * * *" announce_ctcp_warning


proc announce_ctcp_warning {min hour day month weekday} {
        putserv "privmsg #your_chan_here :No channel CTCP's in this channel, please"
}

###

_________________
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
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1042

PostPosted: Tue Jul 23, 2019 5:17 pm    Post subject: Reply with quote

Tip:
If you edit a bind line after it has been loaded, and rehash bot, you could easily get unexpected results.

The simply solution is: Don't rehash. Do .restart .
_________________
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
MrBeta
Voice


Joined: 28 Dec 2013
Posts: 22
Location: The World

PostPosted: Wed Jul 24, 2019 3:33 am    Post subject: Reply with quote

Thank you willyw, it works very well.
Maybe there may be the problem for those who ignore the message, leading the bot to make a flood of repetitions, a kick after 2 warnings could be a future solution, as well as exempt from recalls other bots and operators, but for the moment thank you for the help Wink
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1042

PostPosted: Wed Jul 24, 2019 7:47 am    Post subject: Reply with quote

MrBeta wrote:

...
Maybe there may be the problem for those who ignore the message, leading the bot to make a flood of repetitions, ...


Correct.

Quote:

... a kick after 2 warnings could be a future solution, as well as exempt from recalls other bots and operators,...


Check out AllProtection script. Links to its location can be found in posts by Sir_Fz or Opposing, here: http://forum.egghelp.org/viewtopic.php?t=9721&start=1335

It has a LOT of capabilities, and I think that watching for ctcp is one of them. You'd have to read to be sure though.
If so, you could use this script, and just turn off everything that you don't want. That's what I do... I only have 3 or 4 things enabled.
It does have config options to not punish ops, voices, +f , etc.
And it can do escalation : 1st, warn - 2nd kick - 3rd ban , and this is configurable too.


Quote:

but for the moment thank you for the help Wink


You are welcome.
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
MrBeta
Voice


Joined: 28 Dec 2013
Posts: 22
Location: The World

PostPosted: Wed Jul 24, 2019 11:16 am    Post subject: Reply with quote

From what I know and see AllProtection has a protection for text floods (action or msg), but not for individual diversified actions.
I always prefer single tcl for specific uses by splitting them into bots.
Thank you again
Back to top
View user's profile Send private message Visit poster's website
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