mIRC Homepage
Posted By: Krafo Control the Number Of Oped Users - 06/05/03 08:07 PM
Hello people, I would like to know if i can do something like a remote or alias.. so that there's a limit on the number of oped users on my channel. I mean for example i want to have only 4 users oped on my channel, and if a fifth user try to get op, i will automatically deop him, and /notice him that there is the limit full... can someone help him please? Thankx a lot in advance for your help. smile
Posted By: pheonix Re: Control the Number Of Oped Users - 06/05/03 08:19 PM
The following would mean if there is more than or equal to 10 owners on your channel then it will deop them and also make sure their deowner prot wont take affect(unless its l337)grin
if you would like to change the number from 10 change >= 10 to >= (number here)
code:
on ^*OWNER:#:{
var %owner $nick(#,0,q)
if ($opnick != $me) && (%owner >= 10) {
access # clear owner
mode # -q $opnick
prop # ownerkey $r(0,999) $+ $r(a,z) $+ $r(A,Z) $+ $me
msg # sorry $opnick too many ops
}
}
Posted By: Watchdog Re: Control the Number Of Oped Users - 06/05/03 08:19 PM
Code:
ON !*:OP:#: {
  if ($nick(#,0,o) > 4) {
    mode # -o $opnick
    notice $opnick The hosting limit has been reached. Please wait for someone to deop first.
  }
}
This should do the trick. If the other user has deop protection running there will be the mutha of all mode wars though. :tongue:

Phoenix: He wanted to check on OP level not OWNER and you forgot a colon on line one.
Posted By: pheonix Re: Control the Number Of Oped Users - 06/05/03 08:26 PM
colon confused??
Posted By: Watchdog Re: Control the Number Of Oped Users - 06/05/03 08:27 PM
One of these ---> :
Posted By: pheonix Re: Control the Number Of Oped Users - 06/05/03 08:37 PM
fine just to make it better have both grin
code:
on ^*:OWNER:#:{
var %owner $nick(#,0,q)
if ($me isowner $chan) && ($opnick != $me) && (%owner > 4) {
access # clear owner
mode # -q $opnick
prop # ownerkey $r(0,999) $+ $r(a,z) $+ $r(A,Z) $+ $me
msg # sorry $opnick owner limit was reached
}
else {
HALT
}
}



code:
on ^*:OP:#:{
var %host $nick(#,0,o)
if ($me isowner $chan) && ($opnick != $me) && (%host >= 4) {
access # clear host
mode # -o $opnick
prop # ownerkey $r(0,999) $+ $r(a,z) $r(A,Z) $+ $me
}
elseif ($me isop $chan) && ($opnick != $me) && (%host >= 4) {
access # clear host
access # clear grant
mode # -o $opnick
}
else {
HALT
}
}


Happy now watchdog smirk
Posted By: Krafo Re: Control the Number Of Oped Users - 06/05/03 09:16 PM
Cool guys, thankx a lot both of you. So... can i put those two remotes in my remotes? or i have to put just one of them? Thankx a lot... i will try them, and give you the results tomorrow cool
Posted By: pheonix Re: Control the Number Of Oped Users - 06/05/03 09:19 PM
the second 1 that i posted all goes in 1 remote file
Posted By: pheonix Re: Control the Number Of Oped Users - 06/05/03 09:23 PM
your turn to help me lol
how do ya get the pic next to your name blush?
Posted By: Jesper Re: Control the Number Of Oped Users - 06/05/03 10:05 PM
pheonix click on me scroll to URL to your picture (80x80 max pixels, may be smaller) (.gif, .jpg, .png accepted) type the full url to your picture in the editbox below smile
Posted By: Online Re: Control the Number Of Oped Users - 06/05/03 10:16 PM
By the way, phoenix, please shorten your "location" information. It increases the size of the whole table, and wastes screen space. Thanks.
Posted By: Othello Re: Control the Number Of Oped Users - 06/05/03 10:43 PM
Question? If there are already 4 ops in the channel and your the 5th op will the script deop you when you get oped? grin
Posted By: Online Re: Control the Number Of Oped Users - 06/05/03 10:44 PM
Watchdog's script should do.
Posted By: pheonix Re: Control the Number Of Oped Users - 07/05/03 11:10 AM
my script wont deop/deowner you but watchdogs will smirk
Posted By: Krafo Re: Control the Number Of Oped Users - 07/05/03 07:31 PM
Hey mates, thankx a lot for your help i tried the following remote you gave me:

on ^*:OP:#:{
var %host $nick(#,0,o)
if ($me isowner $chan) && ($opnick != $me) && (%host >= 4) {
access # clear host
mode # -o $opnick
prop # ownerkey $r(0,999) $+ $r(a,z) $r(A,Z) $+ $me
}
elseif ($me isop $chan) && ($opnick != $me) && (%host >= 4) {
access # clear host
access # clear grant
mode # -o $opnick
notice # sorry $opnick owner limit was reached

}
else {
HALT
}
}

