Here's the problem... my script works... for me, but no one else. It works for me from webchat and regular clients, but for some reason, it won't do anything but voice other people. .adduser/chattr never happens for them.

Code: Select all
bind pub fo !voice voice_user
proc voice_user {nick uhost hand chan text} {
set nicks [lrange $text 0 end]
foreach n $nicks {
if {[onchan $n $chan] && ![isvoice $n $chan]} {
pushmode $chan +v $n
set host [getchanhost $n $chan]
set user [string trim $n {0123456789`~!@#$%^&*-_=+}]
if {[regexp -nocase -- {@[[:alnum:]]+\.[[:alnum:]]+(\..+)} $host]} {
regexp -nocase -- {@[[:alnum:]]+\.[[:alnum:]]+(\..+)} $host a b
adduser $user *$user*!*@*$b
chattr $user +g
save
} else {
regexp -nocase -- {(@[-_\/\.:[:alnum:]]+)} $host a b
adduser $user *$user*!*$a
chattr $user +g
save
}
}
}
}
Anyway... help to either get that regexp working properly or help to understand how to make masks with maskhost/getchanhost is greatly appreciated.
One more thing.. did I do this line properly? Does not seem like I did:
Code: Select all
set user [string trim $n {0123456789`~!@#$%^&*-_=+}]