SHARE
TWEET

Untitled

a guest May 21st, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on *:text:*:*: {
  2.   if ($target !ischan) {  
  3.     if ($1 == %Invite.Sign $+ Set) && ($2 == %Invite.Botpass) {
  4.       if ($3 == BotPass) {
  5.         if (!$4) { msg $nick Error: The syntax is %Invite.Sign $+ Set %Invite.Botpass Botpass <12NEW BOT PASSWORD1> | Halt }
  6.         elseif ($4) { msg $nick Botpass changed to:12 $4 | Set %Invite.Botpass $4 | Halt }
  7.       }
  8.       if ($3 == admin) {
  9.         if (!$5) { msg $nick Error: The syntax is: %Invite.Sign $+ Set %Invite.Botpass admin <12USER1> <12PASSWORD1> $+ ,Ex: %Invite.Sign $+ Set %Invite.Botpass admin Montana 123 }
  10.         elseif ($readini(Admins.ini,$4,User)) { msg $nick Error: The username12 $4 1is already used! please choose an author username or type %Invite.Sign $+ Set %Invite.Botpass unadmin $4 $+ . }
  11.         elseif (!$readini(Admins.ini,$4,User)) {
  12.           msg $nick Admin Added. Username:  $4 Password: $5 Login command: /msg $me %Invite.Sign $+ Login $4 $5
  13.           .writeini -n Admins.ini $4 User $4
  14.           .writeini -n Admins.ini $4 Pass $5
  15.           .writeini -n Admins.ini $4 Status OFF | Halt
  16.       } }
  17.       if ($3 == unadmin) {
  18.         if (!$4) { msg $nick Error: The syntax is: %Invite.Sign $+ Set %Invite.Botpass unadmin <12USER1> $+ . }
  19.         elseif (!$readini(Admins.ini,$4,User)) { msg $Nick Error: The username12 $4 1wasnt found in the Admins list. }
  20.         elseif ($readini(Admins.ini,$4,User)) {
  21.           msg $nick $4 removed from the admins list.
  22.           .remini -n Admins.ini $4
  23.         }
  24.       }
  25.     }
  26.     if ($1 == %Invite.Sign $+ login) && ($3) && ($readini(Admins.ini,$2,pass) == $3) && (!$Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  27.       whois $nick
  28.       msg $nick You are connected to the admin account.
  29.       .writeini -n Admins.ini $2 Logged *!*@ $+ $gettok($address,2,64)
  30.       .writeini -n Admins.ini $2 Status ON
  31.     }
  32.     if ($1- == %Invite.Sign $+ logout) && ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  33.       var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  34.       msg $nick You are logged out from the admin account.
  35.       .remini -n Admins.ini %user Logged
  36.       .writeini -n Admins.ini %user Status OFF
  37.     }
  38.     if ($1- == %Invite.Sign $+ logoff) && ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  39.       var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  40.       msg $nick You are logged off from the admin account.
  41.       .remini -n Admins.ini %user Logged
  42.       .writeini -n Admins.ini %user Status OFF
  43.     }
  44.     if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  45.       var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  46.       if ( ($1 == %Invite.Sign $+ Invite) || ($1 == %Invite.Sign $+ AddInvite) || ($1 == %Invite.Sign $+ Add-Invite) ) && ($2) {
  47.         msg q unbanall %Invite.Channel        
  48.         msg $nick $2 has invited to %Invite.Channel .
  49.         invite $2 %Invite.channel
  50.         msg $2  You are invited to #cZero.mix
  51.         msg q chanlev %Invite.Channel $2 +ao
  52.       }
  53.       if ( ($1 == %Invite.Sign $+ remove) || ($1 == %Invite.Sign $+ r) || ($1 == %Invite.Sign $+ Rem-Invite) || ($1 == %Invite.Sign $+ RemInvite) ) && ($2) {
  54.         msg $nick $2 has been removed from %Invite.Channel .
  55.         msg q chanlev %Invite.Channel $2 -aokv
  56.         if ($2 ison %Invite.Channel) { ban -k %Invite.channel $2 Removed. }
  57.       }
  58.     }
  59.   }
  60.   if ($target ischan) && ($target == %Invite.channel) {
  61.     if () && (!%Invite.flood) { msg # 0,1Admins (3 $+ $admins(ON).num $+ 0/ $+ $admins(ALL).num $+ ): $admins | set -u4 %Invite.flood ON }
  62.   }
  63. }  
  64. on *:quit: {
  65.   if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  66.     var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  67.     .remini -n Admins.ini %user Logged
  68.     .writeini -n Admins.ini %user Status OFF
  69.   }
  70. }
  71. on *:part:%Invite.Channel: {
  72.   if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  73.     var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  74.     msg $nick You are disconnected from the admin account.
  75.     .remini -n Admins.ini %user Logged
  76.     .writeini -n Admins.ini %user Status OFF
  77.   }
  78. }
  79. on *:kick:%Invite.Channel: {
  80.   if ($Admins($address($knick,2)).logged?) {
  81.     var %user = $Admins($address($knick,2)).logged?
  82.     msg $nick You are disconnected from the admin account.
  83.     .remini -n Admins.ini %user Logged
  84.     .writeini -n Admins.ini %user Status OFF
  85.   }
  86. }
  87.  
  88. alias admins {
  89.   if ($prop == logged?) && ($1) {
  90.     var %x = 1
  91.     while ($ini(Admins.ini,%x)) {
  92.       if ($readini(Admins.ini,$ini(Admins.ini,%x),logged) == $1) { return $ini(Admins.ini,%x) | halt }
  93.       inc %x
  94.     }
  95.   }
  96.   if ($prop == logged.nick) && ($1) {
  97.     if ($readini(Admins.ini,$1,Logged)) { return $ial($readini(Admins.ini,$1,Logged)).nick }
  98.     elseif (!$readini(Admins.ini,$1,Logged)) { return No Suck NickName }
  99.   }
  100.   if ($prop == status) && ($1) {
  101.     if ($readini(Admins.ini,$1,Status) == ON) { return ON }
  102.     elseif ($readini(Admins.ini,$1,Status) == OFF) { return OFF }
  103.   }
  104.   if (!$prop) && ($1 == ALL) {
  105.     var %x = 1
  106.     while ($ini(Admins.ini,%x)) { var %temp = %temp $ini(Admins.ini,%x) | inc %x }
  107.     if (!$ini(Admins.ini,%x)) { return %temp }
  108.   }
  109.   if ($prop == NUM) && ($1 == ALL) { return $ini(Admins.ini,0) }
  110.   if (!$prop) && ($1 == ON) {
  111.     var %x = 1
  112.     while ($ini(Admins.ini,%x)) {
  113.       if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp $ini(Admins.ini,%x) }
  114.       inc %x
  115.     }
  116.     if (!$ini(Admins.ini,%x)) { return %temp }
  117.   }
  118.   if (!$prop) && ($1 == OFF) {
  119.     var %x = 1
  120.     while ($ini(Admins.ini,%x)) {
  121.       if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp $ini(Admins.ini,%x) }
  122.       inc %x
  123.     }
  124.     if (!$ini(Admins.ini,%x)) { return %temp }
  125.   }
  126.   if ($prop == num) && ($1 == OFF) {
  127.     var %x = 1
  128.     while ($ini(Admins.ini,%x)) {
  129.       if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp $ini(Admins.ini,%x) }
  130.       inc %x
  131.     }
  132.     if (!$ini(Admins.ini,%x)) { return $numtok(%temp,32) }
  133.   }
  134.   if ($prop == num) && ($1 == ON) {
  135.     var %x = 1
  136.     while ($ini(Admins.ini,%x)) {
  137.       if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp $ini(Admins.ini,%x) }
  138.       inc %x
  139.     }
  140.     if (!$ini(Admins.ini,%x)) { return $numtok(%temp,32) }
  141.   }
  142.   if (!$prop) && (!$1) {
  143.     var %x = 1
  144.     while ($ini(Admins.ini,%x)) {
  145.       if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp 3• $+ 0 $+ $ini(Admins.ini,%x) }
  146.       if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp 4• $+ 0 $+ $ini(Admins.ini,%x) }
  147.       inc %x
  148.     }
  149.     if (!$ini(Admins.ini,%x)) { return %temp }
  150.   }
  151. }
  152. menu * {
  153.   .Control Invite Bot
  154.   ..Set Channel { set %Invite.Channel $input(Type invite channel,e,Type invite channel) }
  155.   ..Set Sign { set %Invite.Sign $input(Type Sign (Like: !),e,Type Sign (Like: !)) }
  156.   ..Set BotPass { set %Invite.BotPass $input(Type BotPass (MasterPass),e,BotPass (MasterPass)) }
  157.   ..Clear Admins { .remove Admins.ini }
  158.   ..Open admins file { $iif($exists(Admins.ini),run Admins.ini,echo -a There is no admins.) }
  159. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top