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.

Adduser with an "~"

Old posts that have not been replied to for several years.
Locked
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Adduser with an "~"

Post by Rusher2K »

Hello i had an problem i want to add the user.quakenet.org users without the "~" but how here is my code :

Code: Select all

set uhost [getchanhost $nick $chan]

        if {[string match "*users.quakenet.org" $uhost]} {
                        set hostmask *!*$uhost
                        } else {
                        set uhost [string trimleft $uhost "~"]
                        set hostmask *!*[lindex [split [maskhost $uhost] "!"] 1]

                        }
But it doesn't work :/
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

check ur config file don't see why u need a script for this u can disable or enable it in ur eggdrop.conf
XplaiN but think of me as stupid
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

set hostmask *!*[lindex [split [maskhost $uhost] "!"] 1]
this will return the same as *!*$uhost (i.e. *!*ident@host) since maskhost will convert ident@host into *!ident@host.

if you meant to ban *!*@host then what you need is

Code: Select all

set hostmask *!*@[lindex [split $uhost] "@"] 1]
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

1. If the person who triggers the bind is the same person as $nick the there is no need of the "set uhost [getchanhost $nick $chan]" cos you already have it in $uhost variable.
2. Instead of "if {[string match "*users.quakenet.org" $uhost]} {" better use: "if {[string match -nocase "*@*.users.quakenet.org" $uhost]} {"
Once the game is over, the king and the pawn go back in the same box.
Locked