Op, Half-Op and Voice

By F R E E Z E on Jun 23, 2007

Read the script and you should understand how to use. Ops, Half-Ops and Voices people.

If you find any bugs just comment =)

on *:TEXT:`o*:#: {
  if ($nick isop $chan)
  /mode $chan +o $2
}
on *:TEXT:`dop*:#: {
  if ($nick isop $chan)
  /mode $chan -o $2
}
on *:TEXT:`hop*:#: {
  if ($nick isop $chan)
  /mode $chan +h $2
}
on *:TEXT:`dhop*:#: {
  if ($nick isop $chan)
  /mode $chan -h $2
}
on *:TEXT:`v*:#: {
  if ($nick isop $chan) || ($nick ishop $chan) {
    /mode $chan +v $2
  }
}
on *:TEXT:`dv*:#: {
  if ($nick isop $chan) || ($nick ishop $chan) {
    /mode $chan -v $2
  }
}

Comments

Sign in to comment.
Mazter_1   -  Feb 27, 2011

Actually my friend it did not work since my server is not an actual IRC service, Are you familiarized with Justin TV?

 Respond  
Jethro   -  Feb 26, 2011

I wouldn't have a clue to reproduce the issue you're having, since I don't use IRCAP. Try installing my code in a new remote on its own and see what happens.

 Respond  
maotulua   -  Feb 26, 2011

Hi Jethro_ : you provided me with a script so say Hello to ops only. It works great, thanks, but after I installed IRCAP, the script doesn't work any more, I already looked into IRCAP options, but didn't see anything to solve the issue, any idea on how to overcome that ? Thanks again

 Respond  
Jethro   -  Feb 25, 2011

The example I have shown you will exclude the voiced or regular users. You might have done something wrong in your code that results the unworkability.

 Respond  
Mazter_1   -  Feb 25, 2011

