Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::::::::::::::::::::::::::::::::::::::::::::::
- :::::::::::::Invitebot by Montana:::::::::::::
- ::::::::::::::::::::::::::::::::::::::::::::::
- on !*:join:%Invite.Channel: { .timer 1 4 Check-Invite $nick *!*@ $+ $gettok($address,2,64) }
- on *:connect: { .timer 1 2 join %Invite.Channel | .timer 0 500 mode %Invite.Channel +r }
- on *:text:*:*: {
- if ($target !ischan) {
- if ($1 == %Invite.Sign $+ Set) && ($2 == %Invite.Botpass) {
- if ($3 == BotPass) {
- if (!$4) { msg $nick Error: The syntax is %Invite.Sign $+ Set %Invite.Botpass Botpass <12NEW BOT PASSWORD1> | Halt }
- elseif ($4) { msg $nick Botpass changed to:12 $4 | Set %Invite.Botpass $4 | Halt }
- }
- if ($3 == admin) {
- 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 }
- 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 $+ . }
- elseif (!$readini(Admins.ini,$4,User)) {
- msg $nick [12Admin added1] Username:12 $4 1Password:12 $5 1Login command: /msg $me %Invite.Sign $+ Login $4 $5
- .writeini -n Admins.ini $4 User $4
- .writeini -n Admins.ini $4 Pass $5
- .writeini -n Admins.ini $4 Status OFF | Halt
- } }
- if ($3 == unadmin) {
- if (!$4) { msg $nick Error: The syntax is: %Invite.Sign $+ Set %Invite.Botpass unadmin <12USER1> $+ . }
- elseif (!$readini(Admins.ini,$4,User)) { msg $Nick Error: The username12 $4 1wasnt found in the Admins list. }
- elseif ($readini(Admins.ini,$4,User)) {
- msg $nick [12Admin removed1]12 $4 1removed from the admins list.
- .remini -n Admins.ini $4
- }
- }
- }
- if ($1 == %Invite.Sign $+ login) && ($3) && ($readini(Admins.ini,$2,pass) == $3) && (!$Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
- whois $nick
- msg $nick You are connected to the admin account with the username:12 $2 1and the password:12 $3 $+ .
- msg %Invite.channel $nick has connected to the admin account with the username:12 $2 $+ .
- .writeini -n Admins.ini $2 Logged *!*@ $+ $gettok($address,2,64)
- .writeini -n Admins.ini $2 Status ON
- }
- if ($1- == %Invite.Sign $+ logout) && ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
- var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
- msg $nick You are logged out from the admin account. (12 $+ %user $+ 1 $+ )
- msg %Invite.channel $nick has logged out from the admin account. (12 $+ %user $+ 1 $+ )
- .remini -n Admins.ini %user Logged
- .writeini -n Admins.ini %user Status OFF
- }
- if ($1- == %Invite.Sign $+ logoff) && ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
- var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
- msg $nick You are logged off from the admin account. (12 $+ %user $+ 1 $+ )
- msg %Invite.channel $nick has logged off from the admin account. (12 $+ %user $+ 1 $+ )
- .remini -n Admins.ini %user Logged
- .writeini -n Admins.ini %user Status OFF
- }
- if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
- var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
- if ( ($1 == %Invite.Sign $+ Invite) || ($1 == %Invite.Sign $+ AddInvite) || ($1 == %Invite.Sign $+ Add-Invite) ) && ($2) {
- msg $nick [12Invite1]12 $2 1invited to12 %Invite.channel $+ .
- invite $2 %Invite.channel
- msg $2 You are invited to12 %Invite.channel
- }
- if ( ($1 == %Invite.Sign $+ DelInvite) || ($1 == %Invite.Sign $+ Del-Invite) || ($1 == %Invite.Sign $+ Rem-Invite) || ($1 == %Invite.Sign $+ RemInvite) ) && ($2) {
- msg $nick [12Invite removed1]12 $2 1removed from the channel12 %Invite.channel $+ .
- msg $Bot? chanlev %Invite.Channel $2 -k
- .timer 1 1 msg $2 [12 $+ %Invite.Channel $+ 1] Your invite removed from12 %Invite.channel
- if ($2 ison %Invite.Channel) { ban -k %Invite.channel $2 1Your invite removed from12 %Invite.channel }
- }
- }
- }
- if ($target ischan) && ($target == %Invite.channel) {
- if ($1- == %Invite.Sign $+ Admins) && (!%Invite.flood) { msg # 0,1Admins (3 $+ $admins(ON).num $+ 0/ $+ $admins(ALL).num $+ ): $admins | set -u4 %Invite.flood ON }
- }
- }
- alias Bot? {
- if (Q ison %Invite.Channel) { return Q }
- if (L ison %Invite.Channel) { return L }
- }
- on *:op:%Invite.channel: { if ($opnick == $me) { mode # +r } }
- on !*:mode:%Invite.channel: { if (r !isincs $chan(#).mode) { mode # +r } }
- on *:quit: {
- if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
- var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
- msg %Invite.channel $nick has disconnected from the admin account and from the mIRC. (12 $+ %user $+ 1 $+ )
- .remini -n Admins.ini %user Logged
- .writeini -n Admins.ini %user Status OFF
- }
- }
- on *:part:%Invite.Channel: {
- if ($Admins(*!*@ $+ $gettok($address,2,64)).logged?) {
- var %user = $Admins(*!*@ $+ $gettok($address,2,64)).logged?
- msg $nick You are disconnected from the admin account. (12 $+ %user $+ 1 $+ )
- msg %Invite.channel $nick has disconnected from the admin account and from the mIRC. (12 $+ %user $+ 1 $+ )
- .remini -n Admins.ini %user Logged
- .writeini -n Admins.ini %user Status OFF
- }
- }
- on *:kick:%Invite.Channel: {
- if ($Admins($address($knick,2)).logged?) {
- var %user = $Admins($address($knick,2)).logged?
- msg $nick You are disconnected from the admin account. (12 $+ %user $+ 1 $+ )
- msg %Invite.channel $nick has disconnected from the admin account. (12 $+ %user $+ 1 $+ )
- .remini -n Admins.ini %user Logged
- .writeini -n Admins.ini %user Status OFF
- }
- }
- alias admins {
- if ($prop == logged?) && ($1) {
- var %x = 1
- while ($ini(Admins.ini,%x)) {
- if ($readini(Admins.ini,$ini(Admins.ini,%x),logged) == $1) { return $ini(Admins.ini,%x) | halt }
- inc %x
- }
- }
- if ($prop == logged.nick) && ($1) {
- if ($readini(Admins.ini,$1,Logged)) { return $ial($readini(Admins.ini,$1,Logged)).nick }
- elseif (!$readini(Admins.ini,$1,Logged)) { return No Suck NickName }
- }
- if ($prop == status) && ($1) {
- if ($readini(Admins.ini,$1,Status) == ON) { return ON }
- elseif ($readini(Admins.ini,$1,Status) == OFF) { return OFF }
- }
- if (!$prop) && ($1 == ALL) {
- var %x = 1
- while ($ini(Admins.ini,%x)) { var %temp = %temp $ini(Admins.ini,%x) | inc %x }
- if (!$ini(Admins.ini,%x)) { return %temp }
- }
- if ($prop == NUM) && ($1 == ALL) { return $ini(Admins.ini,0) }
- if (!$prop) && ($1 == ON) {
- var %x = 1
- while ($ini(Admins.ini,%x)) {
- if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp $ini(Admins.ini,%x) }
- inc %x
- }
- if (!$ini(Admins.ini,%x)) { return %temp }
- }
- if (!$prop) && ($1 == OFF) {
- var %x = 1
- while ($ini(Admins.ini,%x)) {
- if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp $ini(Admins.ini,%x) }
- inc %x
- }
- if (!$ini(Admins.ini,%x)) { return %temp }
- }
- if ($prop == num) && ($1 == OFF) {
- var %x = 1
- while ($ini(Admins.ini,%x)) {
- if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp $ini(Admins.ini,%x) }
- inc %x
- }
- if (!$ini(Admins.ini,%x)) { return $numtok(%temp,32) }
- }
- if ($prop == num) && ($1 == ON) {
- var %x = 1
- while ($ini(Admins.ini,%x)) {
- if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp $ini(Admins.ini,%x) }
- inc %x
- }
- if (!$ini(Admins.ini,%x)) { return $numtok(%temp,32) }
- }
- if (!$prop) && (!$1) {
- var %x = 1
- while ($ini(Admins.ini,%x)) {
- if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == ON) { var %temp = %temp 3� $+ 0 $+ $ini(Admins.ini,%x) }
- if ($readini(Admins.ini,$ini(Admins.ini,%x),status) == OFF) { var %temp = %temp 4� $+ 0 $+ $ini(Admins.ini,%x) }
- inc %x
- }
- if (!$ini(Admins.ini,%x)) { return %temp }
- }
- }
- menu * {
- Invite Bot
- .Set Channel { set %Invite.Channel $input(Type invite channel,e,Type invite channel) }
- .Set Sign { set %Invite.Sign $input(Type Sign (Like: !),e,Type Sign (Like: !)) }
- .Set BotPass { set %Invite.BotPass $input(Type BotPass (MasterPass),e,BotPass (MasterPass)) }
- .Clear Admins { .remove Admins.ini }
- .Open admins file { $iif($exists(Admins.ini),run Admins.ini,echo -a There is no admins.) }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement