Public paste
Undefined
By: breulz | Date: Dec 20 2006 10:59 | Format: None | Expires: never | Size: 2.04 KB | Hits: 1297

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