mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
S
Sturm
Sturm
S
I want to make it so when you type, say, !op <username> it ops that person. I know the part below but what is after it?
Code:
on @*:text:!op  

also, how do i put it so only users specified in a .txt file can use it?

S
sas22
sas22
S
Code:
on @*:text:!op*:#:/mode # +o $2

Eh I know a way to use it in a var you would do this /set %opnicks nick1,nick2,etc...
Then the code would be:
Code:
on @*:text:!op*:#:if ($istok(%opnicks,$nick,44)) { mode # +o $nick} else 
{ halt }

Last edited by sas22; 11/07/06 08:04 PM.
S
Sturm
Sturm
S
ok thanks, that worked but how do i get it so only users in (example.txt) can use it? I know they each go on their own line but how would i do that?

EDIT: or better yet so people can only make others as high as they are.
For example someone with op status can only make someone halfop, op, or voice.

Last edited by Sturm; 11/07/06 08:16 PM.
S
sas22
sas22
S
I hope that helped

S
Sturm
Sturm
S
umm i cant get that to work could you tell me where to specifically put everything?
the /set %opnicks goes in variables right?
and the rest goes in remote?

S
sas22
sas22
S
yup

S
Sturm
Sturm
S
i put both of them in where i said, exactly how they are and it wont work!

S
sas22
sas22
S
Code:
on @*:text:!op*:#:{ if $istok(%opnicks,$nick,44) { mode # +o $nick } | else { halt } }

Eh i saw the problem =) my bad I was in a hurry.

Last edited by sas22; 11/07/06 08:45 PM.
S
Sturm
Sturm
S
all on one line just like that?

EDIT: oh and would it work if i did:
Code:
 if $nick isin(ops.txt)
  mode # +o $2 


or could you do it so someone can only use it if they're op or higher?
ex. halfops can't use it, people with & rank can etc. Would you just have it like:
Code:
 on &amp;*:text:!protect*:*: {
   mode # +a $2

would that make it so only people with & status can make others up to &?

Last edited by Sturm; 11/07/06 08:55 PM.
S
sas22
sas22
S
Quote:
all on one line just like that?

yes

S
Sturm
Sturm
S
it still wont work when i type !op sturm (yes, sturm is my nick and im using another nick to run the code)

S
sas22
sas22
S
No you would just type !op And strum needs to be in the varlist for %opnicks
Code:
on @*:text:!op*:#:/mode # +o $2
Would react to $op Strum

S
Sturm
Sturm
S
I want it so only users in the varlist can use the commands, and that they can use them on other people

or if its easier, only people listed in a .txt file (this is what i would prefer)

Last edited by Sturm; 11/07/06 09:21 PM.
S
sas22
sas22
S
What I gave you before will work.
Just make sure in the variables section has this %opnicks Strum,nick2,etc...
Then just use the code I gave you

S
sas22
sas22
S
Quote:
all on one line just like that?

EDIT: oh and would it work if i did:
Code:
 if $nick isin(ops.txt)
  mode # +o $2 


or could you do it so someone can only use it if they're op or higher?
ex. halfops can't use it, people with & rank can etc. Would you just have it like:
Code:
 on &amp;*:text:!protect*:*: {
   mode # +a $2

would that make it so only people with & status can make others up to &?
No mIRC wont reconize ~ or & thats IRCD protocol..

S
Sturm
Sturm
S
I want it so only people on the varlist can use the commands, but so they can use them on other people

for example, say sturm is on the varlist
with sturm i type !op sturm2
this makes sturm2 an op
now with sturm2(not on varlist) i type !op sturm
it will not do anything because he isnt allowed to use it

S
sas22
sas22
S
So you want the op nicks to op others who aren't on the oplist in your var?

S
Sturm
Sturm
S
yes, it seems like it would be easier to do with a .txt file

S
sas22
sas22
S
Quote:
yes, it seems like it would be easier to do with a .txt file

Code:
on @*:text:!op*:#:{ if $istok(%opnicks,$nick,44) { mode # +o $nick } | else { halt } }

All you have to do is place that in remote and type this:
/set %opnicks nick1,nick2,nick3
It works like this:
<nick1> !op
* You sets mode: +o nick1
<NickX>!op
Nothing happens..

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
A small re-write of the code
Code:
on @*:text:!op*:#: $iif($istok(%opnicks,$nick,44),mode # +o $iif(!$2,$nick,$2))


Checks first to see if the person using the !ops command is in the %opnicks variable,.
If they aren't then nothing else happens.
If they are, then there's a check to see if a nick was specified.
If no nick was specified, then the person using the !op command is opped, otherwise the nick specified is opped. Please note that there is nothing in the code (at the moment) that ensures the nick specified is in the channel.

Page 1 of 2 1 2

Link Copied to Clipboard