Advertisement
Guest User

Untitled

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