| View previous topic :: View next topic |
| Author |
Message |
Hawara Voice
Joined: 17 Dec 2005 Posts: 5
|
Posted: Sat Dec 17, 2005 7:03 pm Post subject: Kick users with usermode +x |
|
|
Can somebody write me a simple script, please?
All i need is that bot kickbans ppl wich has enabled usermode +x (IP encrypting).
Basically - in mirc i can type /who Nick
and server will return:
* Nick Hx nick@N654m.NYMDe.net :0 Nick
Nick End of WHO list.
Where x is that user had enabled +x
The server returns userflags in the seven word of the raw 352 command.
P.S. Sorry for my crappy english. If anyone can help me, please.. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Dec 17, 2005 9:33 pm Post subject: |
|
|
so how did you know N654m.NYMDe.net isn't a legitimate host?
or rather, that it's cloaked host; in other words, what is it that differentiates a +x cloaked host from real hosts? _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Hawara Voice
Joined: 17 Dec 2005 Posts: 5
|
Posted: Sat Dec 17, 2005 11:19 pm Post subject: |
|
|
Well, see:
[06:18:39] * Hawara sets mode: +x
-
[06:18:39] -NickServ- Beware, usermode +x has only partial effect now, older servers will show your real host. This warning will be removed as soon as the upgrade finished.
-
* Hawara Hx hawara@N654m.NYMDe.free.net :0 Hawara
Hawara End of WHO list.
-
[06:18:54] * Hawara sets mode: -x
-
* Hawara H hawara@hawara.45.free.net :0 Hawara
Hawara End of WHO list.
-
x - appears only when usermode is activated - so we can guess masked host using who command |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Dec 18, 2005 12:49 am Post subject: |
|
|
| Code: |
bind pub n !kbx foo
bind raw - 352 bar
proc foo {n u h c t} {putserv "who $c"}
proc bar {f k t} {
foreach {x c x h x n u} [split $t] {break}
if ![regexp x $u] return
pushmode $c +b *!*@$h
putkick $c $n
}
|
I challenge minimalists to shorten that  _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Hawara Voice
Joined: 17 Dec 2005 Posts: 5
|
Posted: Sun Dec 18, 2005 8:31 am Post subject: |
|
|
Oh great!!! Wonderful!!! Thank you!!!
Just one little detail... please, tell me how to make it run on user join
(i guess i have to add bind join - * foo ) and to make bot rescan channel each 5 minutes to find if someone enabled +x mode? |
|
| Back to top |
|
 |
Hawara Voice
Joined: 17 Dec 2005 Posts: 5
|
Posted: Sun Dec 18, 2005 11:47 am Post subject: |
|
|
Yeah! I`ve done it myself!
| Code: |
set chan "#tlk-r"
bind pub n !kbx foo
bind join - * foobar
bind raw - 352 bar
bind time - "?0 * * * *" barfoo
proc barfoo {n u h c y} {
global chan
putserv "who $chan"
}
proc foo {n u h c t} {putserv "who $c"}
proc foobar {n u h c} {putserv "who $c"}
proc bar {f k t} {
foreach {x c x h x n u} [split $t] {break}
if ![regexp x $u] return
pushmode $c +b *!*@$h
putkick $c $n "mode -x or die!"
} |
and it works Yay, my first something in tcl! |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Dec 18, 2005 12:57 pm Post subject: |
|
|
congrats, glad to see your enthusiasm nowadays when fewer folks bother to learn and help themselves
there is one potential glitch however: doing WHO on join won't yield results every time since modern IRC servers impose command pace limits to clients, say one WHO in 2 seconds _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Hawara Voice
Joined: 17 Dec 2005 Posts: 5
|
Posted: Mon Dec 19, 2005 3:07 am Post subject: |
|
|
thanks
That`s why i also scan the channel every 10 minutes And also to find smart ppl who join without +x and then turn it on... |
|
| Back to top |
|
 |
|