mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
Code:
on *:JOIN:#mp3wavlovers,#speaker's_corner:{
  if $lookstat($nick,$chan) != none) {
    mode $chan + $+ $lookstat($nick,$chan) $nick
  }
  else Msg $chan Error: No Auto-Mode For $nick was found
}

1. This code is supposed to op or voice someone depending on their listing in an access list, but, for some reason, it is opping EVERYONE. Where did I go wrong?

2. $lookstat is what is used to actually return thier status, a = sops o = ops h = hops v = vops, which give me a little trouble when i comes to the "a's"...the bot is only an "o" and cannot set the mode +a, how can i change it from +a to +o? i tried replace, but i thought that might be what was screweing my script up in the first place...any help would be appreciated on either of these....thanks.....keeker


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
Firstly, it's op'ing everyone because you're using a wildcard as the level, change the * at the beginning of the event to something like 10, that way only users with a level of 10 will be op'ed

I'm not sure how your $lookstat identifier works, but just by looking at the on JOIN event you have there I'm surprised the 'if' statement itself isn't returning an error, you're missing the opening parenthesis:

if ($lookstat($nick,$chan) != none) {

Finally, I thought that +a was the mode used for a 'protected' user and had nothing at all to do with @, %, or +... *shrugs*


- Jason
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
oh sorry :0 here is the $lookstat identifier:
Code:
alias lookstat {
  return $iif($readini(botusers.ini,$2,$1),$readini(botusers.ini,$2,$1),none)
}


and that worked great when it isnt in that on join event, but it doesnt matter now, i went a sorta different way, here is the code i have now:

Code:
#ops on
on *:JOIN:#mp3wavlovers,#speaker's_corner:{
  if ($lookstat($nick,$chan) == a) {
    mode $chan +o $nick
  }
  if ($lookstat($nick,$chan) == o) {
    mode $chan +o $nick
  }
  if ($lookstat($nick,$chan) == h) {
    mode $chan +h $nick
  }
  if ($lookstat($nick,$chan) == v) {
    mode $chan +v $nick
  }
  if ($lookstat($nick,$chan) == none) {
    msg $chan 7,1Error: No +Mode found for13,1 $nick
  }
}
#ops end

it works, but is like a lot bigger smile


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.

Link Copied to Clipboard