Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias test_nicks {
- ; /test_nicks de]bian de^bian de-bian de`bian dgdgd-de[b]ian_hdhdfh de[b]ian de}bian|legen de}bian d{e}bian
- if (!$1) { echo -a Error: Enter nicks! | return }
- var -s %nicks = $1-
- var %total = $numtok(%nicks,32)
- var %index = 1
- while (%index <= %total) {
- var -s %nick = $gettok(%nicks,%index,32)
- if (!$chkbadnick2(debian,%nick)) { echo -at Nick NOT matching! -> %nick | return }
- inc %index
- }
- echo -at Ok all nick(s) matching.
- }
- alias chkbadnick2 { var %s = [-a-z_`|{}^\[\]\d]* | if ($regex($2,/^(?! $+ \Q $+ $replacecs($1,\E,\E\\E\Q) $+ \E $+) $+ %s $+ \Q $+ $replacecs($basenicktoregex($1,%s),\E,\E\\E\Q) $+ \E $+ %s $+ $/iu)) { return 1 } }
- alias basenicktoregex { var %name $2 | return $regsubex($replace($1,o,[0o],e,[e3],etc,[etc]),/(\[[^\]]+\]|.)/g,\1+ $+ %name) }
- ;alias chkbadnick { return $regex($1,/^(?!debian$)[-a-z_`|{}^\[\]\d]*d+[e3]+[b]+[1i]+[a]+n+[-a-z|_`^\[\]{}\d]*$/) }
- ;alias checkallnick var %s [-a-z_`|{}^\[\]\d]* | noop $hfind(table,*,0,w,if ($regex($1,/^(?! $+ \Q $+ $replacecs($1,\E,\E\\E\Q) $+ \E $+) $+ %s $+ \Q $+ $replacecs($basenicktoregex($1,%s),\E,\E\\E\Q) $+ \E $+ %s $+ $/i) echo -sg bad nick alert: $1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement