auto-mode (op/voice)

By xplo on Feb 22, 2009

This script is for adding auto voice or auto op to specific people in specific channels.

read the on load notices.

This is Version 1.2+bugfix

#########################
#    Userlist System    #
# Version: 1.2+bugfix   #
# By: Sebastien         #
# Mail: xplorer@live.ca #
# Net: irc.undernet.org #
# Chan: #mircscripting  #
#########################
on @*:JOIN:#:{ 
  if ($readini(ulist\op.ini,$mknickfn($nick),$chan) && $readini(ulist\voice.ini,$mknickfn($nick),$chan) == $address($nick,2)) { 
    aline -p @Userlist $+([,$fulldate,]) $+([14,$chan,]) Performing +vo on $+(7,$nick,) 
    mode $chan +vo $nick $nick 
    return 
  }
  if ($readini(ulist\voice.ini,$mknickfn($nick),$chan) == $address($nick,2)) { 
    aline -p @Userlist $+([,$fulldate,]) $+([14,$chan,]) Performing +v on $+(7,$nick,) 
    mode $chan +v $nick 
  }
  if ($readini(ulist\op.ini,$mknickfn($nick),$chan) == $address($nick,2)) { 
    aline -p @Userlist $+([,$fulldate,]) $+([14,$chan,]) Performing +o on $+(7,$nick,) 
    mode $chan +o $nick
  } 
}
alias open.voice { run ulist\voice.ini }
alias open.op { run ulist\op.ini }
alias add.voice { 
  writeini ulist\voice.ini $mknickfn($1) $chan $address($1,2) 
  aline -p @Userlist $+([,$fulldate,]) $+([14,$chan,]) Added $+(7,$1,) to Voice list
  mode $chan +v $1 
}
alias add.op { 
  writeini ulist\op.ini $mknickfn($1) $chan $address($1,2) 
  aline -p @Userlist $+([,$fulldate,]) $+([14,$chan,]) Added $+(7,$1,) to Op list 
  mode $chan +o $1 
}
alias del.voice { 
  remini ulist\voice.ini $mknickfn($1) $chan $address($1,2) 
  aline -p @Userlist $+([,$fulldate,]) $+([14,$chan,]) Removed $+(7,$1,) from Voice list 
  mode $chan -v $1 
}
alias del.op { 
  remini ulist\op.ini $mknickfn($1) $chan $address($1,2) 
  aline -p @Userlist $+([,$fulldate,]) $+([14,$chan,]) Removed $+(7,$1,) from Op list 
  mode $chan -o $1 
} 
on *:LOAD:{
  mkdir ulist
  echo $color(notice) -at Loading Auto-mode system
  echo $color(notice) -at For help & Command list type: /help.auto
}
on *:START:{ if (!$window(@Userlist)) { window @Userlist | aline -p @Userlist Userlist Events! (Version: 1.2+bugfix) } }
alias help.auto {  
  echo $color(notice) -at Command list
  echo $color(notice) -at /add.voice <nick>
  echo $color(notice) -at /del.voice <nick>
  echo $color(notice) -at /add.op <nick>
  echo $color(notice) -at /del.op <nick>
  echo $color(notice) -at You Can view all the mode listing with the followings commands, if there is no file, nothing will happen.
  echo $color(notice) -at /open.op
  echo $color(notice) -at /open.voice
  echo $color(notice) -at But i do not suggest you to play with the files, or it could be broken. :/
}

on me:*:join:#:{ who # }

raw 352:*:{ halt }
raw 315:*:{ halt }

Comments

Sign in to comment.
ericfx   -  Mar 22, 2010

Very helpful script. Thanks Xplorer!

 Respond  
Klasic Kumputerz   -  Feb 28, 2010

This is nice, I would have liked to have seen this in a menu format than straight script.

 Respond  
blitzz   -  May 28, 2009

look nice Xpl0reR

 Respond  
miniCruzer   -  May 27, 2009

This script is really nice, I like it. It's useful when running +m channels on my server, because for some reason, +hovs and above can't talk unless voiced =\

I'd like to see this in hashfile system, that'd be cool ;) Too bad about the channel specification.

 Respond  
xplo   -  Mar 02, 2009

i used the ini file as storage cauz i can't make the hash table channel specific.

 Respond  
Cheiron   -  Feb 25, 2009

bit complex for an auto moder heh isnt it!
you could always go for broke i guess and upgrade from the readini to %var's or if you really feel brave... go for hash file system.
only other option there is add halfop facility and/or access facility
looks nice though

 Respond  
xplo   -  Feb 24, 2009

ty ;)

 Respond  
Kirby   -  Feb 22, 2009

I'd rather die.

I'm just kidding.
Looks okay.

 Respond  
xplo   -  Feb 22, 2009

rate / comment / update / Say Something or die!

 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.