Greedy Invite

By DaDealer on Nov 25, 2008

Ok this will make it so you wont join someone's invite unless they are in your #.

I'm not the best at scripting, but it works, and I'm sure there was a better way to do it.
Oh and incase your new to this stuff...Paste it in the Remote Section. (ALT + R)

p.s. The reason I did:
if ($chan == #YourChannelHere) {
is so you can add more then 1 # if you want.
Thank you,
DaDealer

;****************************************;
;*******     Made By: DaDealer     ******;
;******* Some Credit would be nice ******;
;*******     If you use it.        ******;
;****************************************;

on *:join:#: {
  if ($chan == #YourChannelHere) {
    set %dabj $address($nick,2)
    set %dab. [ $+ [ %dabj ] ]
    inc %dab. [ $+ [ %dabj ] ]
    unset -s %dabj
  }
}

on *:invite:*: {
  set %dabi $address($nick,2)
  if (%dab. [ $+ [ %dabi ] ] > 0) { 
    join $chan
  }
  else /notice $nick Please Idle in #dab before you invite me to your #
  unset -s %dabi
}

on *:part:#:{
  set %dabp $address($nick,2)
  dec %dab. [ $+ [ %dabj ] ]
  unset -s %dabp
}

Comments

Sign in to comment.
Blitzjager   -  Dec 04, 2008

I couldn't get the vars to set right but I'm pretty sure this would work.

on *:invite:*: {
  if ($nick ison #YOURCHANHERE) { 
    join $chan
    ;Number of channels they've invited you to
    inc %chans. $+ $address($nick,2)
    ;This should look like %chan.*!*@Blitzjager.users.quakenet.org.#OfChans #Blitzjager #Blitzjager2
    set %chan. $+ $address($nick,2) $+ %chans. $+ $address($nick,2) $addtok(chan. $+ $address($nick,2) $+ %chans. $+ $address($nick,2),$chan,32)
  }
  else /notice $nick Please Idle in #YOURCHANHERE before you invite me to your #
}
on *:part:#YOURCHANHERE:{
  while ( %chans. $+ $address($nick,2) > 0) {
    part $gettok(%chan. $+ $address($nick,2) $+ %chans. $+ $address($nick,2),%chans. $+ $address($nick,2),32)
    dec %chans. $+ $address($nick,2)
  }
  unset %chan. $+ $address($nick,2) $+ %chans. $+ $address($nick,2) $addtok(chan. $+ $address($nick,2)
}
 Respond  
DaDealer   -  Dec 03, 2008

ok but what if my bot gets invited to more then 1 #? wont it reset %invitedchan to the new #?

 Respond  
zainul   -  Nov 27, 2008

Try this it should part the channel you where invited to if they part your channel
i changed the code a bit hope u dont mind i am sure u will like it though hehe


on *:join:#: {
  if ($chan == #your-channel-name) {
    set -u2 %dabj $address($nick,2)
    inc %dab. [ $+ [ %dabj ] ]
  }
}

on *:invite:*: {
  set %invitedchan #
  if (%dab. [ $+ [ $address($nick,2) ] ] > 0) { 
    /join $chan
  }
  else /notice $nick Please Idle in #your-channel-name before you invite me to your #
}

on *:part:#your-channel-name:{
  if (%dab. [ $+ [ $address($nick,2) ] ]) /part %invitedchan
  unset %dab. [ $+ [ $address($nick,2) ] ]
  unset %invitedchan
}
 Respond  
DaDealer   -  Nov 25, 2008

If someone could show me how to make it part there # when they Leave yours...That would be nice.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.