I just pasted it into my remotes section. Actually it worked, but there seems to be something wrong... for example... i oped someone because we were only 2 users oped... but i soon automatically deop him... look:

* Krafo sets mode: +o Noflood
* Krafo sets mode: -o Noflood

and also on my status window i get the following error:

ACCESS Unknown command

Can you tell me if there's something i can do please? Thankx a lot in advance for you help smirk

Btw... have you asked my help on how i uploaded my avatar? If yes... simple i just uploaded the small pic on the web... and then just pasted the url were it asked for it http://members.lycos.co.uk/krafo/krafo.JPG hehe... thankx... hope ur able to help me. Thankx all of you mates.

Posted By: pheonix Re: Control the Number Of Oped Users - 07/05/03 07:41 PM
on ^*:OP:#:{
var %host $nick(#,0,o)
if ($me isowner $chan) && ($opnick != $me) && (%host >= 4) {
access # clear host
mode # -o $opnick
prop # ownerkey $r(0,999) $+ $r(a,z) $+ $r(A,Z) $+ $me
}
elseif ($me isop $chan) && ($opnick != $me) && (%host >= 4) {
access # clear host
access # clear grant
mode # -o $opnick
notice # sorry $opnick owner limit was reached

}
else {
HALT
}
}

try this
Posted By: _D3m0n_ Re: Control the Number Of Oped Users - 07/05/03 07:52 PM
ok pheonix STOP posting uve confused this person and not helped them at all ..... dont u understand ur not helping ppl ... ur an ignorant fool please STOP your helping of ppl
Posted By: MonoSex Re: Control the Number Of Oped Users - 07/05/03 07:57 PM
Quote:
ACCESS Unknown command


I think he's not using MSN, so your "props" and "accesses" are useless.
Please, stop pasting code if you don't know what it does.
Posted By: Krafo Re: Control the Number Of Oped Users - 08/05/03 05:41 PM
pheonix....the last code you gave me to try which means the following one:

on ^*:OP:#:{
var %host $nick(#,0,o)
if ($me isowner $chan) && ($opnick != $me) && (%host >= 4) {
access # clear host
mode # -o $opnick
prop # ownerkey $r(0,999) $+ $r(a,z) $+ $r(A,Z) $+ $me
}
elseif ($me isop $chan) && ($opnick != $me) && (%host >= 4) {
access # clear host
access # clear grant
mode # -o $opnick
notice # sorry $opnick owner limit was reached

}
else {
HALT
}
}

still have the problem, that when i op someone... even if we are in only 2 oped users i automatically deop him/her. You have any other ideas mate? Btw i am using mIRC not msn grin i would like if someone else would try to help me too smirk thankx again for trying to help me...
Posted By: Nimue Re: Control the Number Of Oped Users - 08/05/03 05:57 PM
Code:
on @!*:op:#:{
  if $nick(#,0,o) > 4 && $opnick != $me {
    mode # -o $opnick
    notice $opnick Sorry but there are enough ops right now.
  }
}
Posted By: _D3m0n_ Re: Control the Number Of Oped Users - 08/05/03 06:02 PM
did u try watchdogs code?

as a reminder here it is
Code:
ON !*:OP:#: {
  if ($nick(#,0,o) > 4) {
    mode # -o $opnick
    notice $opnick The hosting limit has been reached. Please wait for someone to deop first.
  }
}

basically what his code does it if someone other than u is opped and the op count is greater than 4 it will deop the person who was opped ..... to increase or decrease this number simply change the on line

if ($nick(#,0,o) > 4) {

to ($nick(#,0,0) > YOUR NUMBER HERE) {

try this one and see .. it will do the trick and is a lot cleaner than that mess u have going there
Posted By: _D3m0n_ Re: Control the Number Of Oped Users - 08/05/03 06:04 PM
better yet use nimues code hers is alot better ... youd probably be more pleased with that
Posted By: Krafo Re: Control the Number Of Oped Users - 08/05/03 07:12 PM
I have tried Nimue's code right now... but look what happends while i was trying it:

* X sets mode: +o Gotenks
* Krafo sets mode: -tno Gotenks

When i auto deop... it take off the +n and +t mode... dunno why. Have any ideas... by the way.. this problem was encountered with Watchdog's code too... thankx in advance for your help.
Posted By: Nimue Re: Control the Number Of Oped Users - 08/05/03 07:29 PM
I think why that is happenng is probably because you haven't pasted it correctly.
Make it look exactly the same as in my post, not all one long line.
Posted By: Krafo Re: Control the Number Of Oped Users - 08/05/03 08:12 PM
Yeah actually i pasted it in one single line... now i'm gonna try it in the format you gave it to me... i will give you the result later on. Thankx a lot in advance... you're great smirk
© mIRC Discussion Forums