mIRC Homepage
Posted By: xyzzy F key ban - 17/03/09 07:34 PM
F3 /ban -k # $* 2 no reason
im using this for ban marked nicks
i just want make it dnt ban myself anything possible confused
Posted By: RoCk Re: F key ban - 17/03/09 07:42 PM

Try this

F3 tokenize 32 $remtok($1-,$me,1,32) | ban -k # $* 2 no reason

or this

F3 sline -r # $me | ban -k # $* 2 no reason
Posted By: xyzzy Re: F key ban - 17/03/09 08:20 PM
thank you first one works well smile
Posted By: xyzzy Re: F key ban - 23/03/09 02:09 PM
Code:
on $*:hotlink:/(@[\w-]+(\56[\w-]+)+)/:#: mode $chan $iif(*!* $+ $regml(1) isban $chan,-b,+b) *!* $+ $regml(1)

using that one to ip ban/unban
want to change it just ban as *!*@7B13940E.*
tried add this
tokenize 32 $remtok($1-,$me,1,32) | ban -k # $* 2 no reason
but didnt work
Posted By: Tomao Re: F key ban - 23/03/09 05:42 PM
Remember to double click on a NICK in channel
Code:
on ^*:hotlink:*:#:if ($me isop $chan) return | halt
on *:hotlink:*:#: {
  mode $chan $iif($1 isban $chan,-b,+b) $address($1,3)
  if ($1 !isban $chan) { tokenize 32 $remtok($1,$me,1,32) | ban -k # $* 2 no reason }
}
Posted By: xyzzy Re: F key ban - 23/03/09 06:03 PM
sets mode: +b *!(aaa@3B7480CD.1C40876A.AD8A0A5B.IP)
something wrong ?
Posted By: xyzzy Re: F key ban - 24/03/09 12:11 AM
i tried a lot and that $address($1,3) is ban like this
*!aaa@3CE01815.1C40876A.AD8A0A5B.IP
but i want it set ban as *!*@3CE01815.*
also do not want to -b if the ip already banned
-
the other problem is
f1 tokenize 32 $remtok($1-,$me,1,32) | mode # +b $gettok($address($$1,2),1,46) $+ * | kick # $* reason
using this for ban the nicks selected in nicklist but its only ban 1 nick can change it to ban all nicks selected ?
Posted By: RusselB Re: F key ban - 24/03/09 01:16 AM
Code:
F1 {
  var %snicks = $remtok($snick(#),$me,1,44), %a = 1, %b = $numtok(%snicks,44)
  while %a <= %b {
    var %nick = $gettok(%snicks,%a,44)
    .ban -k # $gettok($address(%nick,2),1,46) $+ * <reason>
    inc %a
  }
}


This should do what you're describing. If you find that the addresses are being too general, change the 4 for the address lookup to a 2, but I don't think you'll see much of a difference between the two.

I can't test this as the addresses on the network that I would test it on are shown to me in proper format due to the fact that I'm an IRCop.
Posted By: xyzzy Re: F key ban - 24/03/09 01:34 AM
+b *!*@3CE01815.1C40876A.AD8A0A5B.*
the ban is not what i wanted i tried 2 to
need set as +b *!*@3CE01815*


Posted By: Tomao Re: F key ban - 24/03/09 02:04 AM
Change to this and see what happens:
Code:
.ban -k # $left($replace(%address,%address1,*),13) <reason>
Posted By: xyzzy Re: F key ban - 24/03/09 02:07 AM
+b *!*@*.1C40876
this ermm and its wrong
Posted By: RusselB Re: F key ban - 24/03/09 02:23 AM
Try my edited version. My apologies, I was looking at the wrong end of the host address in my first post.
Posted By: xyzzy Re: F key ban - 24/03/09 02:28 AM
this i got just tried edited one
+b *!*A0A6B.IP*@*
i give u one ip to see
@3CE01815.1C40876A.AD8A0A6B.IP
*!*@3CE01815*
mode # +b $gettok($address($$1,2),1,46) $+ *
this code get that ip right like this
sets mode: +b *!*@3CE01815*

Posted By: Tomao Re: F key ban - 24/03/09 04:05 AM
Good one. But you should change $$1 to $snicks so it compliments Russel's code.
Posted By: RusselB Re: F key ban - 24/03/09 04:05 AM
Let's hope that the 3rd time is the charm.
Posted By: xyzzy Re: F key ban - 24/03/09 12:37 PM
sets all bans great \:\)
*!*@2928C87F* No such nick/channel
.ban -k # $gettok($address(%nick,2),1,46) $+ * <reason>
changed to
.mode # +b $gettok($address(%nick,2),1,46) $+ * | kick # $* <reason>
its all working now thank you \:\)
-
Tomao double click is not works well i did double click the nick and it set 2 bans
sets mode: +b *!*aaa@*.1C40876A.AD8A0A6B.IP
sets mode: +b *!*@3CE01815.1C40876A.AD8A0A6B.IP
if i double click and ip in the room set it ban as sets mode: +b *!*@3CE01815*
Code:
on $^*:hotlink:/@[\w-]+(\56[\w-]+)+/:#:{
  if ($me isop $chan) return
  halt
}
on $*:hotlink:/(@[\w-]+(\56[\w-]+)+)/:#: mode $chan $iif(*!* $+ $regml(1) isban $chan,-b,+b) *!* $+ $regml(1)

