Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: HOP and above not recognised as not reg or not voice  (Read 11557 times)

0 Members and 1 Guest are viewing this topic.

R Bishop

  • Anope User
  • Offline Offline
  • Posts: 6
HOP and above not recognised as not reg or not voice
« on: January 02, 2012, 09:56:39 AM »

Within the mirc script, a section reads :-
If ($nick isreg $2) || ($nick isvoice $2) { halt }
Translated means :- If User is an op then continue else stop.

So Therefore, a user at a level of halfop or ablove should be able to namipulate beyond that statement.
Users that have been oped for quite sometime is not seen as a non reg or non voice
However:- I started a new script and oped the new user, the new user was then seen as a non reg or non voice.
and was able to to continue past the above statement.

Does this make sence
Logged

VisioN

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 82
    • myIRC Project Hosting IRC Network
Re: HOP and above not recognised as not reg or not voice
« Reply #1 on: January 02, 2012, 10:47:46 AM »

what you are talking about is mirc scripting while this forum provides Anope support. I would suggest that you post it in a mirc scripting forum. I would suggest  http://forums.mirc.com/ubbthreads.php/ubb/postlist/Board/5/page/1

Hope I helped,
Jason
Logged
______________________________
VisioN
Find me: irc.myirc.net | irc.anope.org
Contact me: vision@myirc.net

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: HOP and above not recognised as not reg or not voice
« Reply #2 on: January 02, 2012, 10:53:59 AM »

Moved as this is 100% not anope related..

btw, doesn't make any sense either  ::)
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

R Bishop

  • Anope User
  • Offline Offline
  • Posts: 6
Re: HOP and above not recognised as not reg or not voice
« Reply #3 on: January 02, 2012, 06:31:25 PM »

Actually is is a services problem

I have since solved the problem

When a user enters a channel, chanserv sets mode +ao <user>
The user is given an "&"
the user level is set to 10
manipulating the script works (as described above)
however
a bot then sets mode +v <same user>
the user still has the "&"
and access level is still set at 10
manipulating the script no longer works

obviously to solve the problem the bot needs to NOT set +v after chanserv has set +ao
but it still remains a services fault as in
is the user a voice or is the user a sop
what's it to be boy yes or no
let me sleep on it.
« Last Edit: January 02, 2012, 06:34:19 PM by R Bishop »
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: HOP and above not recognised as not reg or not voice
« Reply #4 on: January 02, 2012, 07:21:58 PM »

Quote
Within the mirc script, a section reads :-
If ($nick isreg $2) || ($nick isvoice $2) { halt }
Translated means :- If User is an op then continue else stop.

No that's not what is says. It says if a user is a regular or is a voice to stop. It has nothing to do with ops. For your translation to be true you need if ($nick isop $2) { do stuff }

Next, This is either a script or client issue because it doesn't matter where or who ops/halfops/voices users, mIRC script still interprets modes, not who changed them. There is absolutely no way Anope can change the way mIRC's script interpreter works.

Next, I can't duplicate your issue at all. Perhaps you have an older version of mIRC? My version is the newest 7.22 and halfops are not seen as regulars as you suggest.

Without any other scripts loaded and in channel as a halfop type: //echo -at $iif($me isreg $chan,True,False) If you are a halfop, it will return False. If it returns True then your script is messed up somewhere or you have an old copy of mIRC. Because again, Anope cannot affect the way mIRC interprets channel/user modes.

Next, mIRC has no clue what a "sop" is, it's an access level in services, not a channel/user mode. Again, mIRC interprets modes, nothing more. mIRC sees mode +aov and in that case a user isop and isvoice. It seems that you think mIRC should see the highest access level and ignore the rest. However, neither mIRC nor IRC work that way. It's all about modes. Mode grant privileges, it's the human brain that assigns levels for example, anyone will agree that an op is higher level than a voice or a halfop but to mIRC +o is no higher or lower then +a or +h. If you want levels assigned then you as a scripter need to script it that way.

Bob is +oahv

$isop = true
$isvoice = true
$ishop = true
$isreg = false

+a is higher than +h is something mIRC doesn't understand. Services and any IRCd will see it the same way, it's a mode, not an access level.

Hope that helps.
« Last Edit: January 02, 2012, 07:44:17 PM by katsklaw »
Logged

R Bishop

  • Anope User
  • Offline Offline
  • Posts: 6
Re: HOP and above not recognised as not reg or not voice
« Reply #5 on: January 02, 2012, 07:42:31 PM »

Ok, this is not an arguement, i'm trying to point out what is happening

user is on the sop list in a channel
user joins channel
chanserv sets mode +ao <user>
that is level 10
scripts says :-
if (($nick isreg $chan) || ($nick isvoice $chan) { halt }
normally this isgnored as the user is a sop (level 10)
and so the rest of the section in the script is acted apon

get another op to set mode +v <user> (not chanserv)

the user remains a sop and remains at level 10

now the script thinks that the user is either a reg level 0 or a voice level 3
yet all the checks with chanserv says the user is a sop level 10
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: HOP and above not recognised as not reg or not voice
« Reply #6 on: January 02, 2012, 08:03:13 PM »

That is because there is a difference between services access and modes, sir. Anope has no clue what your script is doing, just like mIRC has no clue what a "SOP" is. You are trying to combine 2 completely different program's definitions into one. There is a difference between having modes +ao and being on the SOP list. Again, one is modes the other is an access level.

It doesn't matter who sets modes. They are either set or they are not. SpongeBob setting JoeBob +o is the exact same as Chanserv setting JoeBob +o. The only way there would be a difference is if your script creates a difference or you assume there is a difference.

Again, there is a difference between actually having +ao and being on Chanserv's SOP list. You can be on the SOP and not even be on IRC, but you can't have +ao. You can be -ao and still be on the SOP list, you can be +v only and be on the SOP list. You can be at your mothers house and be on the SOP list. You can be at the mall no where near a PC and be on the SOP list, but you can not have +ao unless you are on IRC and in the respective channel.

Again, if (($nick isreg $chan) || ($nick isvoice $chan) { halt } only affects regulars and +v users, it has no affect on +o, +a, +q or +h users or any combination thereof, unless said user is also +v.

Hope that helps
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: HOP and above not recognised as not reg or not voice
« Reply #7 on: January 02, 2012, 08:34:02 PM »

Part #2

Let me try explaining it this way.

User joins channel and chanserv sets +ao (because the user is on the SOP list). The SOP list is no longer in any part of the following.
At this point your script works because User is not +v .. only +ao
Any user then sets +v to User .. At this point this user is now $isvoice so your script will halt and not act the same.

If you want the script to still work and not halt, then you need:

Code: [Select]
if ($nick !isop $2) {
   if ($nick isreg $2) || ($nick isvoice $2) {
      halt
   }
}

We add the is NOT op (!isop) check so your script will ignore ops that are also voiced and work as intended. we can also exclude halfops too by using ($nick !isop $2) || ($nick !ishop $2) instead.

Does that help?
« Last Edit: January 02, 2012, 08:36:08 PM by katsklaw »
Logged

R Bishop

  • Anope User
  • Offline Offline
  • Posts: 6
Re: HOP and above not recognised as not reg or not voice
« Reply #8 on: January 02, 2012, 09:10:26 PM »

can anyone tell me why this :-

user is on services sop list
user enters channel
chanserv sets mode +ao <user>
level is 10
then in mirc
enter //echo -at $iif($me isvoice $chan,True,False)
result is false
if ($nick isvoice $chan) || ($nick isreg $chan) { halt } <<<<< this is ignored

THEN
another user sets mode +v <user>
level is still 10
Surely the level should be reduced to 3
then in mirc
enter //echo -at $iif($me isvoice $chan,True,False)
result is false
if ($nick isvoice $chan) || ($nick isreg $chan) { halt } <<<<< this NOT is ignored
« Last Edit: January 02, 2012, 09:15:24 PM by R Bishop »
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: HOP and above not recognised as not reg or not voice
« Reply #9 on: January 02, 2012, 10:25:11 PM »

I will say again: this has nothing at all to do with Anope or the users level in chanserv, if the script isn't doing what it is supposed to that is most likely due to a lack of knowledge and understanding about IRC on the part of whoever wrote the script.

Quote
another user sets mode +v <user>
level is still 10
Surely the level should be reduced to 3
Anope levels are never adjusted just because a user gets another mode.. the level is just a means for anope to give users access to commands (eg in default setup CS OP is level 5 and CS PROTECT is level 10).. assuming a backlink between modes a user gets in a channel simply demonstrates a significant lack of understanding of how even the most basic chanserv functions work.

Quote
enter //echo -at $iif($me isvoice $chan,True,False)
result is false
I know nothing at all about mirc scripting by I am 100% certain that you are checking your own status here and not the status of $nick.

whereas
Quote
if ($nick isvoice $chan) || ($nick isreg $chan) { halt } <<<<< this NOT is ignored
here you check the status of $nick..
If you would just look at the code it should be clear that checking whether $nick as voice or whether $me has voice need not return the same because it checks 2 entirely different users..!!  :-\

And one final time: the CS level is NOT directly linked with the modes a user has on a channel.. sure if you have level 10, (with default levels) you can set yourself +ao, but that is because the user gets access to the CS PROTECT command. the same level 10 user could just as easily remove his 'ao' modes and use CS VOICE to set +v on him because that command is accessible to anyone with level 4 and above.. he could even disable AUTOOP and not get any modes at all unless he specifically makes chanserv set them! ::)

Bottom line: learn about IRC and Anope & double check the code before blaming the results of sloppy coding on a piece of software that has been working fine for everyone else for years..

(The above also applies to mIRC scripting: it has been working fine for many people for years, so there is a 99.99% chance that any issues are due to a poorly written script.)

And since this is not at all related to anope I would suggest, if you need help with mIRC scripting, you ask the people who actually know something about mIRC. The mIRC forums can be found @ http://forums.mirc.com
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: HOP and above not recognised as not reg or not voice
« Reply #10 on: January 02, 2012, 10:43:25 PM »

basically what's happening is the user comes in, gets +ao and the script acts as expected. The user then gets voiced, +v, and the script stops acting as expected. However, the expectation does not match the scripts instructions. The script is told to halt for +v users. The script does not take into account other modes like +q, a, o or h.

user1 is +o = script works as expected
user2 is +ao = script works as expected
user3 is +v = script works as expected
user4 is +aov = script works as it's written (which is NOT what is expected)

What is expected is that this script to NOT halt for ops|halfops even if they are voiced. I've explained that in several ways without success.

This script is written to halt on ALL voiced users, there have been no exemptions made of other modes, namely +ao. I've posted a script change to fix the behavior to work as expected.

This snippet excludes ops and halfops:
Code: [Select]
if ($nick !isop $2) || ($nick !ishop $2) {
     if ($nick isvoice $2) || ($nick isreg $2) {
          halt
     }
}

Writing in ANY language requires the coder to be exactly literal and the program/script does exactly what it's told to do, even if it's not what is desired. R Bishop, I've been scripting in mIRC script for 15 years, I know both what you are trying to do and how to fix it. It's your choice as to whether you accept it or not. This is my last post on this thread, when you are ready and willing to shut up and listen, PM me.
« Last Edit: January 02, 2012, 10:44:57 PM by katsklaw »
Logged

Thomas Edwards

  • Anope User
  • Offline Offline
  • Posts: 23
    • Ilkotech Technology and Entertainment
Re: HOP and above not recognised as not reg or not voice
« Reply #11 on: January 02, 2012, 10:51:34 PM »

The bottom line is.

If you need help go to a mIRC script help channel or forum.
Anope is an IRC Services software.

It has nothing to do with scripts on clients.

Please kidnly ask elsewhere :)
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: HOP and above not recognised as not reg or not voice
« Reply #12 on: January 02, 2012, 10:55:16 PM »

The bottom line is.

If you need help go to a mIRC script help channel or forum.
Anope is an IRC Services software.

It has nothing to do with scripts on clients.

Please kidnly ask elsewhere :)

Actually this is in the "General Chat" forum (now) so talking about stuff other than Anope is acceptable.
Logged
Pages: [1]   Go Up