mIRC Home    About    Download    Register    News    Help

Print Thread
#130539 19/09/05 12:41 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
Quote:
i'm trying to make a socket bot and have done well so far but now I am trying to add some user stuff so certain users can only have access to certain functions. my problem is I was trying to make a simple alias to see if the user exist but it isnt working for me it just keeps returning 0.

Code:
alias irc_user_exist { 
  return $var( %ib_con_ [ $+ $1 ] ) 
}
 


here is the script that makes the variable.


Code:
alias irc_user_add { set %ib_con_ $+ [ $1 ] $2 $md5($3) $4 }  


any help would be appriciated.


We don't just write the scripts, we put them to the test! (ScriptBusters)
#130540 19/09/05 01:12 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I haven't had a chance to look at it closely, but usually when setting priority with []'s, you need to use them twice:

%ib_con_ [ $+ [ $1 ] ]

You've done two different methods, but you need the two methods combined like shown above.

Note that you could also use:

$+(%ib_con_,$1)


Invision Support
#Invision on irc.irchighway.net
#130541 19/09/05 01:26 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
the double bracket one worked. thanks for the help.


We don't just write the scripts, we put them to the test! (ScriptBusters)
#130542 19/09/05 06:23 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Quote:
Note that you could also use:

$+(%ib_con_,$1)


You'll have to separate the % so the variable won't be evaluated.

Code:
 $+(%,ib_con_,$1) 


To get the value of it:

Code:
 $($+(%,ib_con_,$1),2) 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#130543 19/09/05 06:39 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Good catch. smile


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard