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 

incith:xrl (r94) (Jan. 20th, 2009) (+TinyURL and x0.no)
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Wed Apr 05, 2006 12:28 pm    Post subject: incith:xrl (r94) (Jan. 20th, 2009) (+TinyURL and x0.no) Reply with quote

Newest versions of my scripts are always available @ incith.com if they are not yet available on the Tcl archive.

incith:xrl will shorten long url's into short xrl.us/abcd url's. It will also watch a channel for long URL's and shorten them automatically if they are over a set length. You can also un-shorten a URL (as long as it was shortened using the bot, for some reason, url's posted directly on xrl.us webpage do not have their long-url stored).

!shorten or !xrl http://long.url.com
!lengthen or !unxrl abcd -or- xrl.us/abcd

As well the bot will store URL's for future shortening, example:
<user> http://some.long.url
<bot silently remembers this URL, for this channel>
<user2> !shorten <or you can specify a nickname/channel to shorten the last url>
<bot> last url: <it will then shorten http://some.long.url>
_________________
; Answer a few unanswered posts!


Last edited by incith on Wed Jan 21, 2009 2:36 am; edited 29 times in total
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Sat Nov 18, 2006 9:39 pm    Post subject: Reply with quote

I've updated this script to v1.4, fixes auto shorten to work properly (only checks the length of the URL within the message now, instead of the length of the entire message), and I also fixed auto shorten not working in private messages.

It can be downloaded temporarily until the Tcl archive updates, from here: -link expired-
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Sun Nov 19, 2006 4:34 pm    Post subject: Reply with quote

Ah, I've made a 2.0 version to bring the script up to date a bit more with my other scripts.

Download available in the first post.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
Domin
Halfop


Joined: 10 Jun 2006
Posts: 72

PostPosted: Wed Nov 22, 2006 4:59 pm    Post subject: Reply with quote

No matther how i set the script up it keeps ignoring all users in the channel

[01:52] incith:xrl-2.0: flood detected from Domin.
[01:54] incith:xrl-2.0: flood detected from Martin\-.
[01:54] incith:xrl-2.0: flood detected from Nille.

even thou non of them writes and says anything one of them is my self even thou im botnet master.

Hope you can help Wink
_________________
Regards
Domin @ efnet
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Tue Nov 28, 2006 6:09 pm    Post subject: Reply with quote

Yes, I noticed and fixed this earlier, please download the latest version (2.1) Smile

http://egghelp.org/tcl.htm
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Thu Feb 01, 2007 2:02 pm    Post subject: Reply with quote

Version 2.2 released to fix auto shorten. See the first post for download.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Thu Jul 05, 2007 11:52 pm    Post subject: Reply with quote

Hi, I just instaled this tcl (v2.2) and work fine with commands like !shorten url, but automatic work dont work. See my config:

Code:
# minimum length a url has to be to auto-shorten it
    variable minimum_length 15

    # prefixes that you want the bot to watch for, to auto-shorten them
    variable prefixes "http:// ftp:// www."

    # number of minute(s) to ignore flooders, 0 to disable flood protection
    variable ignore 1

    # how many requests in how many seconds is considered flooding?
    # by default, this allows 3 queries in 10 seconds, the 4th being ignored
    #   and ignoring requests for 'variable ignore' minutes
    variable flood 4:10


Any idea? my eggdrop is version 1.6.17 running on FreeBSD 6
Back to top
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Sun Jul 08, 2007 12:31 am    Post subject: Reply with quote

The automatic parse is not working.

And the tcl doesn't show any error.

It only works when it uses the command !shorten url

What can be?
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sun Jul 08, 2007 3:51 am    Post subject: Reply with quote

line 170
Code:
if {[regexp -- "(${prefix}.+)\[\\s+\]" $input - auto_shorten_url] == 1} {

I think it's the use of escapes that is throwing off detection. You can try:
Code:
if {[regexp -- "(${prefix}.+?)(\s|$)" $input - auto_shorten_url] == 1} {

Keep in mind i'm not the most talented when it comes to regexp.
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Sun Jul 08, 2007 2:59 pm    Post subject: Reply with quote

The auto detection has never been perfect unfortunately. It will work if you type something before the url and perhaps after it, such as 'blah blah http://www.google.com blah blah', then it will pick it up.

That's where the problem comes in, I could never come up with a regexp to do this properly, to pick the url out of a string, and check just the url's length, it ends up grabbing other stuff, and bleh. But I'd be more than happy to incorporate a new RE. Smile

Regards,
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Mon Jul 09, 2007 11:01 am    Post subject: Reply with quote

Really...

[11:58:08] <me> blah blah http://www.google.com/teste/site.php blah blah
[11:58:22] <!Bot> me's url: http://xrl.us/z6i
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Tue Jul 17, 2007 12:27 pm    Post subject: Reply with quote

Yeah, I haven't looked at the code in awhile. It still works when it does convert a URL, just it's not checking the URL's length but the entire message instead which is where the problem comes in.. You type 'blah blah blah www.shorturl.com blah (blah blah.....)' and even tho its just "www.shorturl.com" it's still going to convert it because the whole sentence was longer than the 'auto length'.

Anyway, I'll fix it up one of these days Very Happy
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Fri Oct 19, 2007 3:16 pm    Post subject: Reply with quote

url: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

How to fix it?
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Wed Feb 20, 2008 10:55 pm    Post subject: Reply with quote

Sorry I never seen the above posters comment, I have also never had the error shown happen to me.

I've released version 2.3, which fixes auto shorten problems, it should now capture just the URL and thus check the length properly, I tested it on a few URL's, URL's inside sentences, etc, with ports, without ports, with things like .com/?blah=foo with .co.uk type TLD's and so on. All the tests passed and grabbed just the URL. So if you set variable minimum_length to something sane and someone says a long URL in the channel, the bot will auto-shorten it, and not take the rest of the sentence into account as part of the URL's length anymore. Hope that makes sense! Smile

Prefixes were removed as we are only going to be capturing http(s) and www anyway, I tried giving xrl an ftp:// address and it failed. Suggestions welcome. As I mentioned a few posts up I still have plans for this script, this was just a long, long needed fix.

Updates: I'm working on this script again, currently I've added TinyURL support to it. Any other sites you may want included please post here.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
Domin
Halfop


Joined: 10 Jun 2006
Posts: 72

PostPosted: Thu Feb 21, 2008 4:06 pm    Post subject: Reply with quote

Greate to see incith

Here are a few other:

http://kurl.no/lagurl.php

http://korturl.dk/

http://korturl.se/

http://kortlink.dk/

http://www.kortlink.com/
_________________
Regards
Domin @ efnet
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 Support & Releases All times are GMT - 4 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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