mIRC Home    About    Download    Register    News    Help

Print Thread
#139065 10/01/06 12:55 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
I use a yourbot in my room and would like the commands to go trough dcc.
The bot uses 4 userlevels.
The problem is I can't get the dcc to work with levels.
The bot uses this to see who joins:
Code:
 on ^1600!:JOIN:#:echo $chan 3*** Joins : $nick ( $+ $mask($address($nick,1),1) $+ ) -- (Operator Status: 

I know dcc does not know any levels so this is what I tryed.
Code:
 on 1:CHAT:*help*: {
  if ($level($address($nick,1),1) == 1600 {
    if ($1 == %c $+ help) {
      if ($2 == spelletjes) { 
        if ($3 == trivia) /msg =$nick help trivia komt eraan
        else /msg =$nick help spelletjes komt eraan
      }
      else { /msg =$nick help }
    }
    else { /msg =$nick Sorry, onbekend commando }
  }
}
 

I used the same $address as in the join.
Hoping the bot would know who dcced and return the correct msg.
But it doesn't work.
What is wrong?
It also return only the sorry, onbekend commando msg.
The bot uses an ini flie to store who is who on the levelpart.
the way its stored is like this:

n0=1600:<nickname><host>

I thought letting it read the ini should let the bot know who is on the dcc and from there on continiue the command.
This however is somthing i dont'know how to do or if it is possible.
Perhaps there are more ways to identify who is on the dcc.
Please help.

#139066 10/01/06 06:32 PM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
For that to would you would have to have /ial on
and the nick would have to, and always have while in DCC chat without a common channel with you (bot).

Would be better to use $address($nick,5) or $ial($nick) to get the full address. Then pass that to $level()

However, I would recommend a custom login system, make it so they have to quote a username and password when they login. This will be more secure.

Even though address mask access levels is pretty insecure most of the time anyway...

Remember that if you send a chat request to someone. Someone else could nip in there and connect before they get there. Though the chances are remote, as they'd have to know you have a dcc port open waiting, and also need to know the IP and port to connect to.

But it would be a possible security exploit having it the way you have it.

The login would be very easy to do, safer, and would work when they don't have a common channel with the bot.


Link Copied to Clipboard