mIRC Home    About    Download    Register    News    Help

Print Thread
autovoice addon fix example #269265 07/08/21 09:27 PM
Joined: Mar 2021
Posts: 17
D
danielboom Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Mar 2021
Posts: 17
on *:JOIN:#:{
if ($nick == $me) { .echo -a 00,04 No necesito Voice  | halt }
if ($nick isop $chan) { .echo -a 00,03 Operadores de canal no usan Voice  | halt }
if ($istok(#test #ayuda,$chan,32)) { autovoice $nick $chan }
}

alias autovoice {
.echo -a 14Usuario tiene un Voice: $chan 07(+v) 00,01 $1 
if ($exists(C:\i\mirc\login.wav) == $true) .splay -w C:\i\mirc\login.wav
if ($nick isop $chan) { .echo -a 00,03 Operadores de canal no usan Voice  | halt }
elseif mode $2 +v $1 | .say $1 $+(,$1,) -> en que te ayudamos $1
}


when you join to a #help channel if you are an user must have a +v , but if you are a @ doesnt

Re: autovoice addon fix example [Re: danielboom] #269274 12/08/21 05:24 AM
Joined: Jan 2012
Posts: 173
Epic Offline
Vogon poet
Offline
Vogon poet
Joined: Jan 2012
Posts: 173
If I understand your question correctly, then you want everyone who is the operator of the "#help" channel to be excluded from automatically receiving the "Voice (+v)" status.

In this case, you can try to use a separate condition listing all nicknames, separated by a space, that appear on the #help channel:
Code
if ($istok(Epic danielboom Julio Maradona,$nick,32) && $chan == #help)

This will work even if the specified nicknames do not receive the status of the channel operator with the "@" sign, but you still know that these nicknames are in fact the operators of this channel.
There is no need to transfer this condition to an alias, since it already performs the action itself.

Thus, the corrected script code will look like this:
Code
on *:JOIN:#:{
  if ($istok(#help #test #ayuda,$chan,32)) {
    if ($nick == $me) { .echo -a 00,04 No necesito Voice  | halt }
    if ($nick isop $chan) { .echo -a 00,03 Operadores de canal no usan Voice  | halt }
    if ($istok(Epic danielboom Julio Maradona,$nick,32) && $chan == #help) { .echo -a 00,03 Operadores de canal no usan Voice  | halt }
    autovoice $nick $chan
  }
}
alias autovoice {
  .echo -a 14Usuario tiene un Voice: $2 07(+v) 00,01 $1 
  if ($exists(C:\i\mirc\login.wav) == $true) .splay -w C:\i\mirc\login.wav
  .mode $2 +v $1 | msg $2 $+(,$1,) -> en que te ayudamos
}


If you still have unresolved questions on this topic or have new, then please describe your wishes in more detail, using more leading words and explanations (maybe even with screenshots), because some this forum participants may experience difficulties in translating the text, especially if the wording of the question is extremely unfortunate and incomprehensible.
And please don't forget to use the code tags "[code]" (when creating a post on the top panel there is a button with the "#" sign) where your code should be placed between these tags to distinguish it from normal text.

I am sure that many would be ready to help if they could better understand the essence of the question, which is more clearly articulated and structured using tags.


Last edited by Epic; 12/08/21 07:44 AM. Reason: Additional fix in the code

πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: autovoice addon fix example [Re: Epic] #269275 12/08/21 05:40 AM
Joined: Mar 2021
Posts: 17
D
danielboom Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Mar 2021
Posts: 17
thnx for the help my friend