mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
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?

Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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.
Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
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.
Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
I hope that helped

Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
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?

Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
yup

Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
i put both of them in where i said, exactly how they are and it wont work!

Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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.
Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
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.
Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
Quote:
all on one line just like that?

yes

Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
it still wont work when i type !op sturm (yes, sturm is my nick and im using another nick to run the code)

Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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

Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
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.
Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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

Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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..

Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
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

Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
So you want the op nicks to op others who aren't on the oplist in your var?

Joined: Jul 2006
Posts: 16
S
Sturm Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2006
Posts: 16
yes, it seems like it would be easier to do with a .txt file

Joined: Jun 2006
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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