mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2005
Posts: 5
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Dec 2005
Posts: 5
Code:
alias -l ownerfromfile {
  if $1 === %owner {
    //return yes
  }
  else {
    //return $iif($read(owners.txt,s,$1),yes,no)
  }
}

on *:TEXT:!mode *:?: {
  if $ownerfromfile($nick) === yes {
    //mode $2-
  }
  else {
    //notice $nick %AD
  }
}


I have my nick as "me". I add "me" to owners.txt. as "me" I say:

!mode #bots -q me

but it still sends me the %AD notice...

what am I doing wrong?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
From what I see in that code, absolutely nothing, which means that the message you're seeing is coming from either a different script, or somewhere else in that script.

Joined: Dec 2005
Posts: 5
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Dec 2005
Posts: 5
not to be ride or shoot u down but thats impossible.

every script, every one, is activated with on:text events. there is definitely something wrong with this because I only get the message when I type "!mode #bots -q me" as the nick "me"

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you might show what is actually in owners.txt
the $read with the s switch, when it finds the matching text, it returns what ever is After the match
if owners text has me me
$read(ownders.txt,s,me) would return "me"

if it has just "me" it wont return anything even though it has found the text "me" because there isnt anything After the word on that line
try the w switch and see if that makes a difference.

Joined: Dec 2005
Posts: 5
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Dec 2005
Posts: 5
the w switch fixed it, thanks so much!


Link Copied to Clipboard