Advertisement
Guest User

Untitled

a guest
May 10th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.90 KB | None | 0 0
  1. ::::::::::::::::::::::::::::
  2. ::::::::Invite Bot::::::::::
  3. ::::::::::::::::::::::::::::
  4.  
  5. on !*:join:%Invite.Channel: { .timer 1 4 Check-Invite $nick *!*@ $+ $gettok($address,2,64) }
  6. on *:connect: { .timer 1 2 join %Invite.Channel | .timer 0 500 mode %Invite.Channel }
  7. on *:text:*:*: {
  8. if ($target !ischan) {
  9. if ($1 == %Invite.Sign $+ Set) && ($2 == %Invite.Botpass) {
  10. if ($3 == BotPass) {
  11. if (!$4) { msg $nick Error: The syntax is %Invite.Sign $+ Set %Invite.Botpass Botpass <100NEW BOT PASSWORD10> | Halt }
  12. elseif ($4) { msg $nick Botpass changed to:10 $4 | Set %Invite.Botpass $4 | Halt }
  13. }
  14. if ($3 == admin) {
  15. if (!$5) { msg $nick Error: The syntax is: %Invite.Sign $+ Set %Invite.Botpass admin <10USER1> <10PASSWORD1> $+ ,Ex: %Invite.Sign $+ Set %Invite.Botpass admin Montana 123 }
  16. elseif ($readini(Admins.ini,$4,User)) { msg $nick Error: The username10 $4 1is already used! please choose an author username or type %Invite.Sign $+ Set %Invite.Botpass unadmin $4 $+ . }
  17. elseif (!$readini(Admins.ini,$4,User)) {
  18. msg $nick [10Admin added1] Username:10 $4 1Password:10 $5 1Login command: /msg $me %Invite.Sign $+ Login $4 $5
  19. .writeini -n Admins.ini $4 User $4
  20. .writeini -n Admins.ini $4 Pass $5
  21. .writeini -n Admins.ini $4 Status OFF | Halt
  22. } }
  23. if ($3 == unadmin) {
  24. if (!$4) { msg $nick Error: The syntax is: %Invite.Sign $+ Set %Invite.Botpass unadmin <10USER1> $+ . }
  25. elseif (!$readini(Admins.ini,$4,User)) { msg $Nick Error: The username10 $4 1wasnt found in the Admins list. }
  26. elseif ($readini(Admins.ini,$4,User)) {
  27. msg $nick [10Admin removed1]10 $4 1removed from the admins list.
  28. .remini -n Admins.ini $4
  29. }
  30. }
  31. }
  32. if ($1 == %Invite.Sign $+ login) && ($3) && ($readini(Admins.ini,$2,pass) == $3) && (!$Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  33. whois $nick
  34. msg $nick You are connected to the admin account with the username:10 $2 1and the password:10 $3 $+ .
  35. .writeini -n Admins.ini $2 Logged *!*@ $+ $gettok($address,2,64)
  36. .writeini -n Admins.ini $2 Status ON
  37. }
  38. if ($1- == %Invite.Sign $+ logout) && ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  39. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  40. msg $nick 10 $+ %user $+ 1 $+ , 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 ($1- == %Invite.Sign $+ logoff) && ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  45. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  46. msg $nick 10 $+ %user $+ 1 $+ , You are logged off from the admin account.
  47. .remini -n Admins.ini %user Logged
  48. .writeini -n Admins.ini %user Status OFF
  49. }
  50. if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  51. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  52. if ( ($1 == %Invite.Sign $+ Invite) || ($1 == %Invite.Sign $+ AddInvite) || ($1 == %Invite.Sign $+ Add-Invite) ) && ($2) {
  53. invite $2 %Invite.Channel
  54. msg $2 $2, you have been invited to %Invite.Channel
  55. msg $Bot? chanlev %Invite.Channel $2 +k
  56. msg $nick DONE.10 %Invite.Channel 
  57. }
  58. if ( ($1 == %Invite.Sign $+ DelInvite) || ($1 == %Invite.Sign $+ Del-Invite) || ($1 == %Invite.Sign $+ unInvite) || ($1 == %Invite.Sign $+ RemInvite) ) && ($2) {
  59. msg $nick [10Invite removed1]1 $2 1removed from the channel1 %Invite.Channel $+ .
  60. msg $Bot? chanlev %Invite.Channel $2 -k
  61. .timer 1 1 msg $2 $2, Your invite removed from10 %Invite.Channel
  62. if ($2 ison %Invite.Channel) { ban -ao %Invite.Channel $2 1Your invite removed from10 %Invite.Channel }
  63. }
  64. }
  65. }
  66. if ($target ischan) && ($target == %Invite.Channel) {
  67. if ($1- == %Invite.Sign $+ Admins) && (!%Invite.flood) { msg # 15,1[7�0 00Invite bot admins: (3 $+ $admins(ON).num $+ 0/ $+ $admins(ALL).num $+ ): $admins . 7,1�15] | set -u4 %Invite.flood ON }
  68. }
  69. }
  70. alias Bot? {
  71. if (Q ison %Invite.Channel) { return Q }
  72. if (L ison %Invite.Channel) { return L }
  73. }
  74. on *:op:%Invite.Channel: { if ($opnick == $me) { mode # } }
  75. on !*:mode:%Invite.Channel: { if (r !isincs $chan(#).mode) { mode # } }
  76.  
  77.  
  78. on *:part:%Invite.Channel: {
  79. if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  80. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  81. msg $nick You are disconnected from 10 $+ %user $+ .1 admin account.
  82. .remini -n Admins.ini %user Logged
  83. .writeini -n Admins.ini %user Status OFF
  84. }
  85. }
  86. on *:kick:%Invite.Channel: {
  87. if ($Admins($address($knick,2)).logged?) {
  88. var %user = $Admins($address($knick,2)).logged?
  89. msg $nick You are disconnected from 10 $+ %user $+ .1 admin account.
  90. .remini -n Admins.ini %user Logged
  91. .writeini -n Admins.ini %user Status OFF
  92. }
  93. }
  94.  
  95. alias admins {
  96. if ($prop == logged?) && ($1) {
  97. var %x = 1
  98. while ($ini(Admins.ini,%x)) {
  99. if ($readini(Admins.ini,$ini(Admins.ini,%x),logged) == $1) { return $ini(Admins.ini,%x) | halt }
  100. inc %x
  101. }
  102. }
  103. if ($prop == logged.nick) && ($1) {
  104. if ($readini(Admins.ini,$1,Logged)) { return $ial($readini(Admins.ini,$1,Logged)).nick }
  105. elseif (!$readini(Admins.ini,$1,Logged)) { return No Suck NickName }
  106. }
  107. if ($prop == status) && ($1) {
  108. if ($readini(Admins.ini,$1,Status) == ON) { return ON }
  109. elseif ($readini(Admins.ini,$1,Status) == OFF) { return OFF }
  110. }
  111. if (!$prop) && ($1 == ALL) {
  112. var %x = 1
  113. while ($ini(Admins.ini,%x)) { var %temp = %temp $ini(Admins.ini,%x) | inc %x }
  114. if (!$ini(Admins.ini,%x)) { return %temp }
  115. }
  116. if ($prop == NUM) && ($1 == ALL) { return $ini(Admins.ini,0) }
  117. if (!$prop) && ($1 == ON) {
  118. var %x = 1
  119. while ($ini(Admins.ini,%x)) {
  120. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp $ini(Admins.ini,%x) }
  121. inc %x
  122. }
  123. if (!$ini(Admins.ini,%x)) { return %temp }
  124. }
  125. if (!$prop) && ($1 == OFF) {
  126. var %x = 1
  127. while ($ini(Admins.ini,%x)) {
  128. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp $ini(Admins.ini,%x) }
  129. inc %x
  130. }
  131. if (!$ini(Admins.ini,%x)) { return %temp }
  132. }
  133. if ($prop == num) && ($1 == OFF) {
  134. var %x = 1
  135. while ($ini(Admins.ini,%x)) {
  136. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp $ini(Admins.ini,%x) }
  137. inc %x
  138. }
  139. if (!$ini(Admins.ini,%x)) { return $numtok(%temp,32) }
  140. }
  141. if ($prop == num) && ($1 == ON) {
  142. var %x = 1
  143. while ($ini(Admins.ini,%x)) {
  144. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp $ini(Admins.ini,%x) }
  145. inc %x
  146. }
  147. if (!$ini(Admins.ini,%x)) { return $numtok(%temp,32) }
  148. }
  149. if (!$prop) && (!$1) {
  150. var %x = 1
  151. while ($ini(Admins.ini,%x)) {
  152. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp 3� $+ 0 $+ $ini(Admins.ini,%x) }
  153. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp 4� $+ 0 $+ $ini(Admins.ini,%x) }
  154. inc %x
  155. }
  156. if (!$ini(Admins.ini,%x)) { return %temp }
  157. }
  158. }
  159. menu * {
  160. Invite Bot Settings
  161. .Set Channel { set %Invite.Channel $input(Type invite channel,e,Type invite channel) }
  162. .Set Sign { set %Invite.Sign $input(Type Sign (Like: !),e,Type Sign (Like: !)) }
  163. .Set BotPass { set %Invite.BotPass $input(Type BotPass (MasterPass),e,BotPass (MasterPass)) }
  164. .Clear Admins { .remove Admins.ini }
  165. .Open admins file { $iif($exists(Admins.ini),run Admins.ini,echo -a There is no admins.) }
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement