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!
fredvil
Voice
Posts: 21 Joined: Thu Dec 01, 2005 9:16 pm
Post
by fredvil » Fri Jan 05, 2007 9:42 am
does anyone here know a script that will ban user that uses action /ame.
example if bot and nick are on 2 channels and when the nick uses /ame the bot will ban him/her.
thanks a lot
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Fri Jan 05, 2007 10:30 am
fredvil wrote: does anyone here know a script that will ban user that uses action /ame.
example if bot and nick are on 2 channels and when the nick uses /ame the bot will ban him/her.
thanks a lot
/ame is not a irc command, but a client "feature" sending multiple ctcp ACTIONs, so there's no way to detect the difference between /ame and multiple /me's
The best you can do is guess...here's a script that will ban any user doing the same action two times in a row within 5 seconds.
Code: Select all
bind ctcp - ACTION ameban
proc ameban {n u h t a b} {
if {[validchan $t]&&![matchattr $h nmof|mnof $t]} {
global ameban
set id $n!$u
if {[info exists ameban($id)]} {
if {$ameban($id)==$b} {
newban [lindex [split $u @] 1] ${::botnet-nick} "ameban" 60
return
} {
killtimer $ameban($id,timer)
}
}
set ameban($id) $b
set ameban($id,timer) [utimer 5 "unset [list ameban($id)]; unset [list ameban($id,timer)]"]
}
}
(not tested)
EDIT2: variable name
Last edited by
user on Sat Jan 06, 2007 5:31 pm, edited 5 times in total.
Have you ever read "The Manual"?
DragnLord
Owner
Posts: 711 Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA
Post
by DragnLord » Fri Jan 05, 2007 11:19 am
This will ban any user for using actions.
Included an option to exclude chanops from banning.
Code: Select all
# actban variable is setting ban time
# use 0 to make perm
set actban 10
bind ctcp - ACTION ban:act
proc ban:act { nick uhost hand dest key text } {
#uncomment next line to exclude chanops
#if [!isop $nick] return
newban *!$uhost $::botnick action_ban $::actban
}
[ edited to correct global ]
DragnLord
Owner
Posts: 711 Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA
Post
by DragnLord » Fri Jan 05, 2007 1:08 pm
the following will give the user a global ban,
and kick the person from all channels the bot is on with that nick
(tested)
Code: Select all
# actban variable is setting ban time in minutes
# use 0 to make perm
set actban 10
bind ctcp - ACTION ban:act
proc ban:act { nick uhost hand dest key text } {
#uncomment next line to exclude chanops
#if [!isop $nick] return
newban *!$uhost $::botnick action_ban $::actban
foreach chan [channels] {
if [onchan $nick $chan] { putquick "KICK $chan $nick" }
}
}
fredvil
Voice
Posts: 21 Joined: Thu Dec 01, 2005 9:16 pm
Post
by fredvil » Fri Jan 05, 2007 11:00 pm
hi user... got this error.. pls help thanks
Code: Select all
[11:00] Tcl error [ameban]: can't read "c": no such variable
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Fri Jan 05, 2007 11:43 pm
try the edited version
Have you ever read "The Manual"?
fredvil
Voice
Posts: 21 Joined: Thu Dec 01, 2005 9:16 pm
Post
by fredvil » Sat Jan 06, 2007 2:44 am
you got it user... u the man.. thanks a lot...
one more thing user... how to change the ban type to *!*@10.0.0.2 or *!*@host.domain.com
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sat Jan 06, 2007 9:09 am
fredvil wrote: how to change the ban type to *!*@10.0.0.2 or *!*@host.domain.com
Code: Select all
newban *!*@[lindex [split $u @] 1] ${::botnet-nick} "ameban" 60
Have you ever read "The Manual"?
Sydneybabe
Op
Posts: 106 Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines
Post
by Sydneybabe » Sat Jun 28, 2008 12:54 am
Hi, anyone can help me this script work only on one channel not global... thanks in advance
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Jun 28, 2008 8:50 am
Sydneybabe wrote: Hi, anyone can help me this script work only on one channel not global... thanks in advance
It bans if a user does multiple actions within the same channel or different channels.
Sydneybabe
Op
Posts: 106 Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines
Post
by Sydneybabe » Sun Jun 29, 2008 1:06 am
Dragonlord message:
the following will give the user a global ban, and kick the person from all channels the bot is on with that nick
i mean only work with one channel not all channels where the bot is on.
holycrap
Op
Posts: 152 Joined: Mon Jan 21, 2008 11:19 pm
Post
by holycrap » Fri Dec 19, 2008 2:53 pm
@ DragnLord
So, how would you do this? Notice the user with first offense "don't use /ame" and ban them the second time with a message "you have been warned."
Thanks!