mIRC Homepage
Posted By: xrn0id auto op script ".aop" - 04/03/03 04:50 AM
i got this so far:

Code:
on *:TEXT:.aop*:#:{
  if ($nick == xrn0id) {
    var %aop $2-
  }
}
on *:JOIN:#:{
  if ($nick isin %aop) {
    //mode $chan +o $nick
  }
  halt
}


which is completely wrong, but im sure you get the idea of where im going. Please help me if you know how. Thanks.
Posted By: Cheech Re: auto op script ".aop" - 04/03/03 05:17 AM
well i have something similar which works a little different like this
Code:
  
on 1:TEXT:!opme:*: {
 if ( $nick isin $read(opnick.txt) ) 
 mode $chan +o $nick
} 
 
Posted By: LO_KEY Re: auto op script ".aop" - 04/03/03 06:13 AM
Now i havnt tested this, but it should work...

Code:
on *:TEXT:.aop*:#:{  
  if ($nick == xrn0id) {
    if (%aop != $null) { %aop = %aop $+ $chr(44) $+ $2- }
    if (%aop = $null) { %aop = $2- }
  }
}
on *:JOIN:#:{ 
  if ($istok(%aop,$nick,44) = $true) { 
    mode $chan +o $nick
  }
  halt
}  

Now the only thing wrong with this code that i can see, is that eventually, that var will get to long to set...
which i dun know how to get around. :\
Posted By: Knappen Re: auto op script ".aop" - 04/03/03 10:25 AM
I think I understand...

on *:TEXT:*:#:{
if (($nick == xrn0id) && ($1 == aop) && ($2 != $null)) {
.write aop.txt $2-
}
}
on *:JOIN:#:{
if ($nick isin $read(aop.txt)) {
mode $chan +o $nick
}
}

Try this.. It should work... :tongue:
Posted By: xrn0id Re: auto op script ".aop" - 04/03/03 12:42 PM
then why isnt this working?

Code:
on *:TEXT:.aop*:#ftpxdcc-wolf-botholding:{
  if ($nick isop $chan) {
    write aop.txt $$2-
  }
  halt
}
on *:JOIN:#ftpxdcc-wolf-botholding:{
  if ($nick isin $read(aop.txt)) { 
    //mode $chan +o $nick
  }
}
Posted By: MonoSex Re: auto op script ".aop" - 04/03/03 01:25 PM
$read(aop.txt) reads a random line from a file.
You'd better use .ini file or hash tables for this.
Posted By: xrn0id Re: auto op script ".aop" - 04/03/03 05:07 PM
how do you use a hash table or an ini file?
Posted By: MonoSex Re: auto op script ".aop" - 04/03/03 05:08 PM
/help hash tables
/help $readini
/help $ini
/help writeini
/help remini
Posted By: xrn0id Re: auto op script ".aop" - 05/03/03 02:06 AM
ok i got this, now whats wrong?

Code:
on *:TEXT:.aop*:#ftpxdcc-wolf-botholding:{
  if ($nick isop $chan) {
    /writeini aop.ini AUTOOP nick $nick
  }
  halt
}
on *:JOIN:#ftpxdcc-wolf-botholding:{
  if ($nick isin $readini(aop.ini, AUTOOP, $nick)) {
    //mode $chan +o $nick
  }
}
Posted By: Aubs Re: auto op script ".aop" - 05/03/03 01:20 PM
If you want it to work ONLY on nicks, then this should rectify your problem:
Code:
on *:TEXT:.aop*:#ftpxdcc-wolf-botholding:{
  if ($nick isop $chan) {
    /writeini aop.ini AUTOOP $nick Allow
  }
  halt
}
on *:JOIN:#ftpxdcc-wolf-botholding:{
  if ($readini(aop.ini, AUTOOP, $nick) == Allow) {
    //mode $chan +o $nick
  }
}
© mIRC Discussion Forums