Add users

By slub77 on Dec 19, 2009

First off let me say this snipped oringally came from nappa i just made a load of changes.

Remember to set your self as leader aka level 8, you can do this by going to the menu part and adding them.

saddw = level 3
saddo = level 4
saddg = level 5
saddgs = level 6
saddc = level 7
saddl = level 8
sforget = Remove a user from your user list

The menu uses the same concept.

For more help on users and what they can do in mirc type /help userlist

Edited now in the menu has a remove command and the remove and add command only work if user is userlist/user is not on user list

_________________________________________________________
menu * {
  .Users
  ..$style(2)$1 is  a $iif($level($address($1,3)) = 8,Leader) $iif($level($address($1,3)) = 1,not a user) $iif($level($address($1,3)) = 2,soldier) $iif($level($address($1,3)) = 3,Warrent officer) $iif($level($address($1,3)) = 4,Officer) $iif($level($address($1,3)) = 5,General) $iif($level($address($1,3)) = 6,General sup) $iif($level($address($1,3)) = 7,Commander) : noop 

  ..$iif($ulist($address($1,3)),$style(2)) Add
  ...soldier : { 
    .guser -a 2 $iif($1,$1,$$?="Enter admin nick") 3 
    .echo -a $iif($1,$1,$!) has been added with soldier 
  } 

  ...warrent officer : { 
    .guser -a 3 $iif($1,$1,$$?="Enter admin nick") 3 
    .echo -a $iif($1,$1,$!) has been added with warrent officer
  } 

  ...officer : { 
    .guser -a 4 $iif($1,$1,$$?="Enter admin nick") 3 
    .echo -a $iif($1,$1,$!) has been added with officer
  } 

  ...general : { 
    .guser -a 5 $iif($1,$1,$$?="Enter admin nick") 3 
    .echo -a $iif($1,$1,$!) has been added with general
  } 
  ...General sup : { 
    .guser -a 6 $iif($1,$1,$$?="Enter admin nick") 3 
    .echo -a $iif($1,$1,$!) has been added with General sup 
  } 
  ...Coomander : { 
    .guser -a 7 $iif($1,$1,$$?="Enter admin nick") 3 
    .echo -a $iif($1,$1,$!) has been added with Coomander
  } 

  ...leader : { 
    .guser -a 8 $iif($1,$1,$$?="Enter admin nick") 3 
    .echo -a $iif($1,$1,$!) has been added leader 
  } 
  .$iif(!$ulist($address($1,3)),$style(2)) Remove: {
    ruser $address($1,3)
    echo Removed $1 From the userlist 
  }

}

on 7:TEXT:sremove*&:#:{
  if $level($address($2,3)) = 8 { notice $nick you can not remove this person }
  else {
    if !$ulist($address($2,3)) { notice $nick $2 is not in the user list }
    else {
      ruser $address($2,3)
      notice $nick removed $2
    }
  }
}

on *:TEXT:Sadds*:#:{ 
  ruser $address($2,3)
  guser -a 2 $iif($2,$2,$address($2,3)) 3
  notice $nick $2 has been added with soldier 
} 

on 5:TEXT:Saddw*:#:{
  ruser $address($2,3)

  guser -a 3 $iif($2,$2,$address($2,3)) 3
  notice $nick $2 has been added with warrent officer
} 

on 5:TEXT:Saddo*:#:{ 
  ruser $address($2,3)

  guser -a 4 $iif($2,$2,$address($2,3)) 3
  notice $nick $2 has been added with officer
} 

on 6:TEXT:Saddg*:#:{ 
  ruser $address($2,3)

  guser -a 5 $iif($2,$2,$address($2,3)) 3
  notice $nick $2 has been added with general
} 
on 7:TEXT:Saddgs*:#:{ 
  ruser $address($2,3)

  guser -a 6 $iif($2,$2,$address($2,3)) 3
  notice $nick $2 has been added with General sup 
} 
on 8:TEXT:Saddc*:#:{ 
  ruser $address($2,3)

  guser -a 7 $iif($2,$2,$address($2,3)) 3
  notice $nick $2 has been added with Coomander
} 

on 8:TEXT:Saddl*:#:{
  ruser $address($2,3)

  guser -a 8 $iif($2,$2,$address($2,3)) 3
  notice $nick $2 has been added leader 
} 

Comments

Sign in to comment.
slub77   -  Jun 25, 2010

true :/

 Respond  
Jethro   -  Jun 23, 2010

slub77, have you considered reducing all the text events to one? You can use $ulevel = levelnum in if and then elseif. You have many repetitions, too.

 Respond  
slub77   -  Jun 23, 2010

Remotes

 Respond  
Ok   -  Jun 22, 2010

Where do i add it?

 Respond  
slub77   -  Dec 22, 2009

I was actually meaning to do that but t the time of making this i was working on something else

 Respond  
Jethro   -  Dec 21, 2009

Instead of using one level per text event, you only need one with if then else statement as such:> on :TEXT::#: {
if ($1 == saddo) && ($ulevel == 5) {
guser -a 4 $iif($$2 ison #,$2) 3
notice $nick $2 has been added with officer
}
if ($1 == saddg) && ($ulevel == 6) {
guser -a 5 $iif($$2 ison #,$2) 3
notice $nick $2 has been added with general
}
;so and so forth
}The $$ means a paremeter has to be specified or the script won't execute. Without an extra $, your script will be getting insufficient parameter error if the $2 is not provided.

 Respond  
slub77   -  Dec 20, 2009

Edited now in the menu has a remove command and the remove and add command only work if user is userlist/user is not on user list

 Respond  
Master-Of-Death   -  Dec 20, 2009

meh 3/10

 Respond  
slub77   -  Dec 20, 2009

really just to add user, but also it a second snppet to my other one.
http://www.hawkee.com/snippet/7041/

 Respond  
Master-Of-Death   -  Dec 20, 2009

The point of this is? and you spelt commander wrong.

 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.