mIRC Home    About    Download    Register    News    Help

Print Thread
#107748 12/01/05 11:35 PM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
im making a remote access system for a bot that works on allowing the auser command to be executed if a passowrd is supplied
my question is how would the value of a variable be subbed into the remote

unclear? thought so. Im looking to write a popup that will set
a global variable like
access
.set pass:{
unset -s %x
set -s %x $?
}
then sticking %x in the remote and having the remote read it as whatever it set to
my concern is that uit will read it as plain text since i would be sticking it in the text portion of the remote like this
on *:text:%X *:*:{
auser $$2-
}


The Kodokan will move you, one way or another.
#107749 12/01/05 11:39 PM
Joined: Jan 2005
Posts: 6
G
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
G
Joined: Jan 2005
Posts: 6
cant you just use something like:

on *:text:*:*:{
if ( $2 == %x ) { auser $$2- }
else { halt }
}

#107750 12/01/05 11:53 PM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
i dont think so
if it treats $2 like paramter 2 then it wont work since im going to say
pass myid
it will compare %x to my id
in theory
still a good idea maybe $1 will work
ill wait for one of the higher ups to weigh in before i go to test with this


The Kodokan will move you, one way or another.
#107751 12/01/05 11:57 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
If this is any consellation try here.

#107752 13/01/05 12:12 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
that sucks
even still
couldnt i make a popup that changes the pass
i mean it works fine the way i have it i just want a popup to change the pass
maybe with write.ini


The Kodokan will move you, one way or another.
#107753 13/01/05 06:12 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
if its any conselation to you
Arrays and "dynamic" variable techniques by Ntd writen for pairc.com

Some very common problems are "how do I make an array of variables?" and "how do I set and retrieve a variable for any nick?". Well, this information is in the mIRC help file, but it's extremely well hidden!

/say % [ $+ [ $1 ] ]


There it is, the big secret. It may not look like much, but in fact its the basis of arrays (and the related topic of storing and looking up stuff for each nick.) Sadly, Khaled stopped short of explaning how that code is any use, so here goes. What the code above does is to stick a % sign on front of whatever $1 is to get a variable name, re-evaluate it and then /say it. So if $1 was "test", mIRC would say whatever was in %test. It would not say
"%test"!! (That's important.) Try this from any editbox:

/set %message hello
/set %test message
//echo -a % [ $+ [ %test ] ]


The Kodokan will move you, one way or another.
#107754 13/01/05 06:13 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
the above is from
C:\tutorials\New Folder\dynvar-ntd[1056915891]\dynvar.html


The Kodokan will move you, one way or another.
#107755 13/01/05 06:18 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
What are you talking about, dude? confused

#107756 13/01/05 06:30 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
i said what i wanted to do and you linked me to that ultra long code
and now i have it done and minus the popup its like 6 lines
code
on *:text:*:*:{
if ($1 = %x) { auser $$2- }
}
code

Last edited by ricky_knuckles; 13/01/05 06:36 AM.

The Kodokan will move you, one way or another.
#107757 13/01/05 06:33 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Ah right, ok man. I'm with you. smile

#107758 13/01/05 06:37 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
finished everything
have yet to test
its late and storming
------------------------------code--------------------------------------
#remote.access on
on *:text:*:*:{
if ($1 = %x) { auser $$2- }
{ set -s %i on }
}
on *:text:!ruser *:*:{
if (%j = on) { halt }
if ($ulevel >= 4) { ruser $$2 }
{ set -s %j on }
{ timer 1 10 unset -s %j }
}
on *:text:!pass *:*:{
if (%k = on) { halt }
if ($ulevel >= 4) { set -s %x $$2- }
{ set -s %k on }
{ timer 1 10 unset -s %k }
}
#remote.access end
--------------------------------------------code-------------------------
now the pass portion wont work

Last edited by ricky_knuckles; 13/01/05 07:00 AM.

The Kodokan will move you, one way or another.
#107759 13/01/05 07:13 AM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
the pass portion didnt work so i tried a popup
that didnt work so im thinking maybe you cant set or unset global variable from within a script or something
i dunno any thoughts?


The Kodokan will move you, one way or another.

Link Copied to Clipboard