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!
Carlin0
Voice
Posts: 30 Joined: Tue Dec 04, 2018 3:41 pm
Location: Italy
Post
by Carlin0 » Sat Jan 30, 2021 7:30 pm
is it possible to ban a nick that exceeds a certain number of characters (eg 10 or 11)?
Last edited by
Carlin0 on Sun Jan 31, 2021 7:01 pm, edited 1 time in total.
Carlin0
Voice
Posts: 30 Joined: Tue Dec 04, 2018 3:41 pm
Location: Italy
Post
by Carlin0 » Sun Jan 31, 2021 4:48 am
this works, but it only kicks and you risk making the bot work too much, I would have preferred a ban .
simo
Revered One
Posts: 1082 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sun Jan 31, 2021 10:57 am
try this:
Code: Select all
set max_nick_len 10
bind join - * nick_join
bind nick - * nick_change
proc nick_join {nick uhost hand chan} {
global botnick max_nick_len
if {![botisop $chan]} { return 0 }
if [isbotnick $nick] { return 0 }
if {[string length $nick] > $max_nick_len} {
pushmode $chan +b [maskhost $uhost 2]
putkick $chan $nick "Your nickname is too long! use $max_nick_len characters or less"
}
}
proc nick_change {nick uhost hand chan newnick} {
if {![botisop $chan]} { return 0 }
if [isbotnick $newnick] { return 0 }
nick_join $newnick $uhost $hand $chan
}
as i mentioned u can block excessive use of chars with 1 banmask
like:
+b ??????????*!*@*
this saves u the trouble of having to kickban each long nick
Carlin0
Voice
Posts: 30 Joined: Tue Dec 04, 2018 3:41 pm
Location: Italy
Post
by Carlin0 » Sun Jan 31, 2021 6:59 pm
thanks, I just made it so that only the nick and not the whole mask were banned, so that changing nick could re-enter
simo
Revered One
Posts: 1082 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sun Jan 31, 2021 8:10 pm
the issue is you will end up with a full banlist since having to set bans on a zillion paterns of nicks that are too long rather than just set 1 ban and get them all wich i mentioned few times
like this banmask bans all nicks that are longer than 9 characters and allow all that are 9 or less
/mode #channel +b ?????????*!*@*
Carlin0
Voice
Posts: 30 Joined: Tue Dec 04, 2018 3:41 pm
Location: Italy
Post
by Carlin0 » Mon Feb 01, 2021 5:37 am
however with your method people will find themselves banned without knowing why
simo
Revered One
Posts: 1082 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Mon Feb 01, 2021 10:04 am
i assume your users connect throu your website you could have some house rules set there but then again im not sure how your users connect.