mIRC Home    About    Download    Register    News    Help

Print Thread
Spy invited useres #136420 27/11/05 07:39 PM
Joined: Nov 2005
Posts: 4
W
warrior69 Offline OP
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Nov 2005
Posts: 4
Hi all!
I'm trying to make a code for users that join my channel with invite when they are banned.
I mean...if a user whithout access i my channel is in the ban list and someone of the @ invites him to join....i want the code to say... smthng like that:
Atention: $nick was invite by someone to join the channel.

Help me pls!

Re: Spy invited useres #136421 27/11/05 10:48 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
To my knowledge there's no way of determining if a person joined the channel from an invitation or by any one of several other methods (eg: double clicking the room name in the channel list)

Without a way of making that determination, then I don't see any way of completing your request.

Re: Spy invited useres #136422 27/11/05 10:57 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Sometimes it's easier than you think...

Code:
on @*:JOIN:#yourchannel:{
  if ($fulladdress isban $chan) {
    msg $chan WARNING $nick is banned but invited anyways!
  }
}

Re: Spy invited useres #136423 29/11/05 12:36 PM
Joined: Mar 2004
Posts: 540
A
Armada Offline
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Quote:
Sometimes it's easier than you think...

Code:
on @*:JOIN:#yourchannel:{
  if ($fulladdress isban $chan) {
    msg $chan WARNING $nick is banned but invited anyways!
  }
}

That only works if the user is banned in the internal ban list
Quote:

isban if v1 is a banned address in internal ban list

Re: Spy invited useres #136424 29/11/05 06:19 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
/mode # b

So, what's the difference?

PS: irc opers can join channels even if they are banned/invite only, so this script might fail at such an occasion. Also if services like chanserv keep a banlist separate from the channel banlist, then those won't be detected, there's probably a /cs banlist command for those to parse...

Re: Spy invited useres #136425 30/11/05 08:11 PM
Joined: Nov 2005
Posts: 4
W
warrior69 Offline OP
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Nov 2005
Posts: 4
Ok thanks!!!It works
But...how about a timer in the code to see if e nick have access in the channel...???

Re: Spy invited useres #136426 30/11/05 11:30 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
I have no idea what you mean by access or how to check for that, if you can clarify I might be able to help...

Why would you need a timer? You can check when people join, their address won't change anymore, and if extra bans are placed, you can check when that ban is placed. However, if people join before their address is banned, they don't need to be invited.

Re: Spy invited useres #136427 01/12/05 07:25 PM
Joined: Nov 2005
Posts: 4
W
warrior69 Offline OP
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Nov 2005
Posts: 4
I mean if a nick has access like AOp VOp or Uop...he is able to invite himself so it's not necessary displaying that type of message.
I need the code to work for users without access in my channel...smth like that
Code:
on @*:JOIN:#yourchannel:{  if ($fulladdress isban $chan) && if($nick !isreg $chan) { 
msg $chan WARNING $nick is banned but invited anyways! 
 }
}

But this "if($nick !isreg $chan)" doesn't work when someone joins the channel...that's why im talking about a timer!I don't know how to add that timer in this code...
I hope you understand me...
Sorry 4 my english :tongue:

Re: Spy invited useres #136428 02/12/05 12:46 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Code:
on @*:JOIN:#yourchannel:{
  if ($fulladdress isban $chan) {
    .timer 1 3 if ( $nick isreg $chan ) msg $chan WARNING $nick is banned but invited anyways! 
  }
}


This checks if the user is banned on join, and if he is, it sets a timer that waits 3 seconds and then checks if the nick is still a regular user and then sends the warning message. Note that if the server is laggy and the modechange is delayed this script can still show the warning message. If that happens often set the delay to 5 or 10 seconds...

ps: to combine multiple tests in a single if statement, you don't need an extra 'if':
if ((check1 == $1) && (check2 isin $2-)) { msg $chan stuff }
Also make sure there is a space after the word 'if' and before the (
You'll notice that I put extra spaces around the brackets for the if inside the timer statement. Those are required to let the $nick and $chan be processed immediately when the timer is set, so that everything is filled in. This is because $nick doesn't contain anything anymore 3 seconds later, $chan might contain something, but not necessarily the correct channel...