Auto +V/O

By |Chris| on Dec 04, 2007

This is my very first snippet i have made.

Paste in new remotes

It's very simple.
I think it's clean.
Please leave comments with advice and what not.

on *:JOIN:#:{
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }  
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }  
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }  
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }  
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }  
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }  
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }
  if ($nick == (Nick): {//mode # +ov $nick }  
  if ($nick == (Nick): {//mode # +ov $nick }
}

Comments

Sign in to comment.
|Chris|   -  Dec 13, 2007

Lol.
Yeah this isn\'t mass bud.
And it was my first.
=]

 Respond  
guest598594   -  Dec 10, 2007

korvin, that would be a mass voice + op which isnt really this :/

mode # +ov $nick

sigh

Quotes From MountainDew:

but when u set multiple modes, u need to put that many nicks

ex: +vo would need $nick $nick or $str($nick $chr(32),2) rebellious made a mistake, forgot the $chr(32) :)

ex: if u do +vaoqb, it would be /mode $chan +vaoqb $str($nick $+ $chr(32),5)

[quote]

Why not just:

on @*:join:#:{
if ($istok(%opvoice.nicks,$nick,32)) mode # +vo $str($nick,2)
}

;)

its $str($nick $+ $chr(32),2)
[/quote]
lol

 Respond  
Korvin   -  Dec 09, 2007

on *:JOIN:#:{
var %i = 1
var %nick = %nick(#,%i)
while (%nick ison #) {
mode # +ov $nick
inc %i
var %nick = %nick(#,%i)
}
}

 Respond  
|Chris|   -  Dec 09, 2007

Lol tis okay

 Respond  
AnthraX01   -  Dec 08, 2007

sighs I forgot to close that damned

 Respond  
AnthraX01   -  Dec 08, 2007

Why not not use varibles that one use nicknames? How about we use.


on @*:join:#: {
if ($ulevel = 100) { mode # +o $nick }
if ($ulevel = 50) { mode # +v $nick }
}

menu nicklist {
auto op
.add: {
if ($ial(#) { .who }
auser $address($nick,3) 100
if ($nick !isop #) { mode # +o $nick }
}
.remove {
if ($ial(#) { .who }
ruser $address($nick,3)
if ($nick isop #) { mode # -o $nick }
}
auto voice
.add: {
if ($ial(#) { .who }
auser $address($nick,3) 50
if ($nick !isvoice #) { mode # +v $nick }
}
.remove {
if ($ial(#) { .who }
ruser $address($nick,3)
if ($nick isvoice #) { mode # -v $nick }
}
}
 Respond  
guest598594   -  Dec 06, 2007

Why not just:

Code:
on @*:join:#:{
if ($istok(%opvoice.nicks,$nick,32)) mode # +vo $str($nick,2)
}

;)

its $str($nick $+ $chr(32),2)

 Respond  
Bull   -  Dec 06, 2007

Why not just:

on @*:join:#:{
  if ($istok(%opvoice.nicks,$nick,32)) mode # +vo $str($nick,2)
}
 Respond  
|Chris|   -  Dec 05, 2007

Oh and this code does work. I use it. Pretty soon I\'ll be posting more little things i have made.

 Respond  
|Chris|   -  Dec 05, 2007

Harsh is fine. I don\'t take offense.
I am trying to learn and there are more efficent ways of doing this.
So any critisism is appriciated. Harsh or otherwise. The effort to help is there and it is greatly appriciated.
=]

 Respond  
Rebellious   -  Dec 04, 2007

mountaindew, Thanks. Didn\'t realize a made that error lol.

|Chris|, I sounded a bit harsh in my first comment. Please don\'t take it the wrong way. If this is your first script, you didn\'t do too bad. Just try and use solutions that are a bit easier and cleaner in the future.

 Respond  
guest598594   -  Dec 04, 2007

i didnt realize this was ur first, good job on it :P

but when u set multiple modes, u need to put that many nicks

ex: +vo would need $nick $nick or $str($nick $chr(32),2) rebellious made a mistake, forgot the $chr(32) :)

ex: if u do +vaoqb, it would be /mode $chan +vaoqb $str($nick $+ $chr(32),5)

($str repeats something N times, //help $str)

good luck on future scripts :)

 Respond  
Rebellious   -  Dec 04, 2007

mIRC supports auto voice and auto op already. Besides, this code is very hard to setup and could be executed much differently. You also don\'t check if you are an op in the channel. I\'m not even sure it would work looking at the code.
Here is a resolution:

1) Use a global variable (%opvoice.nicks for example)

on @*:join:#:{ 
  if ($istok(%opvoice.nicks,$nick,32)) mode # +vo $str($nick,2)
}

Then it is easier to add nick by using //set %opvoice.nicks $addtok(%opvoice.nicks,NICK,32)

Second solution:
/avoice nick
/aop nick

OR:
(Another example, doesn\'t exactly have to be done this way)
/auser opvoice nick
on opvoice:join:#: if ($me isop #) mode # +vo $str($nick,2)

 Respond  
guest598594   -  Dec 04, 2007

u can just do

if ($istok(nick1 nick2 nick3,$nick,32)) mode $chan +vo $nick $nick
 Respond  
|Chris|   -  Dec 04, 2007

Thanks bps19882006

 Respond  
Lindrian   -  Dec 04, 2007

/help $istok
/help /auser

 Respond  
bps19882006   -  Dec 04, 2007

hmm well yes it is clean in the sense of how it would work (nick) for example if u was to stick a name on there it would in fact + o and v them. for a first script i commend u. but there is ALOT more to learn as u go father into scripting. i wont critisize to much at the moment considering it is ur first. great work ;]

 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.