mIRC Homepage

Auto-op when IRCop

Posted By: Vinniej

Auto-op when IRCop - 20/06/06 02:30 AM

Hi,

Why this code doesn't work;

Code:
 on *:join:#: {
  if ($nick == $me) {
    if (o isin $usermode,IRCOp) { set %temp.chan $chan | timerop 1 2 give-op }
  }
}

alias give-op {
  opmode %temp.chan +o $me
  unset %temp.chan
}
 
Posted By: Kurdish_Assass1n

Re: Auto-op when IRCop - 20/06/06 02:39 AM

Quote:
Hi,

Why this code doesn't work;

Code:
 on *:join:#: {
  if ($nick == $me) {
    if (o isin $usermode,IRCOp) { set %temp.chan $chan | timerop 1 2 give-op }
  }
}

alias give-op {
  opmode %temp.chan +o $me
  unset %temp.chan
}
 

ok, I don't get this..why would you do "if (o isin..)" unless I read it wrong..but, don't you want it to op you IF o isn't in $usermode
Posted By: RusselB

Re: Auto-op when IRCop - 20/06/06 02:40 AM

Try this instead
Code:
 on me:*:join:#:{
if (o isin $usermode) { .timer 1 2 opmode $chan +o $me }
}
 


I'm not familiar with the opmode command, so I'm presuming that it's a server level command that allows an IRCop to op themselves in a channel.

I think the reason yours wasn't working is the extra
Quote:
,IRCOp
in the IF statement (2nd one in your code)
Posted By: RusselB

Re: Auto-op when IRCop - 20/06/06 02:44 AM

When a person has IRCop status, then one of the characters in their usermode is o. Therefore, when this person has that mode active (ie: they have identified to the network as an IRCop), then they want to force channel ops for themselves upon joining the channel.
Posted By: Vinniej

Re: Auto-op when IRCop - 20/06/06 02:48 AM

Quote:
Try this instead
Code:
 on me:*:join:#:{
if (o isin $usermode) { .timer 1 2 opmode $chan +o $me }
}
 


I'm not familiar with the opmode command, so I'm presuming that it's a server level command that allows an IRCop to op themselves in a channel.

I think the reason yours wasn't working is the extra
Quote:
,IRCOp
in the IF statement (2nd one in your code)
Still doesn't work. I won't get opped by my server.
Posted By: RusselB

Re: Auto-op when IRCop - 20/06/06 03:35 AM

presuming that all of the parameters for the opmode command have been specified correctly, I see no reason for the command to not work.
After I get my DSL back (should be within 24 hours), I'll get on the network where I have IRCop status and test the script, unless you can see that a parameter has been specified incorrectly.
I don't guarantee that the server that I'm on will have the same command, but something similar should exist.
Posted By: Lpfix5

Re: Auto-op when IRCop - 20/06/06 05:23 AM

Quote:
Quote:
Try this instead
Code:
 on me:*:join:#:{
if (o isin $usermode) { .timer 1 2 opmode $chan +o $me }
}
 


I'm not familiar with the opmode command, so I'm presuming that it's a server level command that allows an IRCop to op themselves in a channel.

I think the reason yours wasn't working is the extra
Quote:
,IRCOp
in the IF statement (2nd one in your code)
Still doesn't work. I won't get opped by my server.


Well first determine what is the command you use to OP yourself when oppered up

Don't forget if you have the (identify oper) in your perform + channel join the command for op might be before you are oppered..

what I mean is

Connecting to network.....

You have joined #mIRC
command attempted to be performed..

then

You have successfully identified password for your IRCop status.

if not basically do something like this

Code:
on ME:*:JOIN:#:{
if (o isin $usermode) { raw mode # +o $me }
}


if that doesnt work which for sure it will, then you must have another on JOIN script somewhere within the remote window you are working on.
Posted By: Warrior1968

Re: Auto-op when IRCop - 20/06/06 07:01 AM

Or use this simple onjoin which you can alter if your network doesnt use +qaohv support.,ops you in every channel.

on *:JOIN:#:{ if ($nick == $me) { mode # +qao $me $me $me } }

p.s./os set superadmin on also works if you are added to the services admin list wink
Posted By: OsTrailYa

Re: Auto-op when IRCop - 22/06/06 01:58 AM

that will cause spam when you forget to Oper Up smile
Posted By: hixxy

Re: Auto-op when IRCop - 22/06/06 02:01 AM

Just out of curiosity, why do you do /raw mode instead of just /mode?
Posted By: MikeChat

Re: Auto-op when IRCop - 22/06/06 04:54 AM

Quote:
that will cause spam when you forget to Oper Up smile


what?
spam is unwanted advertising, is that what you mean?
© 2021 mIRC Discussion Forums