mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Well... someone can fix this code for me:

Code:
  
on *:join:#bNc?: {
if ($address == *!*warnet@*) {
mode #bNc? +v $nick
msg #bNc?  $nick ~ Is using one of our bnc's. (+v)
}
}


If you mess with the best, u will die like the rest !
Joined: Oct 2005
Posts: 11
C
Pikka bird
Offline
Pikka bird
C
Joined: Oct 2005
Posts: 11
Quote:
Well... someone can fix this code for me:

Code:
  
on *:join:#bNc?: {
if ($address == *!*warnet@*) {
mode #bNc? +v $nick
msg #bNc?  $nick ~ Is using one of our bnc's. (+v)
}
}


Code:
on *:join:#bNc?: {
  if(  *!*warnet@* isin $address) {
   mode #bNc? +v $nick 
   msg #bNc?  $nick ~ is using one of our bncs
  }
}


should work unless you have to use gettok.

Last edited by coax; 12/10/05 07:19 PM.
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Well... it's not working... the "if (...." line is wrong, it's not working... i need a bnc Detector... & the script has to auto-voice everyone that joins the channel with this host:

*!*Warnet@*

please, someone create it...

Last edited by PhyxiuS; 12/10/05 08:00 PM.

If you mess with the best, u will die like the rest !
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Replace isin with iswm ... you're doing a wildcard match.

See if that works.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
I checked... so this is what i've got:

on *:join:#bNc?: {
if (*!*warnet@* iswm $address) {
mode #bNc? -c
msg #bNc? ¬BNC Detected¬ «( $+ $address $+ )» (auto-voice)
mode #bNc? +v $nick
mode #bNc? +c
}
}

---

But the "if" line is not correct... there is something wrong ;\


If you mess with the best, u will die like the rest !
Joined: Jun 2005
Posts: 9
B
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
B
Joined: Jun 2005
Posts: 9
try this:
Code:
on *:join:#bNc?: {
if (*!*warnet@* iswm $address($nick,3)) {
    mode # -c
    msg # ¬BNC Detected¬ «( $+ $address $+ )» (auto-voice)
    mode # +v $nick
    mode # +c 
  }
} 

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can try this as well:


if (*warnet@* iswm $address($nick,3)) {


First, $address by itself uses your own address. You'd need $address($nick,_) to get the nick's address (using whatever mask number you like). Second, I'm not entirely certain that 3 *'s work. Maybe they do. In either case, the above wildcard match is all you need anyhow. Including *! doesn't make it match any differently.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Nah, i did it on another way... smile
This:

on bncuser:JOIN:#bNc?: {
mode #bNc? -c
msg #bNc? BNC Detected... bla bla bla
mode #bNc? +v $nick
mode #bNc? +c
}
I added this to Users:
bncuser:*!*warnet@*

& it works now... well, ty anyway


If you mess with the best, u will die like the rest !
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
*!*warnet@* iswm $address was failing because in an event the nickname portion of an address is placed into $nick and $address is set to [email]ident@host.[/email] You could have replaced $address with $fulladdress and it should have worked.

However if you plan for this script to work with more than one address, a user list of some sort as you have now done is a better solution than adding multiple if statements.

You could also combine mode commands to reduce sever messages slightly. mode #bNc? +cv $nick

Last edited by Om3n; 14/10/05 05:00 AM.

"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Link Copied to Clipboard