The script compares the user's ident on joining, and checks that user's ident against other idents determined by the script. If the ident is flagged as "bad" the user is kicked and there is a ban placed on that user's ident. Other "bad idents" can be added, simply use the same format under the BadIdentCheck alias, where "Guest" is the bad ident.
alias GetIdent {
var %nick-ident = $remove($gettok($address($1,3),1,$asc(@)),*!*)
return %nick-ident
}
alias BadIdentCheck {
if ($1 == badident) {
return $true
}
elseif ($1 == Guest) {
return $true
}
else {
return $false
}
}
ON 1:JOIN:#: {
if ($nick != $me) && ($me isop $chan) {
if ($BadIdentCheck($GetIdent($nick)) == $true) {
kick # $nick bad ident
mode # +b $+(*!,$GetIdent($nick),@*)
}
}
}
Jokabua
If you only need like a handfull do as Yawhatever explained.
If you needed like 20 or so then I would change the
line: if $istok(badident Guest,%ident,32) {
to: if $istok(%badident,%ident,32) {
then: /set %badident badident1 badindent2 etc3 etc4
Also, at this point I would add some simple scripting to
make these changes easier/quicker.
If it became necessary to have say 50 or more badidents
then I would think about storing them into a text or ini file
and maybe loading them into hash for quicker response.
@JoKabua
using gooshie's code you would add idents inside $istok(), separated by spaces
using the original code you would need to add additional "elseif ($1 == ident) { return $true }" inside the BadIdentCheck alias.