this one set bans full ip on double lick ip
sets mode: +b *!*@3CE01815.1C40876A.AD8A0A6B.IP
Posted By: Tomao Re: F key ban - 24/03/09 05:10 PM
I think I could have overlooked the fact that that hotlink ban script should have worked if you changed the second bit to:
Code:
on $*:hotlink:/(@[\w-]+(\56[\w-]+)+)/:#:mode $chan $iif(*!* $+ $regml(1) isban $chan,-b,+b) *!* $+ $+($gettok($regml(1),1,46),*)
Posted By: xyzzy Re: F key ban - 24/03/09 05:38 PM
thanks a lot have a good day/night
-edit
just banned myself needs fix it smirk
Posted By: xyzzy Re: F key ban - 30/03/09 09:31 PM
need fix it to dnt ban urself confused
Posted By: Tomao Re: F key ban - 30/03/09 10:19 PM
How did you ban yourself?
Posted By: xyzzy Re: F key ban - 30/03/09 10:21 PM
whois myself in the room then click the ip lol
Posted By: Tomao Re: F key ban - 30/03/09 11:04 PM
Change this bit to this:
Quote:
on $*:hotlink:/(@[\w-]+(\56[\w-]+)+)/:#: {
if (*Your IP Address Here* !iswm $regml(1)) {
mode $chan $iif(*!* $+ $regml(1) isban $chan,-b,+b) *!* $+ $+($gettok($regml(1),1,46),*)
}
}

Replace 'Your IP Address Here' with your real IP
You can use set it as *68.33.18* ,or shorter in one digit, for example as a wildcard. Once set, you won't be able to ban yourself. The shorter it gets, people's IP starting with 68 will not be banned.
Posted By: Horstl Re: F key ban - 30/03/09 11:10 PM
... or you simply check it against $ip (...depends on the lookup acc. to settings at "local info") smile
Posted By: xyzzy Re: F key ban - 31/03/09 12:21 AM
well ip's are masked and my ip chaning so need smthng like this one
F3 tokenize 32 $remtok($1-,$me,1,32) | ban -k # $* 2 no reason
i tried it didnt work
Posted By: Horstl Re: F key ban - 31/03/09 12:48 AM
Ah I see... Try:
Code:
on $*:hotlink:/(@[\w-]+(\56[\w-]+)+)/:#: {
  if (*!* $+ $regml(1) isban $chan) { mode $v2 -b $v1 }
  elseif ($+(*!*,$gettok($regml(1),1,46),*) !iswm $address($me,2)) { mode $chan +b $v1 }
}
This should allow you to unban yourself, but not to ban yourself - regarding hostmasks/cloaked hosts. Note that if you click on a @<your IP address> it will ban @<first octet of your IP address>* regardless. Hope that is no problem (?)
Posted By: xyzzy Re: F key ban - 31/03/09 01:17 AM
i tried it and didnt ban myself and changed it to this
Code:
on $*:hotlink:/(@[\w-]+(\56[\w-]+)+)/:#: {
if ($+(*!*,$gettok($regml(1),1,46),*) !iswm $address($me,2)) { mode $chan +b $v1 }
}

work well now ty smile
© mIRC Discussion Forums