Easy Popup invite script

By PwnerJohn on Jul 12, 2009

When someone invites you, it will popup telling who and what channel they are inviting you in. You can deny or accept this.

;###############################
;Created by PwnerJohn          #
;Helped by IE|ix007 (GameSurge)#
;###############################

on *:INVITE:*: { if (!%flood.protect) {
  .timer.invite 1 1 invited 
  set %invite.chan $chan
  set %invite.nick $nick
  set -u5 %flood.protect
}
}

alias invited { 
  if ($?!="You have been invited to %invite.chan by %invite.nick Accept or Deny?" == $true) { .j %invite.chan  
  unset %invite.chan
  unset %invite.nick
}
else { .msg %invite.nick I do not want to join that channel at this time. Thanks for the invite though! | unset %invite.chan | unset %invite.nick } }

Comments

Sign in to comment.
FordLawnmower   -  Jul 12, 2009

NP Cheers :)

 Respond  
PwnerJohn   -  Jul 12, 2009

eww - didn't see that. Thanks.

 Respond  
FordLawnmower   -  Jul 12, 2009

Just because you have the correct amount of brackets overall, doesn't mean that your brackets are correct. All mirc does is count them.

on *:INVITE:*: { if (!%flood.protect) {
  .timer.invite 1 1 invited 
  set %invite.chan $chan
  set %invite.nick $nick
  set -u5 %flood.protect
}

Where is the second closing bracket in this event ?
This event is not closed until the end of the invited alias, putting the invited alias inside of the on invite event.
No way this work correctly ;/

 Respond  
PwnerJohn   -  Jul 12, 2009

It still works... And There isn't a bracket mismatch (mIRC didn't say there was an error)

 Respond  
FordLawnmower   -  Jul 12, 2009

You have a bracket mismatch in the on invite event and the else statement is on the outside of the alias invited.

 Respond  
PwnerJohn   -  Jul 12, 2009

flood protection added - fixed title

 Respond  
FordLawnmower   -  Jul 12, 2009

You are very correct Spanky. Giving someone the power to open a window on your computer should be done with more caution than any other script. The result of an invite flood on this script would be your computer crashing.
Iron Clad flood protection for this script is a must, as it creates a major exploit.

 Respond  
Spanky   -  Jul 12, 2009
 ;###############################
;Created by PwnerJohn          #
;Helped by IE|ix007 (GameSurge)#
;###############################

on *:INVITE:*: { 
  .timer.invite 1 1 invited 
  set %invite.chan $chan
  set %invite.nick $nick
}

alias invited { 
  if ($?!="You have been invited to %invite.chan by %invite.nick Accept or Deny?" == $true) { .j %invite.chan  
else { .msg %invite.nick I do not want to join that channel at this time. Thanks for the invite though! | unset %invite.chan | unset %invite.nick } }
   unset %invite.chan
  unset %invite.nick
} 

oh and maybe, if they keep inviting you even you said no make it ignore them. just a few ideas.

 Respond  
Hawkee   -  Jul 12, 2009

Looks like you've got an issue with your title here.

 Respond  
FordLawnmower   -  Jul 12, 2009

The else { } is outside of the alias invited.

 Respond  
Spanky   -  Jul 12, 2009

btw some mircs dont have the J alias to join rooms so your better of using Join,

 Respond  
PwnerJohn   -  Jul 12, 2009

Edited.

 Respond  
Spanky   -  Jul 12, 2009

think about adding when you accept to auto join the channel. and when you deny to notice/msg the inviter you dont want to join the channel.

 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.