egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Kick users with usermode +x

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Hawara
Voice


Joined: 17 Dec 2005
Posts: 5

PostPosted: Sat Dec 17, 2005 7:03 pm    Post subject: Kick users with usermode +x Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Dec 17, 2005 9:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Hawara
Voice


Joined: 17 Dec 2005
Posts: 5

PostPosted: Sat Dec 17, 2005 11:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Dec 18, 2005 12:49 am    Post subject: Reply with quote

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 Razz
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Hawara
Voice


Joined: 17 Dec 2005
Posts: 5

PostPosted: Sun Dec 18, 2005 8:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Hawara
Voice


Joined: 17 Dec 2005
Posts: 5

PostPosted: Sun Dec 18, 2005 11:47 am    Post subject: Reply with quote

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 Smile Yay, my first something in tcl!
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Dec 18, 2005 12:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Hawara
Voice


Joined: 17 Dec 2005
Posts: 5

PostPosted: Mon Dec 19, 2005 3:07 am    Post subject: Reply with quote

thanks Smile

That`s why i also scan the channel every 10 minutes Smile And also to find smart ppl who join without +x and then turn it on...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber