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.

banmask...

Old posts that have not been replied to for several years.
Locked
E
EEggy
Op
Posts: 122
Joined: Thu Sep 26, 2002 11:46 pm

banmask...

Post by EEggy »

Hi, these few lines of codes works fine if ident is greater than one char or digit, but when ident is one char/digit like-> m@aol.com or ~m@aol.com then it bans-> *!*@*.aol.com

I want it to ban *!*m@*.aol.com in both cases with or without ~
i'll apprecite for your help
set mask [getchanhost $bnick $channel]
if {$mask!={}} {
set mask [maskhost $mask]
set mask [string trimleft $mask *!]
set mask *!*$mask
if {[onchan $knick $channel]} {
putserv "MODE $channel +b $mask"
putserv "KICK $channel $knick :$reason"
}
}

thanks
regards
EEggy
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

With this code

Code: Select all

set mask [lindex [split [maskhost [getchanhost $nick $channel]] ~] end]
if 'he' has identd enabled the mask will be '*!m@*.aol.com' else will be '*!?m@*.aol.com'.
Once the game is over, the king and the pawn go back in the same box.
E
EEggy
Op
Posts: 122
Joined: Thu Sep 26, 2002 11:46 pm

Post by EEggy »

thanks casear, but it didn't solve my main problem
when user joins like one char ident -> k@202.83.161.157

so this get ban -> *!*@202.83.161.* which is a site ban ...i wanted to ban like whatever ident is, in this case -> *!*k@202.83.161.157

these codes works fine if ident is more than 1 char/digit..
i'll apprecite if someone can help

note:bots dcc command .kickban also baning all single char/digit idents in this format *!*@.. instead of *!*k@..

thanks
EEggy
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

ever tried this...

Post by De Kus »

why not simply
set mask "*![getchanhost $bnick $channel]"
and if you want to kickban someone out, why dont use
newchanban $channel $mask insertscriptnamehere $reason
this will deop the user, create a ban (and put as much modes as posible into one line :) ) and kick the user out with kick reason: "banned: reason"
note that the loaded channel langue will be used for banned for sure :).
and yes, if the script is triggered by someone with a handle you can change the creator field to a variable containing this :D.
Locked