mIRC Homepage
Posted By: bojak71730 auto op - 10/05/06 03:12 AM
ok i wana make an auto op list but i dont know how my friend told me get my bot to read a file and the file would have a list of names to auto op but i dont know how to do all that can someone please help me
Posted By: hixxy Re: auto op - 10/05/06 03:15 AM
Take a look at the /aop command.. /help /aop
Posted By: bojak71730 Re: auto op - 10/05/06 03:54 AM
i did just made it worse
Posted By: MikeChat Re: auto op - 10/05/06 04:07 AM
typing /help /aop
that made things worse?
maybe you can tells us what you did exactly

Quote:

Control

The Control dialog performs functions related to channel and user control.

Auto-Op
If a user joins a channel where you have Ops and that user's address is listed in the auto-op list, they will be given Op status. You can add an address to the list in the following format:

nick!userid@host,#channel1,#channel2

On IRC, user addresses are specified in the format:

nick!userid@host

So if my nickname is MadGoat and my address is khaled@mirc.com then to put me in your list, you would use:

madgoat!khaled@mirc.com

If I change nicknames a lot, then you would use:

*!khaled@mirc.com

If I change my nickname and userid a lot, then:

*!*@mirc.com

The /aop command

/aop [-rw] <on|off|nick/address> [#channel1,#channel2,...] [type] [network]

The -r switch indicates that the address is to be removed.
The -w switch makes the auto-op apply to any network.

If you do not specify a type then only the users nickname is used. If you specify a type then the users address is looked up via the server.

The $aop identifier returns $true if auto-op is enabled, and $false if it isn't.

The $aop(address/N) identifier returns any matching address in the list, or the Nth address. The .type property returns the list of channels. The .network property returns the associated network, if any.
Posted By: bojak71730 Re: auto op - 10/05/06 04:15 AM
i understand that but ithat would mean i would have to do that for a lot of users i was told that there was a that u can make the bot read a file and in that file it has list of names that are to be oped
Posted By: hixxy Re: auto op - 10/05/06 09:04 AM
Sure, try this:

Code:
on @*:join:#:{
  if ($read($+($scriptdirops\,$mkfn($chan),.txt),nw,$nick)) || ($read($scriptdirops\globals.txt,nw,$nick)) mode $chan +o $nick
}


Create an ops\ directory wherever this script is, then create a .txt file for each channel you want to have ops for. So if you wanted to have ops for #x, you want create #x.txt and type the ops for that channel in there. For global ops (all channels) you would write their names in globals.txt.
Posted By: bojak71730 Re: auto op - 10/05/06 04:22 PM
so now i need to put the location of the file C: and all that
Posted By: bojak71730 Re: auto op - 10/05/06 04:29 PM
ok my channel name is #TheUnKnowns so i need to make a folder that says op and then inside the file op i need to make a text file called TheUnKnowns
also with that scrpt u gave me it needs to go into the remote section right?

i know i sound stupid but i wana make sure i do this right
Posted By: RedDevilUK Re: auto op - 10/05/06 04:57 PM
Code:
on @*:join:#TheUnKnowns:{  if ($read($+($scriptdirops\,$mkfn($chan),.txt),nw,$nick)) || ($read($scriptdirops\op\TheUnKnowns.txt,nw,$nick)) mode $chan +o $nick
}  


And yes paste it into the end of your remotes
Posted By: bojak71730 Re: auto op - 10/05/06 05:19 PM
redevilUK ur script isnt workin
Posted By: bojak71730 Re: auto op - 10/05/06 05:23 PM
hixxy im sure ur script works i must be editing it wrong or doing somthing wrong so can u help me?
Posted By: MikeChat Re: auto op - 10/05/06 06:35 PM
try this way of looking at the
Code:
on @*:join:#:{
  if ($read($+($scriptdirops\,$mkfn($chan),.txt),nw,$nick)) mode $chan +o $nick
  elseif ($read($scriptdirops\globals.txt,nw,$nick)) mode $chan +o $nick
}
or look at it this way
If mIRC is in c:\mIRC\
and the script is in the main folder, he said to make a subfolder 
c:\mirc\ops\
and in the folder c:\mirc\ops\ put the ops text #TheUnKnowns.txt 
with all your ops listed in that text (c:\mirc\ops\#TheUnKnowns.txt)

on @*:join:#:{
  if ($read($+($scriptdirops\#TheUnKnowns,.txt),nw,$nick)) mode $chan +o $nick
}

this one would be for multiple channels:
If mIRC is in c:\mIRC\
and the script is in the main folder, he said to make a subfolder 
c:\mirc\ops\
and in the folder c:\mirc\ops\ put the ops text globals.txt 
with all your ops listed in that text (c:\mirc\ops\globals.txt)

on @*:join:#:{
  if ($read($scriptdirops\globals.txt,nw,$nick)) mode $chan +o $nick
}
Posted By: hixxy Re: auto op - 11/05/06 01:58 AM
If the script is in c:\mirc you should create the c:\mirc\ops directory and then the c:\mirc\ops\#TheUnknown.txt file with the list of ops for that channel.

If the script is in c:\program files\mirc you should create the c:\program files\mirc\ops directory and then the c:\program files\mirc\ops\#TheUnknown.txt file with the list of ops for that channel.

If you want I could write something quickly to let you edit the list of ops automatically without having to create a new file manually each time.
Posted By: genius_at_work Re: auto op - 11/05/06 02:14 PM
If you want to easily edit/add the files, just add this alias to your remotes file:
Code:
alias editops {
  var %chan = $active
  if (#* iswm $1) %chan = $1
  else {
  echo -a Syntax: /editops #channel
  return
  }
  run $+($scriptdirops\,$mkfn(%chan),.txt)
}

(untested)

To edit a file, do one of the following things:

/join the channel you want to edit, and make its window active, then type /editops

-or-

Type /editops #channel from any window.

---

Your default .txt editing program should be opened with the correct file in it. Just edit the file and save it.

-genius_at_work
© mIRC Discussion Forums