mIRC Home    About    Download    Register    News    Help

Print Thread
#65578 27/12/03 04:31 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
//auser 2 $address(deeping,1)

* /auser: insufficient parameters

but when deeping is on a channel it works.. i also try who deeping..

but nothing.. confused

#65579 27/12/03 04:53 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
$address only returns the address when they are in your IAL.

Use /guser 2 deeping 2.

#65580 27/12/03 05:40 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
/who or /whois them first, then try.


-KingTomato
#65581 27/12/03 05:52 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
kk.. i have one more question: How to lock a "username" to a address?

I'm trying to make a login system, and making a channel system.. Like, i just have access on #chan1 and not on #chan2

but my friend have on #chan2 and not on #chan1

so if i try .op on #chan2 it reply Sorry, you don't have access on this channel.

i use ini files.. eg:
[deep3d]
user=Deep3D
pass=encoded
channel=#chan1
level=3

on @2:text:.op*:#:{
if blah bla read the channel, and if channel == $chan bla bla
if $me isin $2- { halt }
if $2 == $null { mode $chan +o $nick }
else { mode $chan +ooo $$2 $3 $4 }
}

#65582 27/12/03 06:21 PM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
reading files all the time is a little slow, I also have a thing about ini files but in this case its probably just small scale,
I would store the channel names in this format. say the max level is 500 and min 1

500:#chan1 100:#chan2 50:#chan3

then you can use $wildtok to see if they have access on that channel. like:
$wildtok(500:#chan1 100:#chan2 50:#chan3,*:#chan3,1,32)
will return 50:#chan3 if you $gettok(50:#chan3,1,58) it will return the level.

Another Tip:
Since you have a login system, and you only are connected as a client, so you can only see when people quit when you have common channels with them.
So you need to log them out some time. you would need to do that when they part the last common channel. or you see them quit.
Well mirc just has the very thing to let you do that.
/ialmark nick <text>
that will allow you to put text in the ial cache, it will stay even when they change nicks and it will be lost when they part the last common channel, which is good if you ask me, because that will be them logged out.
When they login i would mark the ial with either the username or all the channels and access levels they have.
you can get that info back with $ial(<nick>).mark
will probably be better if you keep that info in the ial cache because it's much faster than reading it from a file everytime.

You will also need to only allow them to login when they have a common channel with the bot, you can check if $comchan($nick,1) exists for that, $comchan($nick,0) would return the total common channels.

#65583 27/12/03 08:30 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
thanks! smile

#65584 27/12/03 08:35 PM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
If I were you I would just forget the whole auser ruser thing, maybe check the mask when they login, but just go by the /ialmark to know who they are. Will be more secure that way, as it wont go my masks, it will go by the nick. Two people cant share the same nick on a network, but two people can share the same [email]ident@host.[/email]

EDIT: oh you edited, well I'll leave this anyway, but seem irrelevant now.

Last edited by Hitchhiker; 27/12/03 08:37 PM.
#65585 27/12/03 09:41 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
yes, i now have everything in ini almost.. so i stick to that..

eg:
channel=#sus, #dag (i have access on thows 2 channels)

but...

on 2:part:#:{ if part all channels that the bot is on "unauth" }

any suggestions? cool

#65586 27/12/03 09:52 PM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
if you use the /ialmark idea the parting nick will be deleted from the internal address list if that channel is the last common channel with the bot, so the mark you make on it will also be deleted. Using the ial and not using /auser or /ruser means you dont have to worry about quits or parts, Khaled has done it all for you. Not much point either in using user levels for this as when they try to use a command you will have to check if the channel name is in their $ial(nick).mark if not then they dont have access to use that command.

#65587 27/12/03 09:57 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
ok, ill think about that.. but...

this is stupid.. bud.. another way to make the red marked stuff
if $2 == $null { "set $2 $nick" }

#65588 27/12/03 10:07 PM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
to do that you would need to tokenize 32 $1 $nick but you don't need to because its already held in $nick

#65589 27/12/03 10:20 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
thanks!!! your a good scripter.. wink


Link Copied to Clipboard