did not work my friend! :( thanks for trying though !!!

 Respond  
Mazter_1   -  Feb 24, 2011

sweet let me try it. you want to see my channel? i added you as a friend. I give you the link in a message!

 Respond  
Jethro   -  Feb 24, 2011

Mazter_1 wrote:> What I will like is that regular mods dont have the access to tell my bot to leave

if ($nick !isreg $chan) || ($nick !isvoice $chan) {

These two conditions will negate regular and voice mode. In other words, they won't be able to tell your bot to trigger upon a code.

 Respond  
Mazter_1   -  Feb 24, 2011

I mean like, My bot is in more than 50 channels. So What I will like is that regular mods dont have the access to tell my bot to leave. I will like to reserve the right to the channel owner... what I dont get is, " ~ " do i need to place something for the " ~ " in its place?

 Respond  
Jethro   -  Feb 24, 2011

This will have to work:

if ($nick(#,$nick,~)) {

Check if the user mode prefix of the owners is indeed a ~, and if it is, you can place it as shown in my example.

 Respond  
Mazter_1   -  Feb 24, 2011

UPDATE!!

It did not work man. It's Probably my irc server I will really ask you for your help if you have another way. If not thanks for the help.

 Respond  
Mazter_1   -  Feb 24, 2011

Jethro_

Thanks Alot man... I will check it out and let you know.

 Respond  
maotulua   -  Feb 23, 2011

Jethro_

Thanks for your script on saying HI to all operators.

I moved the "msg $1 Hello to %h" command down between the 2 "}" because it was saying hello many times as operators are in the room.

 Respond  
Jethro   -  Feb 20, 2011

Mazter_1, for owner status, you can use:

 if ($nick isowner $chan) {

The isowner operator will match the user nick mode "q". This operator may or may not work for standard ircd servers. If that doesn't work for your network, use

if ($nick($chan,$nick,~)) {

where the ~ indicates he or she is an owner.

 Respond  
Mazter_1   -  Feb 20, 2011

What about if my bot has an !exit command (which makes the bot leave the channel...) But I only want the channel owner to be able to use this command.

my if sentence is :

if ($nick isop $chan) {
msg $chan $nick ok I will exit # ... don't forget to follow me...
/part # $chan
}

 Respond  
Jethro   -  Feb 19, 2011

maotulua wrote:> I want to say Hi to ops only upon myself entering a chat room, how would i accomplish this within a script ?

on me:*:join:#:{
  .timerhi 1 3 greetings #
}
alias -l greetings {
  var %h, %g 1
  while $nick($1,%g,a,rv) {
    %h = %h $v1
    msg $1 Hello to %h
    inc %g
  }
}

There will be a 3-second delay when you join a channel before the code gets triggered. This is to wait til the ial is filled.

 Respond  
maotulua   -  Feb 19, 2011

Hello all:

I want to say Hi to ops only upon myself entering a chat room, how would i accomplish this within a script ?

TIA

 Respond  
jefsthampied   -  Feb 17, 2010

on @*:INPUT:#: {
if ($regex($1,/^(d)?(o|v|(h)?op)$/iS)) && ($2 ison #) { $iif(!$nick(#,$2,hov),mode # $replace($1,v,+v,o,+o,hop,+h) $2)
$iif($nick(#,$2,hov),mode # $replace($1,dv,-v,dop,-o,`dhop,-h) $2)
}
}
==============>
Thanks Jethro_ , but i Think it will More usefull if use /services, Even Not Opped In
channel , we can access the command to opped nick.. Example:

on *:input:#: {
if ($1 == .vspeed) {
if ($2) {
mode # +v $2
}
}
if ($1 == .dvspeed) {
if ($2) {
mode # -v $2
}
}
if ($1 == .opspeed) {
if ($2) {
/services op $active %chan $2
}
}
if ($1 == .dpspeed) {
if ($2) {
/services deop $active %chan $2
}
}
}

any suggestion about tht jethro_ ?

 Respond  
Jethro   -  Feb 17, 2010

how to make it work nicely if we changes the : on :text::#: to: on :input::#: for selfcontrol ??

on @*:INPUT:#: {
  if ($regex($1,/^`(d)?(o|v|(h)?op)$/iS)) && ($2 ison #) {
    $iif(!$nick(#,$2,hov),mode # $replace($1,`v,+v,`o,+o,`hop,+h) $2)
    $iif($nick(#,$2,hov),mode # $replace($1,`dv,-v,`dop,-o,`dhop,-h) $2)
  }
}

Same syntax: v,dv, o,dop, hop, anddhop NickHere

Make sure you're opped in channel.

 Respond  
jefsthampied   -  Feb 17, 2010

well its for other command,its seems like the other can be control us..

on :text::#: how to make it work nicely if we changes the : on :text::#: to: on :input::#: for selfcontrol ??

 Respond  
jefsthampied   -  Feb 17, 2010

on :text::#:{
if ($2) {
if ($nick ishop $chan || $nick isop $chan) {
if ($1 == v) mode $chan +v $2 if ($1 ==dv) mde $chan -v $2
if ($nick isop $chan) {
if ($1 == o ) mode $chan +o $2 if ($1 ==dop) mode $chan -o $2
if ($1 == hop) mode $chan +h $2 if ($1 ==dhop) mode $chan -h $2
}
}
else msg $chan You dont have access to this command.
}
else msg $chan Please specify a nick.
}

 Respond  
guest598594   -  Sep 24, 2007
on *:text:*:#:{
  if ($2) {
    if ($nick ishop $chan || $nick isop $chan) {
      if ($1 == `v) mode $chan +v $2
      if ($1 == `dv) mde $chan -v $2
      if ($nick isop $chan) {
        if ($1 == `o ) mode $chan +o $2
        if ($1 == `dop) mode $chan -o $2
        if ($1 == `hop) mode $chan +h $2
        if ($1 == `dhop) mode $chan -h $2
      }
    }
    else msg $chan You dont have access to this command.
  }
  else msg $chan Please specify a nick.
}   

all the on texts are together
shows else msgs
*saves u 10 lines of script :P

 Respond  
eivind90   -  Jun 28, 2007

you should also use:

on :TEXT:`o:#: {
if ($nick isop $chan) || ($me isop $chan) {
/mode $chan +o $2
}
}

 Respond  
iwz   -  Jun 27, 2007

:)

 Respond  
F R E E Z E   -  Jun 24, 2007

Sorry typo

 Respond  
iwz   -  Jun 23, 2007

on :TEXT:`o:#: {
if ($nick isop $chan)
/mode $chan +o $2
}
on :TEXT:`dop:#: {
if ($nick isop $chan)
/mode $chan +o $2 (Should be -o)
}

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.