Public paste
Undefined
By: ewa | Date: Dec 20 2006 11:26 | Format: None | Expires: never | Size: 1.98 KB | Hits: 1401

  1. on *:TEXT:adduser *:?:{
  2.   if ($readini(database/userlist.ini,$chan,$address($nick,2)) == owner) || ($readini(database/global.ini,global,$address($nick,2)) == owner) {
  3.     if ($2 == help) {
  4.       notice $nick adduser allows you to add a user as a owner (aomn) a master(aom) or a operator (ao)
  5.       notice $nick For this command use /msg $me adduser <channel> <nick> <flags>
  6.       close -m $nick
  7.     }
  8.     else {
  9.       if ($2 == $null) {
  10.         Notice $nick adduser : not enough parameters
  11.         notice $nick use /msg $me adduser <chan> <nick> <flags>
  12.         close -m $nick
  13.       }
  14.       elseif ($3 == $null) {
  15.         notice $nick You forgot to type a nickname  
  16.         notice $nick correct usage /msg $me adduser <channel> <nick> <flags>
  17.         close -m $nick
  18.       }
  19.       elseif ($4 == $null) {
  20.         notice $nick You forgot to type the flags
  21.         notice $nick correct usage /msg $me adduser <channel> <nick> <flags>
  22.         close -m $nick
  23.       }
  24.       else {
  25.         if ($chr(35) isin $2) {
  26.           if ($4 == aomn) {
  27.             writeini database/userlist.ini $chan $address($3,2) owner
  28.             Notice $nick Added $3 As an owner. He has acces to all my commands now
  29.             notice $3 You have been added as a owner on $2
  30.             notice $3 Use /msg $me showcommands for my commands
  31.             notice $3 Don't forget if you find any bugs report them to my creator
  32.             close -m $nick
  33.           }
  34.           elseif ($4 == aom) {
  35.             writeini database/userlist.ini $chan $address($3,2) master
  36.             Notice $nick Added $3 As a master. He has acces to my commands now
  37.             Notice $3 You have been added as a master on $2
  38.             notice $3 use /msg $me showcommands for my commands
  39.             notice $3 Don't forget if you find any bugs report them to my creator
  40.             close -m $nick
  41.           }
  42.         }
  43.       }
  44.     }
  45.   }
  46.   else {
  47.     notice $nick You don't have acces to this command
  48.     close -m $nick
  49.   }
  50. }