mIRC Homepage
Posted By: BritishGent Strange Occurance - 11/01/07 12:32 AM
Hi there all.

I have a bot in my channel and recently i have noticed that it is devoiceing people when they deop. it never used to do this but is doing it all the time now. for the users to deop they type the command !deop below is the code for that command.

Code:
on 100:text:deop*:?: {
  if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me deop <#channel> [nick] | halt }
  if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
  if ($me !isop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt } 
  if (($2 !== $null) && ($3 == $null) && ($nick !isop $2)) { .msg $nick You're not oped in $2 $+ . | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null)) { mode $2 -o $nick | closemsg $nick }
  if ($level($mask($address($3,2),2)) == 500) { .msg $nick I will not deop my owner. | halt }
  if ($3 == $me) { .msg $nick I don't think I'll like this. | closemsg $nick | halt }
  if (($2 !== $null) && ($3 !== $null)) { mode $2 -o $3 | closemsg $nick }


My question is this, as this is an occurance all the time now, can in this command add a line to give the said user voice upon de-opping. ?

Thanks in advance for any assistance smile
Posted By: Riamus2 Re: Strange Occurance - 11/01/07 01:02 AM
Are they actually being devoiced as well (-ov nick)? Or are they just not voiced to begin with, so when they are deopped, they are regular users?

If it is the second one, then why not just voice those specific people (or all people) when they join the channel?

If you really want to just leave things as they are, but instead do a +v when they deop, you can just change:

mode $1 -o $nick

to

mode $1 -o+v $nick $nick

everywhere it's found in that script.
Posted By: BritishGent Re: Strange Occurance - 11/01/07 01:24 AM
all users are voiced upon entering the channel, even ops, yet when the ops deop it removes there voice.

I will try your fix thank you.

Much appreciated for your assistance smile
Posted By: Riamus2 Re: Strange Occurance - 11/01/07 05:40 AM
If it is actually removing it as -ov (or -o then -v), then I would recommend looking through your scripts for any -v commands and figuring out what's causing it. It's not a good thing to let a known bug just sit there.
Posted By: billythekid Re: Strange Occurance - 11/01/07 11:23 AM
also some servers (in my opinion wrongly/misguidedly) automatically remove +v on opping.

try a clean mirc connecting to your server and opping/deopping with voice to see what happens. This will at least rule out/confirm the server/network.

btk
© mIRC Discussion Forums