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.

Chanpro1.4.tcl Enhancement

Old posts that have not been replied to for several years.
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Chanpro1.4.tcl Enhancement

Post by blood_x »

Hi there,

As usual, this script will ban user who chat using bold, underline etc in format of *!*ident@*.hostname. For example, it will ban User A because doing excessive colors in channel by using *!*userA_ident@*.users.undernet.org.

So, for the enhancement and security reason, I suggest the script will ban annoying user with banmask -> *!*@full_hostname. For example, it banned annoying user who used excessive colors by *!*@123.456.789.255 or *!*@some.host.name.com.

And here, I would be appreciated if someone can make enhancement to modified the banmask of this TCL script.

Proc for the banmask of this script as below;
(Note: This is for color proc and how it set the ban only, for all view of this script, download it on Egghelp's Tcl Archive)

set bmask [maskhost [getchanhost $nick $chan]]
set bmask [format "*!*%s" [string range $bmask 2 [string length $bmask]]] <--- This line require to change 8)
newchanban $chan $bmask $botnick [subst $chanpro(ban_color)] $chanpro(ban_time_color)
putserv "KICK $chan $nick :[subst $chanpro(ban_color)]"

Thanks for your help.
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

set bmask *!*@[lindex [split [getchanhost $nick $chan] @] 1]

this will ban in form *!*@host
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

Sir_Fz wrote:set bmask *!*@[lindex [split [getchanhost $nick $chan] @] 1]

this will ban in form *!*@host
Change for line bmask 1 or line bmask 2? Or just remove both and adding only 1 line for it?
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

If the person that triggers the proc it's the same as the person that should be banned then drop the [getchanhost $nick $chan] part and use host or whatever you've put in that proc.
Once the game is over, the king and the pawn go back in the same box.
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

Can you give some example Caesar.. :-?
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

replace both with the code I gave you.

what caesar meant is that if the offender is the one who triggers the proc, then getchanhost won't be needed, instead just use $host or $uhost (depends on what you call it in the proc)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

something like..

Code: Select all

scan $uhost "%\[^@\]@%s" user host
newchanban $chan $host $botnick [subst $chanpro(ban_color)] $chanpro(ban_time_color)
be shure you have in the bind uhost, if not change to it's actual name.
Once the game is over, the king and the pawn go back in the same box.
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

How about if I change both Bmask Line to;

set uhost [string tolower $uhost]
set bmask *!*[string tolower [string range $uhost [string first "@" $uhost] end]]

Does it work to ban *!*@host.domain..
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

i guess so, but dont ask.. try it. also the string tolower isn't so much needed.
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

:roll: Argh, error ---> Wanted to ban myself--deflected.
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

That means he wants to place a ban that matches his host, wich means the person that triggered the *banning* proc is a clone or the ban is an bad mask, something like *!*@* .. As Sir_Fz said, there is no need of the string tolower's. Why don't you just use the ban thing I've posted? Is a lot faster than the stuff you posted.. at least in my tests it is.
Once the game is over, the king and the pawn go back in the same box.
User avatar
blood_x
Halfop
Posts: 77
Joined: Tue Nov 20, 2001 8:00 pm
Location: KL, Malaysia
Contact:

Post by blood_x »

Yeap, but I get a little confusing here.. Can you post more details / full script for it..

Thanks
Thank you for your support and commitments.

Sincerely,
fzAy®
http://www.iNTRACyber.com
(We Chat, We Share & We Learn)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind pubm - "*\002*" ban:colors
bind pubm - "*\003*" ban:colors
bind pubm - "*\026*" ban:colors
bind pubm - "*\037*" ban:colors

proc ban:colors {nick uhost hand chan text} {
  if {[matchattr $hand of|fo $chan] || [isop $nick $chan]} {
    return
  }
  scan $uhost "%\[^@\]@%s" user host
  newchanban $chan *!*@$host Colours "No colours, bold, etc. in $chan channel." 5
}
Once the game is over, the king and the pawn go back in the same box.
User avatar
BarkerJr
Op
Posts: 104
Joined: Sun Mar 30, 2003 1:25 am
Contact:

Post by BarkerJr »

I think \017 is plain (CTRL+O), too.
V
Vinh
Voice
Posts: 12
Joined: Sun Oct 12, 2003 10:59 am

Post by Vinh »

On the same topic, how do you set ban mask like *.*@userhost/ip.com.au when eggdrop bans as revenge for deop or for flood with botnet repeat component.
Locked