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

	<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>2007-05-20T11:53:24-04:00</updated>

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

		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-05-20T11:53:24-04:00</updated>

		<published>2007-05-20T11:53:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72864#p72864</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72864#p72864"/>
		<title type="html"><![CDATA[Radio script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72864#p72864"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Author: Tomekk # e-mail:  tomekk/@/oswiecim/./eu/./org # home page: http://tomekk.oswiecim.eu.org/ # # Version 0.4 # # This file is Copyrighted under the GNU Public License. # http://www.gnu.org/copyleft/gpl.html # manual # /msg &lt;nazwa_bota&gt; +dodaj 21:30 cos tam - dodaje ramowke, czas musi byc w formacie HH:MM, # /msg &lt;nazwa_bota&gt; +czysc - pokaze liste z ramowkami i ich numerami # /msg &lt;nazwa_bota&gt; +czysc &lt;numer&gt; - usunie ramowke o podanym numerze # /msg &lt;nazwa_bota&gt; +czysc all - usunie wszystkie # /msg &lt;nazwa_bota&gt; +czas - pokaze aktualny interwal (domyslnie co 15 minut) # /msg &lt;nazwa_bota&gt; +czas &lt;interwal&gt; - zmieni obecny interwal na podany (minuty) # kanal badz kanaly set rm_channels {#kanal1 #kanal2} set allowuser {"*!*@I.love.eggdrop,.org""*!*@127.0.0.*"}######################################### bind msgm - "*" privates_fct bind time - "00 00 * * *" reset_ramowki set ramowki_dir "ramowki" set ramowki_db "$ramowki_dir/ramowki.db" set ramowki_time "$ramowki_dir/time.db" if {![file exists $ramowki_dir]} {    file mkdir $ramowki_dir } if {![file exists $ramowki_time]} {         set touch_time [open $ramowki_time w]    puts $touch_time 15    close $touch_time } if {![file exists $ramowki_db]} {         set touch_db [open $ramowki_db w]         close $touch_db }       proc grab_time {} {    global ramowki_time    set tfs_open [open $ramowki_time r]    gets $tfs_open time_out    close $tfs_open    return $time_out } proc set_rtime { rntime } {    global ramowki_time    set tfs_write [open $ramowki_time w]    puts $tfs_write $rntime    close $tfs_write } proc odliczadlo { } {    show_ramowki    if {[string match *odliczadlo* [timers]] != 1} {       timer [grab_time] odliczadlo    } } proc reset_db { } {    global ramowki_db    set clear_db [open $ramowki_db w]    close $clear_db } proc get_db_data { } {    global ramowki_db    set open_db [open $ramowki_db]         set all_db_data [read $open_db]         close $open_db    set all_db_lines [split $all_db_data "\n"]    return $all_db_lines } proc add_ramowke { body } {    global ramowki_db    set file_hndl [open $ramowki_db a]    puts $file_hndl "$body"    close $file_hndl } proc del_ramowke { nrr } {    global ramowki_db        set uchwyt [open $ramowki_db]         set all_ramowki [read $uchwyt]         close $uchwyt         set all_ramowki_lines [split $all_ramowki "\n"]         set counter [llength $all_ramowki_lines]    set handler [open $ramowki_db w]         for {set i 0} {$i &lt; $counter} {incr i 1} {       if {$i == $nrr} {          continue       } {          set each_ramowka_line [lindex $all_ramowki_lines $i]          if {$each_ramowka_line != ""} {             puts $handler $each_ramowka_line          }       }    }    close $handler } proc list_ramowki { niick } {    set x 0    foreach ramowka [get_db_data] {       if {$ramowka != "" } {          putquick "PRIVMSG $niick :$x\) $ramowka"          incr x 1       }    } } proc privates_fct { nick uhost hand arg } {    global allowuser   set all_args [split $arg]    set first_arg [lindex $all_args 0]    set second_arg [lindex $all_args 1]    set other_arg [lrange $all_args 2 end]    if {$first_arg == "+dodaj"} {       if {$other_arg != "" } {     foreach allowuser [string tolower $allowuser] {    if {[string match *$allowuser* [string tolower $uhost]]} {         add_ramowke "$second_arg $other_arg"          putquick "PRIVMSG $nick :dodano"         }      }   }}   if {$first_arg == "+czysc"} {       if {$second_arg == ""} {       foreach allowuser [string tolower $allowuser] {       if {[string match *$allowuser* [string tolower $uhost]]} {          list_ramowki $nick       } elseif {[regexp {^([0-9]+)$} $second_arg]} {          del_ramowke $second_arg          putquick "PRIVMSG $nick :usunieto"       } elseif {$second_arg == "all"} {          reset_db          putquick "PRIVMSG $nick :usunieto wszystkie ramowki"         }      }   }}     if {$first_arg == "+czas"} {       if {$second_arg == ""} {     foreach allowuser [string tolower $allowuser] {     if {[string match *$allowuser* [string tolower $uhost]]} {        putquick "PRIVMSG $nick :aktualny interwal to [grab_time] minut|a|y"       } elseif {[regexp {^([0-9]+)$} $second_arg]} {          set_rtime $second_arg          putquick "PRIVMSG $nick :zmieniono"         }       }     }   }}proc show_ramowki { } {    global rm_channels        foreach db_line [lsort [get_db_data]] {       if {$db_line != ""} {          set splited [split $db_line]          set first_sp [lindex $splited 0]          set other_sp [lrange $splited 1 end]          foreach rchan $rm_channels {             if {$rchan != ""} {                if {[botonchan $rchan] == 1} {                   putquick "PRIVMSG $rchan :\002$first_sp\002 $other_sp"                }             }          }       }    } } proc reset_ramowki { min hour day month year } {    reset_db } if {[string match *odliczadlo* [timers]] != 1} {    timer [grab_time] odliczadlo } putlog "ramowki.tcl ver 0.4 by Tomekk loaded" </code></pre></div>Try this and tell me if there is any problem.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Sun May 20, 2007 11:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TheViP]]></name></author>
		<updated>2007-05-19T20:26:35-04:00</updated>

		<published>2007-05-19T20:26:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72845#p72845</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72845#p72845"/>
		<title type="html"><![CDATA[Radio script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72845#p72845"><![CDATA[
yes, thx worx propertly but can u do that too for commands : +czysc and +czas<br><br>Thanx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9001">TheViP</a> — Sat May 19, 2007 8:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-05-18T21:55:05-04:00</updated>

		<published>2007-05-18T21:55:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72832#p72832</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72832#p72832"/>
		<title type="html"><![CDATA[Radio script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72832#p72832"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Author: Tomekk # e-mail:  tomekk/@/oswiecim/./eu/./org # home page: http://tomekk.oswiecim.eu.org/ # # Version 0.4 # # This file is Copyrighted under the GNU Public License. # http://www.gnu.org/copyleft/gpl.html # manual # /msg &lt;nazwa_bota&gt; +dodaj 21:30 cos tam - dodaje ramowke, czas musi byc w formacie HH:MM, # /msg &lt;nazwa_bota&gt; +czysc - pokaze liste z ramowkami i ich numerami # /msg &lt;nazwa_bota&gt; +czysc &lt;numer&gt; - usunie ramowke o podanym numerze # /msg &lt;nazwa_bota&gt; +czysc all - usunie wszystkie # /msg &lt;nazwa_bota&gt; +czas - pokaze aktualny interwal (domyslnie co 15 minut) # /msg &lt;nazwa_bota&gt; +czas &lt;interwal&gt; - zmieni obecny interwal na podany (minuty) # kanal badz kanaly set rm_channels {#kanal1 #kanal2} set allowuser {"*!*@I.love.eggdrop,.org""*!*@127.0.0.*"}######################################### bind msgm - "*" privates_fct bind time - "00 00 * * *" reset_ramowki set ramowki_dir "ramowki" set ramowki_db "$ramowki_dir/ramowki.db" set ramowki_time "$ramowki_dir/time.db" if {![file exists $ramowki_dir]} {    file mkdir $ramowki_dir } if {![file exists $ramowki_time]} {         set touch_time [open $ramowki_time w]    puts $touch_time 15    close $touch_time } if {![file exists $ramowki_db]} {         set touch_db [open $ramowki_db w]         close $touch_db }       proc grab_time {} {    global ramowki_time    set tfs_open [open $ramowki_time r]    gets $tfs_open time_out    close $tfs_open    return $time_out } proc set_rtime { rntime } {    global ramowki_time    set tfs_write [open $ramowki_time w]    puts $tfs_write $rntime    close $tfs_write } proc odliczadlo { } {    show_ramowki    if {[string match *odliczadlo* [timers]] != 1} {       timer [grab_time] odliczadlo    } } proc reset_db { } {    global ramowki_db    set clear_db [open $ramowki_db w]    close $clear_db } proc get_db_data { } {    global ramowki_db    set open_db [open $ramowki_db]         set all_db_data [read $open_db]         close $open_db    set all_db_lines [split $all_db_data "\n"]    return $all_db_lines } proc add_ramowke { body } {    global ramowki_db    set file_hndl [open $ramowki_db a]    puts $file_hndl "$body"    close $file_hndl } proc del_ramowke { nrr } {    global ramowki_db        set uchwyt [open $ramowki_db]         set all_ramowki [read $uchwyt]         close $uchwyt         set all_ramowki_lines [split $all_ramowki "\n"]         set counter [llength $all_ramowki_lines]    set handler [open $ramowki_db w]         for {set i 0} {$i &lt; $counter} {incr i 1} {       if {$i == $nrr} {          continue       } {          set each_ramowka_line [lindex $all_ramowki_lines $i]          if {$each_ramowka_line != ""} {             puts $handler $each_ramowka_line          }       }    }    close $handler } proc list_ramowki { niick } {    set x 0    foreach ramowka [get_db_data] {       if {$ramowka != "" } {          putquick "PRIVMSG $niick :$x\) $ramowka"          incr x 1       }    } } proc privates_fct { nick uhost hand arg } {    global allowuser   set all_args [split $arg]    set first_arg [lindex $all_args 0]    set second_arg [lindex $all_args 1]    set other_arg [lrange $all_args 2 end]    if {$first_arg == "+dodaj"} {       if {$other_arg != "" } {     foreach allowuser [string tolower $allowuser] {    if {[string match *$allowuser* [string tolower $uhost]]} {         add_ramowke "$second_arg $other_arg"          putquick "PRIVMSG $nick :dodano"         }      }   }}   if {$first_arg == "+czysc"} {       if {$second_arg == ""} {          list_ramowki $nick       } elseif {[regexp {^([0-9]+)$} $second_arg]} {          del_ramowke $second_arg          putquick "PRIVMSG $nick :usunieto"       } elseif {$second_arg == "all"} {          reset_db          putquick "PRIVMSG $nick :usunieto wszystkie ramowki"       }    }    if {$first_arg == "+czas"} {       if {$second_arg == ""} {          putquick "PRIVMSG $nick :aktualny interwal to [grab_time] minut|a|y"       } elseif {[regexp {^([0-9]+)$} $second_arg]} {          set_rtime $second_arg          putquick "PRIVMSG $nick :zmieniono"       }    } } proc show_ramowki { } {    global rm_channels        foreach db_line [lsort [get_db_data]] {       if {$db_line != ""} {          set splited [split $db_line]          set first_sp [lindex $splited 0]          set other_sp [lrange $splited 1 end]          foreach rchan $rm_channels {             if {$rchan != ""} {                if {[botonchan $rchan] == 1} {                   putquick "PRIVMSG $rchan :\002$first_sp\002 $other_sp"                }             }          }       }    } } proc reset_ramowki { min hour day month year } {    reset_db } if {[string match *odliczadlo* [timers]] != 1} {    timer [grab_time] odliczadlo } putlog "ramowki.tcl ver 0.4 by Tomekk loaded" </code></pre></div>try this should work, have'nt tested though.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Fri May 18, 2007 9:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TheViP]]></name></author>
		<updated>2007-05-17T09:49:20-04:00</updated>

		<published>2007-05-17T09:49:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72805#p72805</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72805#p72805"/>
		<title type="html"><![CDATA[Radio script help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72805#p72805"><![CDATA[
Hello.<br>I found a script, who write in chanel the audition from our Internet Radio. I add all auditions with prv command to bot <div class="codebox"><p>Code: </p><pre><code>+dodaj HH:MM Text</code></pre></div>eg : +dodaj 21:00 Music<br>But all have an acces to this command. I want to change the script that, only some persons have acces to +dodaj command. The best veryficantion will be by the hostnames. <div class="codebox"><p>Code: </p><pre><code># Author: Tomekk# e-mail:  tomekk/@/oswiecim/./eu/./org# home page: http://tomekk.oswiecim.eu.org/## Version 0.4## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# manual# /msg &lt;nazwa_bota&gt; +dodaj 21:30 cos tam - dodaje ramowke, czas musi byc w formacie HH:MM,# /msg &lt;nazwa_bota&gt; +czysc - pokaze liste z ramowkami i ich numerami# /msg &lt;nazwa_bota&gt; +czysc &lt;numer&gt; - usunie ramowke o podanym numerze# /msg &lt;nazwa_bota&gt; +czysc all - usunie wszystkie# /msg &lt;nazwa_bota&gt; +czas - pokaze aktualny interwal (domyslnie co 15 minut)# /msg &lt;nazwa_bota&gt; +czas &lt;interwal&gt; - zmieni obecny interwal na podany (minuty)# kanal badz kanalyset rm_channels {#kanal1 #kanal2}#########################################bind msgm - "*" privates_fctbind time - "00 00 * * *" reset_ramowkiset ramowki_dir "ramowki"set ramowki_db "$ramowki_dir/ramowki.db"set ramowki_time "$ramowki_dir/time.db"if {![file exists $ramowki_dir]} {   file mkdir $ramowki_dir}if {![file exists $ramowki_time]} {        set touch_time [open $ramowki_time w]   puts $touch_time 15   close $touch_time}if {![file exists $ramowki_db]} {        set touch_db [open $ramowki_db w]        close $touch_db}      proc grab_time {} {   global ramowki_time   set tfs_open [open $ramowki_time r]   gets $tfs_open time_out   close $tfs_open   return $time_out}proc set_rtime { rntime } {   global ramowki_time   set tfs_write [open $ramowki_time w]   puts $tfs_write $rntime   close $tfs_write}proc odliczadlo { } {   show_ramowki   if {[string match *odliczadlo* [timers]] != 1} {      timer [grab_time] odliczadlo   }}proc reset_db { } {   global ramowki_db   set clear_db [open $ramowki_db w]   close $clear_db}proc get_db_data { } {   global ramowki_db   set open_db [open $ramowki_db]        set all_db_data [read $open_db]        close $open_db   set all_db_lines [split $all_db_data "\n"]   return $all_db_lines}proc add_ramowke { body } {   global ramowki_db   set file_hndl [open $ramowki_db a]   puts $file_hndl "$body"   close $file_hndl}proc del_ramowke { nrr } {   global ramowki_db      set uchwyt [open $ramowki_db]        set all_ramowki [read $uchwyt]        close $uchwyt        set all_ramowki_lines [split $all_ramowki "\n"]        set counter [llength $all_ramowki_lines]   set handler [open $ramowki_db w]        for {set i 0} {$i &lt; $counter} {incr i 1} {      if {$i == $nrr} {         continue      } {         set each_ramowka_line [lindex $all_ramowki_lines $i]         if {$each_ramowka_line != ""} {            puts $handler $each_ramowka_line         }      }   }   close $handler}proc list_ramowki { niick } {   set x 0   foreach ramowka [get_db_data] {      if {$ramowka != "" } {         putquick "PRIVMSG $niick :$x\) $ramowka"         incr x 1      }   }}proc privates_fct { nick uhost hand arg } {   set all_args [split $arg]   set first_arg [lindex $all_args 0]   set second_arg [lindex $all_args 1]   set other_arg [lrange $all_args 2 end]   if {$first_arg == "+dodaj"} {      if {$other_arg != "" } {         add_ramowke "$second_arg $other_arg"         putquick "PRIVMSG $nick :dodano"      }   }   if {$first_arg == "+czysc"} {      if {$second_arg == ""} {         list_ramowki $nick      } elseif {[regexp {^([0-9]+)$} $second_arg]} {         del_ramowke $second_arg         putquick "PRIVMSG $nick :usunieto"      } elseif {$second_arg == "all"} {         reset_db         putquick "PRIVMSG $nick :usunieto wszystkie ramowki"      }   }   if {$first_arg == "+czas"} {      if {$second_arg == ""} {         putquick "PRIVMSG $nick :aktualny interwal to [grab_time] minut|a|y"      } elseif {[regexp {^([0-9]+)$} $second_arg]} {         set_rtime $second_arg         putquick "PRIVMSG $nick :zmieniono"      }   }}proc show_ramowki { } {   global rm_channels      foreach db_line [lsort [get_db_data]] {      if {$db_line != ""} {         set splited [split $db_line]         set first_sp [lindex $splited 0]         set other_sp [lrange $splited 1 end]         foreach rchan $rm_channels {            if {$rchan != ""} {               if {[botonchan $rchan] == 1} {                  putquick "PRIVMSG $rchan :\002$first_sp\002 $other_sp"               }            }         }      }   }}proc reset_ramowki { min hour day month year } {   reset_db}if {[string match *odliczadlo* [timers]] != 1} {   timer [grab_time] odliczadlo}putlog "ramowki.tcl ver 0.4 by Tomekk loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9001">TheViP</a> — Thu May 17, 2007 9:49 am</p><hr />
]]></content>
	</entry>
	</feed>
