simple access script

By whimp on Feb 09, 2008

Commands:
!add
!del

Levels:
1-3 - +v voice
4-6 - +h half op
7-10 - +o auto op
11-9998 - +a Super op
9999 - +q full op

Simple

on *:TEXT:*:#:{
  if ($1 == !add) && ($nick isop #) {
    writeini users.ini $2 level $3
  }
  elseif ($1 == !del) && ($nick isop #) {
    remini users.ini $2
  }
}

on *:JOIN:#:{
  if ($readini(users.ini,$nick,level) isnum 1-3) { mode # +v $nick }
  if ($readini(users.ini,$nick,level) isnum 4-6) { mode # +h $nick }
  if ($readini(users.ini,$nick,level) isnum 7-10) { mode # +o $nick }
  if ($readini(users.ini,$nick,level) isnum 11-9998) { mode # +a $nick }
  if ($readini(users.ini,$nick,level) isnum 9999) { mode # +q $nick }
}

Comments

Sign in to comment.
morfina   -  Feb 16, 2010

Is it possible to make it when you add a nick to give a notice to the user who adds the new nick something like this - Testnick has been added with v/hop/op ( the same for the delete function) and if it's possible to make the bot v/hop/op the user after he identifies in the server network and if the user isn't registered to send a notice to the user adding the new - This user isn't registered or something like that. By the way great script !:)

Cheers.

 Respond  
whimp   -  Feb 16, 2008

Updated.

 Respond  
HoNdAx707   -  Feb 10, 2008

on *:JOIN:#:{
  if  ($nick ishop #) || ($nick isop #) {
    if ($readini(users.ini,$nick,level) isnum 1-3) { /mode # +v $nick }
  }

the if ($nick isop $chan) isnt needed
that is supposed to go for !add
when they join they wont be op\'d

 Respond  
Jonesy44   -  Feb 10, 2008

this script will not only be accessible by you. You need to prtotect it from other users ..

 Respond  
HoNdAx707   -  Feb 10, 2008

that would be useless.. and why add if im op..

if someone else uses it

 Respond  
Darkkeeper   -  Feb 10, 2008

:\ i rather like auser alot better

 Respond  
whimp   -  Feb 10, 2008

that would be useless.. and why add if im op..

 Respond  
Jonesy44   -  Feb 10, 2008

My only suggestion, is that you add protection to it;

if ($nick isop $chan) {

etc.

 Respond  
guest598594   -  Feb 10, 2008

you might also wanna add

on @*:JOIN:#:{

( if ($me isop $chan) )

 Respond  
whimp   -  Feb 10, 2008

ah ya, i did this in 2 mins, i was uber bored

 Respond  
HoNdAx707   -  Feb 09, 2008

1 You don\'t need the /\'s.

2 isnt secure coz any1 can do it. and set to certian channels

on *:TEXT:*:#:{
  if ($1 == !add) {
    /writeini users.ini $2 level $3
  }
  elseif ($1 == !del) {
    /remini users.ini $2
  }
}

try


  if ($nick isop $chan) 
  if ($nick ishop $chan) 

Etc =)

 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.