<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/19146" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2012-11-08T20:18:14-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/19146</id>

		<entry>
		<author><name><![CDATA[Arkadietz]]></name></author>
		<updated>2012-11-08T20:18:14-04:00</updated>

		<published>2012-11-08T20:18:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100191#p100191</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100191#p100191"/>
		<title type="html"><![CDATA[urltitle 0.0.1a by rosc2112]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100191#p100191"><![CDATA[
Line 32: NOTICE: Found constant "urltitle" which is also a variable.<br>Line 39: NOTICE: Found constant "urltitle" which is also a variable.<br>Line 39: NOTICE: Expr called in expression<br>Line 39: WARNING: Expr without braces (see <a href="http://tclhelp.net/unb/194" class="postlink">http://tclhelp.net/unb/194</a>)<br><br>for more info paste your tcl in <a href="http://paste.tclhelp.net/" class="postlink">http://paste.tclhelp.net/</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7974">Arkadietz</a> — Thu Nov 08, 2012 8:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[swarfega]]></name></author>
		<updated>2012-11-02T19:09:52-04:00</updated>

		<published>2012-11-02T19:09:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100181#p100181</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100181#p100181"/>
		<title type="html"><![CDATA[urltitle 0.0.1a by rosc2112]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100181#p100181"><![CDATA[
Hi, I use this script to resolve urls pasted in the channel.<br><br>I was wondering if someone could modernize it a bit by adding automatic bitly support. <br><br>So when the bot receives a url, it converts it and outputs that url into a bitly short url.<br><br>Here is the script:<div class="codebox"><p>Code: </p><pre><code># Script to grab titles from webpages - Copyright C.Leonhardt (rosc2112 at yahoo com) Aug.11.2007 # http://members.dandy.net/~fbn/urltitle.tcl.txt# Loosely based on the tinyurl script by Jer and other bits and pieces of my own..################################################################################################################# Usage: # 1) Set the configs below# 2) .chanset #channelname +urltitle        ;# enable script# 3) .chanset #channelname +logurltitle     ;# enable logging# Then just input a url in channel and the script will retrieve the title from the corresponding page.# When reporting bugs, PLEASE include the .set errorInfo debug info! # Read here: http://forum.egghelp.org/viewtopic.php?t=10215################################################################################################################# Configs:set urltitle(ignore) "bdkqr|dkqr" ;# User flags script will ignore input fromset urltitle(pubmflags) "-|-" ;# user flags required for channel eggdrop useset urltitle(length) 5 ;# minimum url length to trigger channel eggdrop useset urltitle(delay) 1 ;# minimum seconds to wait before another eggdrop useset urltitle(timeout) 60000 ;# geturl timeout (1/1000ths of a second)################################################################################################################# Script begins:package require http;# You need the http package..set urltitle(last) 111 ;# Internal variable, stores time of last eggdrop use, don't change..setudef flag urltitle;# Channel flag to enable script.setudef flag logurltitle;# Channel flag to enable logging of script.set urltitlever "0.01a"bind pubm $urltitle(pubmflags) {*://*} pubm:urltitleproc pubm:urltitle {nick host user chan text} {global urltitleif {([channel get $chan urltitle]) &amp;&amp; ([expr [unixtime] - $urltitle(delay)] &gt; $urltitle(last)) &amp;&amp; \(![matchattr $user $urltitle(ignore)])} {foreach word [split $text] {if {[string length $word] &gt;= $urltitle(length) &amp;&amp; \[regexp {^(f|ht)tp(s|)://} $word] &amp;&amp; \![regexp {://([^/:]*:([^/]*@|\d+(/|$))|.*/\.)} $word]} {set urltitle(last) [unixtime]set urtitle [urltitle $word]if {[string length $urtitle]} {puthelp "PRIVMSG $chan :$nick: URL Title for $word - \002$urtitle\002"}break}}        }if {[channel get $chan logurltitle]} {foreach word [split $text] {if {[string match "*://*" $word]} {putlog "&lt;$nick:$chan&gt; $word -&gt; $urtitle"}}}# change to return 0 if you want the pubm trigger logged additionally..return 1}proc urltitle {url} {if {[info exists url] &amp;&amp; [string length $url]} {catch {set http [::http::geturl $url -timeout $::urltitle(timeout)]} errorif {[string match -nocase "*couldn't open socket*" $error]} {return "Error: couldn't connect..Try again later"}if { [::http::status $http] == "timeout" } {return "Error: connection timed out while trying to contact $url"}set data [split [::http::data $http] \n]::http::cleanup $httpset title ""if {[regexp -nocase {&lt;title&gt;(.*?)&lt;/title&gt;} $data match title]} {return [string map { {href=} "" \" "" } $title]} else {return "No title found."}}}putlog "Url Title Grabber $urltitlever (rosc) script loaded.."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8269">swarfega</a> — Fri Nov 02, 2012 7:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
