mIRC Home    About    Download    Register    News    Help

Print Thread
remote ban for host only? #112105 21/02/05 05:54 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
what's the remote syntax for banning the host only? I tried $address but it included the user id. frown confused

Re: remote ban for host only? #112106 21/02/05 06:01 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
There's 2 ways.

If you're looking to get the host on an On Join event.

Code:
On !*:Join:#: {
  echo 12 $chan $!wildsite returns $wildsite
  echo 12 $chan $!address($nick,2) returns $address($nick,2)
}

Re: remote ban for host only? #112107 21/02/05 06:03 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
yes it's for an onjoin event. how do I change this:

Code:
 
on 1:JOIN:#:{ if *1269B986.24C574BF.BF13D210.IP* iswm $address { /mode # +b $address | /mode # +b $nick | .timer 1 0 /kick # $nick testing}
}
 

Re: remote ban for host only? #112108 21/02/05 06:11 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on @*:JOIN:#: {
  if (*1269B986.24C574BF.BF13D210.IP* iswm $wildsite) {
    ban $chan $wildsite 
    ban $chan $nick
    timer 1 0 kick $chan $nick 
  }
}

Re: remote ban for host only? #112109 21/02/05 06:21 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
thanks

Re: remote ban for host only? #112110 21/02/05 06:29 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Right click in the channel, select Host Ban.
Click "Add" and enter in a Host such as the one you showed us earlier.

This is so your code wont look messy if you specify countless hosts.

Hope this helps.
Code:
menu channel {
  $iif($dialog(hb),$style(3)) Host Ban: { 
    dialog -dm hb hb
  }
}

dialog hb { 
  title "Host Ban"  
  size -1 -1 160 115
  option dbu  
  list 3,3 3 154 100, autohs, sort
  button "Add", 4, 5 100 40 9 , 
  button "Del", 5, 60 100 40 9 , 
  button "Close", 6, 110 100 40 9, ok 
}

on *:dialog:hb:init:*: {   
  did -b hb 5
  if ($isfile(hb1.txt)) { 
    play -cs hb1.txt 0 
  }
}

on *:dialog:hb:sclick:3: {  
  set %hb.sel $did(3,$did(3).sel)  
  did -e hb 5
}

on *:dialog:hb:sclick:4: {   
  set %hb.add $$?="Enter Word:"
  write hb1.txt did -a hb 3 %hb.add   
  write hb2.txt %hb.add 
  did -a hb 3 %hb.add 
}

on *:dialog:hb:sclick:5: {  
  write -dw $+ "* $+ %hb.sel $+ *" hb1.txt   
  write -dw $+ "* $+ %hb.sel $+ *" hb2.txt   
  did -d hb 3 $did(hb,3).sel  
  did -b hb 5
}

on @*:JOIN:#: {
  if ($read(hb2.txt,w,$+(*,$wildsite,*))) { 
    ban $chan $wildsite 
    ban $chan $nick 
    .timer 1 0 kick $chan $nick
  }
}

Re: remote ban for host only? #112111 21/02/05 06:38 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
that didn't work frown

* Playing 'hb1.txt' to Status Window with 0ms delay
-
* Playback of 'hb1.txt' complete

Re: remote ban for host only? #112112 21/02/05 06:50 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547

[06:45] * Test has left #Andy
[06:45] * Test has joined #Andy
[06:45] * Andy sets mode: +b *!*@=omqdue17-378-665-877.range81-155.btcentralplus.com
[06:45] * Andy sets mode: +b Test!*andy@=omqdue17-378-665-877.range81-155.btcentralplus.com
[06:45] * Test was kicked by Andy (Banned Host (*!*@=omqdue17-378-665-877.range81-155.btcentralplus.com))

Try changing the On Join event to:

Code:
on @*:JOIN:#: {
  if ($read(hb2.txt,w,$wildsite)) {
    ban $chan $wildsite 
    ban $chan $nick 
    .timer 1 0 kick $chan $nick Banned Host ( $+ $ifmatch $+ )
  }
}




This appears to be working for me. grin

Last edited by SladeKraven; 21/02/05 06:56 AM.
Re: remote ban for host only? #112113 21/02/05 06:57 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
it still doesn't work frown

* Playback of 'hb1.txt' complete
-
* Playing 'hb1.txt' to Status Window with 0ms delay

Re: remote ban for host only? #112114 21/02/05 06:59 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
When it says playback it _should_ get all the Hosts and put them in to the dialog. Odd how it works for me and not for you. mad

Re: remote ban for host only? #112115 21/02/05 07:16 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
guess I'll have to be stuck with messy scripts lol crazy

Re: remote ban for host only? #112116 21/02/05 07:28 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Hmmm, type both:
/run hb1.txt
/run hb2.txt

What does it have in them?

Re: remote ban for host only? #112117 21/02/05 07:31 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You could set both bans at once smile
Code:
on @*:join:#:{
  if ($read(hb2.txt,w,$wildsite)) {
    mode # +bb $wildsite $nick
    .timer 1 0 kick $chan $nick Banned Host ( $+ $ifmatch $+ )
  }
}

Re: remote ban for host only? #112118 21/02/05 07:34 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Cheers mate grin

Re: remote ban for host only? #112119 21/02/05 08:46 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
it's ok..my remote is loaded with messed scripts anyway :P but thx anyway

Re: remote ban for host only? #112120 21/02/05 08:55 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
if (remote isloaded with messed scripts) { 
  download mIRC again.. 
}


grin

Last edited by SladeKraven; 21/02/05 08:55 AM.
Re: remote ban for host only? #112121 21/02/05 09:04 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
lol yet I can unload them too :tongue: