Advertisement
Guest User

Untitled

a guest
May 2nd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.81 KB | None | 0 0
  1. ::::::::::::::::::::::::::::::::::::::::::::::
  2. :::::::::::::Invitebot by Montana:::::::::::::
  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 +r }
  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 <12NEW BOT PASSWORD1> | Halt }
  12. elseif ($4) { msg $nick Botpass changed to:12 $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 <12USER1> <12PASSWORD1> $+ ,Ex: %Invite.Sign $+ Set %Invite.Botpass admin Montana 123 }
  16. 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 $+ . }
  17. elseif (!$readini(Admins.ini,$4,User)) {
  18. msg $nick [12Admin added1] Username:12 $4 1Password:12 $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 <12USER1> $+ . }
  25. elseif (!$readini(Admins.ini,$4,User)) { msg $Nick Error: The username12 $4 1wasnt found in the Admins list. }
  26. elseif ($readini(Admins.ini,$4,User)) {
  27. msg $nick [12Admin removed1]12 $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:12 $2 1and the password:12 $3 $+ .
  35. msg %Invite.channel $nick has connected to the admin account with the username:12 $2 $+ .
  36. .writeini -n Admins.ini $2 Logged *!*@ $+ $gettok($address,2,64)
  37. .writeini -n Admins.ini $2 Status ON
  38. }
  39. if ($1- == %Invite.Sign $+ logout) && ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  40. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  41. msg $nick You are logged out from the admin account. (12 $+ %user $+ 1 $+ )
  42. msg %Invite.channel $nick has logged out from the admin account. (12 $+ %user $+ 1 $+ )
  43. .remini -n Admins.ini %user Logged
  44. .writeini -n Admins.ini %user Status OFF
  45. }
  46. if ($1- == %Invite.Sign $+ logoff) && ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  47. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  48. msg $nick You are logged off from the admin account. (12 $+ %user $+ 1 $+ )
  49. msg %Invite.channel $nick has logged off from the admin account. (12 $+ %user $+ 1 $+ )
  50. .remini -n Admins.ini %user Logged
  51. .writeini -n Admins.ini %user Status OFF
  52. }
  53. if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  54. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  55. if ( ($1 == %Invite.Sign $+ Invite) || ($1 == %Invite.Sign $+ AddInvite) || ($1 == %Invite.Sign $+ Add-Invite) ) && ($2) {
  56. msg $nick [12Invite1]12 $2 1invited to12 %Invite.channel $+ .
  57. invite $2 %Invite.channel
  58. msg $2 You are invited to12 %Invite.channel 
  59. }
  60. if ( ($1 == %Invite.Sign $+ DelInvite) || ($1 == %Invite.Sign $+ Del-Invite) || ($1 == %Invite.Sign $+ Rem-Invite) || ($1 == %Invite.Sign $+ RemInvite) ) && ($2) {
  61. msg $nick [12Invite removed1]12 $2 1removed from the channel12 %Invite.channel $+ .
  62. msg $Bot? chanlev %Invite.Channel $2 -k
  63. .timer 1 1 msg $2 [12 $+ %Invite.Channel $+ 1] Your invite removed from12 %Invite.channel
  64. if ($2 ison %Invite.Channel) { ban -k %Invite.channel $2 1Your invite removed from12 %Invite.channel }
  65. }
  66. }
  67. }
  68. if ($target ischan) && ($target == %Invite.channel) {
  69. if ($1- == %Invite.Sign $+ Admins) && (!%Invite.flood) { msg # 0,1Admins (3 $+ $admins(ON).num $+ 0/ $+ $admins(ALL).num $+ ): $admins | set -u4 %Invite.flood ON }
  70. }
  71. }
  72. alias Bot? {
  73. if (Q ison %Invite.Channel) { return Q }
  74. if (L ison %Invite.Channel) { return L }
  75. }
  76. on *:op:%Invite.channel: { if ($opnick == $me) { mode # +r } }
  77. on !*:mode:%Invite.channel: { if (r !isincs $chan(#).mode) { mode # +r } }
  78.  
  79.  
  80.  
  81. on *:quit: {
  82. if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  83. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  84. msg %Invite.channel $nick has disconnected from the admin account and from the mIRC. (12 $+ %user $+ 1 $+ )
  85. .remini -n Admins.ini %user Logged
  86. .writeini -n Admins.ini %user Status OFF
  87. }
  88. }
  89. on *:part:%Invite.Channel: {
  90. if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
  91. var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
  92. msg $nick You are disconnected from the admin account. (12 $+ %user $+ 1 $+ )
  93. msg %Invite.channel $nick has disconnected from the admin account and from the mIRC. (12 $+ %user $+ 1 $+ )
  94. .remini -n Admins.ini %user Logged
  95. .writeini -n Admins.ini %user Status OFF
  96. }
  97. }
  98. on *:kick:%Invite.Channel: {
  99. if ($Admins($address($knick,2)).logged?) {
  100. var %user = $Admins($address($knick,2)).logged?
  101. msg $nick You are disconnected from the admin account. (12 $+ %user $+ 1 $+ )
  102. msg %Invite.channel $nick has disconnected from the admin account. (12 $+ %user $+ 1 $+ )
  103. .remini -n Admins.ini %user Logged
  104. .writeini -n Admins.ini %user Status OFF
  105. }
  106. }
  107.  
  108. alias admins {
  109. if ($prop == logged?) && ($1) {
  110. var %x = 1
  111. while ($ini(Admins.ini,%x)) {
  112. if ($readini(Admins.ini,$ini(Admins.ini,%x),logged) == $1) { return $ini(Admins.ini,%x) | halt }
  113. inc %x
  114. }
  115. }
  116. if ($prop == logged.nick) && ($1) {
  117. if ($readini(Admins.ini,$1,Logged)) { return $ial($readini(Admins.ini,$1,Logged)).nick }
  118. elseif (!$readini(Admins.ini,$1,Logged)) { return No Suck NickName }
  119. }
  120. if ($prop == status) && ($1) {
  121. if ($readini(Admins.ini,$1,Status) == ON) { return ON }
  122. elseif ($readini(Admins.ini,$1,Status) == OFF) { return OFF }
  123. }
  124. if (!$prop) && ($1 == ALL) {
  125. var %x = 1
  126. while ($ini(Admins.ini,%x)) { var %temp = %temp $ini(Admins.ini,%x) | inc %x }
  127. if (!$ini(Admins.ini,%x)) { return %temp }
  128. }
  129. if ($prop == NUM) && ($1 == ALL) { return $ini(Admins.ini,0) }
  130. if (!$prop) && ($1 == ON) {
  131. var %x = 1
  132. while ($ini(Admins.ini,%x)) {
  133. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp $ini(Admins.ini,%x) }
  134. inc %x
  135. }
  136. if (!$ini(Admins.ini,%x)) { return %temp }
  137. }
  138. if (!$prop) && ($1 == OFF) {
  139. var %x = 1
  140. while ($ini(Admins.ini,%x)) {
  141. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp $ini(Admins.ini,%x) }
  142. inc %x
  143. }
  144. if (!$ini(Admins.ini,%x)) { return %temp }
  145. }
  146. if ($prop == num) && ($1 == OFF) {
  147. var %x = 1
  148. while ($ini(Admins.ini,%x)) {
  149. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp $ini(Admins.ini,%x) }
  150. inc %x
  151. }
  152. if (!$ini(Admins.ini,%x)) { return $numtok(%temp,32) }
  153. }
  154. if ($prop == num) && ($1 == ON) {
  155. var %x = 1
  156. while ($ini(Admins.ini,%x)) {
  157. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp $ini(Admins.ini,%x) }
  158. inc %x
  159. }
  160. if (!$ini(Admins.ini,%x)) { return $numtok(%temp,32) }
  161. }
  162. if (!$prop) && (!$1) {
  163. var %x = 1
  164. while ($ini(Admins.ini,%x)) {
  165. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp 3� $+ 0 $+ $ini(Admins.ini,%x) }
  166. if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp 4� $+ 0 $+ $ini(Admins.ini,%x) }
  167. inc %x
  168. }
  169. if (!$ini(Admins.ini,%x)) { return %temp }
  170. }
  171.  
  172. }
  173. menu * {
  174. Invite Bot
  175. .Set Channel { set %Invite.Channel $input(Type invite channel,e,Type invite channel) }
  176. .Set Sign { set %Invite.Sign $input(Type Sign (Like: !),e,Type Sign (Like: !)) }
  177. .Set BotPass { set %Invite.BotPass $input(Type BotPass (MasterPass),e,BotPass (MasterPass)) }
  178. .Clear Admins { .remove Admins.ini }
  179. .Open admins file { $iif($exists(Admins.ini),run Admins.ini,echo -a There is no admins.) }
  180. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement