<?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/19282" />

	<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>2013-02-07T07:43:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-02-07T07:43:25-04:00</updated>

		<published>2013-02-07T07:43:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100918#p100918</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100918#p100918"/>
		<title type="html"><![CDATA[Gmail Notify Channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100918#p100918"><![CDATA[
You can take a look at this script<br><div class="codebox"><p>Code: </p><pre><code>####################################################################################### GMAIL Notifier #################################################### v.0.12 ############################################################ from game_over #################### NEED OPENSSL AND TLS PACKAGE TO WORK ###############################################package require tls 1.4 ;                                                            ####### Info ########################################################################### This is script who shows you RSS feed from your gmail mail profile under SSL       ## connection, emulation of base64 tcl pure encoding and custom browser using cookies.## In this script i try to get efect like your browser do because if you use direct   ## link to your mail you may be hacked. I recommend you to use this script only in    ## your local machines. If you use this script don't forget to secure your machine.   ## Tcl is open sourse and everyone can read your private data.                        ####### Settings ####################################################################### set here your email ################################################################set gacc "your mail here@gmail.com"# set here your password #############################################################set gpass "your password here"# set your nickname in irc ###########################################################set gnick "your nick here"# autochesk your mail and if you have new msg (in minutes) ###########################set gresponce 10# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ##set ::defnick 0set ::SetCookie ""if {[timerexists {checkmail $::botnick "" "" ""}]==""} {set ::starGttime [timer $gresponce {checkmail $::botnick "" "" ""}]}bind msg - !gmail checkmailbind DCC -|- gread readmailproc checkmail {nick host hand text} {global gpass gacc gresponceset abc [split "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ""]set para ""; set gipm [split "$gacc:$gpass" ""]; set Bpat ""; set bcount 0; set bnum ""; set nam ""foreach mpig $gipm {binary scan $mpig B* X; set Bpat "$Bpat$X"}foreach sixbits [split $Bpat ""] {if {$bcount == 5} {binary scan [binary format B8 00$bnum$sixbits] c1 bnum; set para "$para[lindex $abc $bnum]"; set bnum ""; set bcount 0} else {set bnum "$bnum$sixbits"; incr bcount 1}}if {$nick != $::botnick} {set ::defnick 1}if {$bcount != 5 &amp;&amp; $bcount != 0} {set nam [expr 6 - $bcount]; set bnum "$bnum[string repeat 0 $nam]"; binary scan [binary format B8 00$bnum] c1 bnum; set para "$para[lindex $abc $bnum]"}set Gsock [::tls::socket -async mail.google.com 443]set ::Gltv $Gsock ; after 3000 check_for_webfconfigure $Gsock -buffering line -encoding binaryputs $Gsock "GET /mail/feed/atom/ HTTP/1.0"puts $Gsock "Accept: */*"puts $Gsock "Host: mail.googlel.com"if {$::SetCookie != ""} {puts $Gsock "Cookie: $::SetCookie"}puts $Gsock "Authorization: Basic $para[string repeat = [expr $nam / 2]]"puts $Gsock "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3"puts $Gsock "Content-Type: text/html"puts $Gsock ""fileevent $Gsock readable "readGmail $Gsock"if {[timerexists {checkmail $::botnick "" "" ""}]==""} {set ::starGttime [timer $gresponce {checkmail $::botnick "" "" ""}]}}proc check_for_web {} {global gnickif {$::Gltv != 0} {if {$::defnick==1} {putquick "PRIVMSG $gnick :Request timed out!"}}}proc readGmail {k} {set dfl ""while {[gets $k data] &gt;= 0} {set data [string map { \{ "" \} "" \" ""} $data]if {[string match *Set-Cookie:* $data] &amp;&amp; $::SetCookie == ""} {set ::SetCookie [string map {";" ""} [lindex $data 1]]}if {[string match *&lt;/feed&gt;* $data]} {set ::Gltv 0}append dfl "$data\n"; unset data}readgm [split $dfl \n]; close $k;}set ::emils 0proc readgm {lin} {global gnickif {$::Gltv != 0} {return 0}if {[regexp -all {&lt;fullcount&gt;(.*?)&lt;/fullcount&gt;} $lin -&gt; mails] == 1 &amp;&amp; $::defnick == 1} {putquick "PRIVMSG $gnick :You have $mails emails! Type on DCC .gread &lt;num of email&gt; to read titles!"} elseif {[regexp -all {&lt;fullcount&gt;(.*?)&lt;/fullcount&gt;} $lin -&gt; mails] == 1 &amp;&amp; $::defnick == 0 &amp;&amp; $::emils &lt; $mails} {putquick "PRIVMSG $gnick :You have new email! Type on DCC .gread &lt;num of email&gt; to read titles!"} else {return 0}; set ::emils $mailsset begin [lsearch -regexp $lin "&lt;fullcount&gt;"]; set count 0; set f 0; set ::titlet ""; set ::summary ""; set ::namet ""; set ::mailt ""; set ::issyt ""foreach nil $lin {if {$begin &lt; $count} {if {[regexp {&lt;title&gt;(.*?)&lt;/title&gt;} $nil -&gt; title] == 1} {append ::titlet " [string map "{{}} -" [list "$title"]]"}if {[regexp {&lt;summary&gt;(.*?)&lt;/summary&gt;} $nil -&gt; summar] == 1} {append ::summary " [string map "{{}} -" [list "$summar"]]"}if {[regexp {&lt;issued&gt;(.*?)&lt;/issued&gt;} $nil -&gt; issy] == 1} {append ::issyt " [string map "{{}} -" [list "$issy"]]"}if {[string mat *&lt;author&gt;* $nil]} {set f 1} elseif {[string mat *&lt;/author&gt;* $nil]} {set f 0}if {[regexp {&lt;name&gt;(.*?)&lt;/name&gt;} $nil -&gt; name] == 1 &amp;&amp; $f == 1} {append ::namet " [string map "{{}} -" [list "$name"]]"}if {[regexp {&lt;email&gt;(.*?)&lt;/email&gt;} $nil -&gt; mail] == 1 &amp;&amp; $f == 1} {append ::mailt " [string map "{{}} -" [list "$mail"]]"}}incr count 1}unset begin; unset count}proc readmail {handle idx text} {global gnickif {$handle!=$gnick} {return 0}if {[string is digit -strict -failindex 1234567890 [lindex $text 0]]==1 &amp;&amp; [lindex $text 0]&lt;=[llength $::titlet] &amp;&amp; [llength $::titlet]&gt;0 &amp;&amp; [lindex $text 0]&gt;0} {set text [expr [lindex $text 0] - 1]; putquick "PRIVMSG $gnick : Title:[lindex [lindex $::titlet $text] 0] Summary:[lindex $::summary $text] Name:[lindex $::namet $text] Email:[lindex $::mailt $text] Date:[lindex $::issyt $text]"} else {putquick "PRIVMSG $gnick : ERR: You don't have this number of letters!"; return 0}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Thu Feb 07, 2013 7:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-01-17T19:47:10-04:00</updated>

		<published>2013-01-17T19:47:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100629#p100629</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100629#p100629"/>
		<title type="html"><![CDATA[Gmail Notify Channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100629#p100629"><![CDATA[
Hey there, after looking for quite a while and finding nothing i thought this would be the most appropriate forum to write the following request<br><br>I need a script that will fetch from my gmail account any new email received and labelled under 'my friends label' and will write to channel #friends the subject of that email.<br><br>Thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Thu Jan 17, 2013 7:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
